http url

If you don't know where to post, post here.

Moderators: marcelr, Toonz, TheHogNL, TerrorSource

http url

Postby mAiden » Wed Aug 15, 2018 9:52 am

Does anyone know how you can update the powerusage or gasusage by http url?
Have since yesterday P1 port directly on me Raspberry PI, would like the current power values and gas values on Toon.
Member of the Toon Software Collective
mAiden
Member
Member
 
Posts: 322
Joined: July 2017

Re: http url

Postby TerrorSource » Wed Aug 15, 2018 10:12 am

TerrorSource
Member
Member
 
Posts: 481
Joined: May 2017

Re: http url

Postby mAiden » Wed Aug 15, 2018 10:15 am



Yes, i did..
Can't find what i was searching..

Was searching for a url, i can update gas en power usage on Toon with it.

You're links update Domoticz gas en power usage from Toon
Member of the Toon Software Collective
mAiden
Member
Member
 
Posts: 322
Joined: July 2017

Re: http url

Postby TerrorSource » Wed Aug 15, 2018 10:34 am

mAiden wrote:


Yes, i did..
Can't find what i was searching..

Was searching for a url, i can update gas en power usage on Toon with it.

You're links update Domoticz gas en power usage from Toon


If this isn't what your looking for, what is then? Maybe that the question is a bit vague at the moment..
Or do you want to update the P1-values from domoticz into the Toon? If so, go to the Gamma and buy a rj-11 splitter for 1/1,50euro. put that in the smart meter and put 2 cables in the splitter, 1 towards the meteradapter and 1 towards the pi.
TerrorSource
Member
Member
 
Posts: 481
Joined: May 2017

Re: http url

Postby Toonz » Thu Aug 16, 2018 3:35 pm

mAiden wrote:Does anyone know how you can update the powerusage or gasusage by http url?
Have since yesterday P1 port directly on me Raspberry PI, would like the current power values and gas values on Toon.


Hi mAiden,

Are you asking whether you can put date into the Toon's rra databases by means of an external http call to Toon?
The answer is yes, but I haven't looked into the explicit url calls to do so as it has never been asked before.

If you look at my other thread how to query the rra databases you will have a starting point....

reading is via http://toon-ip/hcb_rrd?action=getRrdData.....
writing will be via http://toon-ip/hcb_rrd?action=setRrdData......

just need to figure out all parameters to supply..

Kind regardz,

Toonz
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1591
Joined: December 2016

Re: http url

Postby georon » Thu Feb 07, 2019 9:35 pm

@mAiden,

I am trying to do the same.
If have an alternative gas meter that sends data to Domoticz.
Now I am trying to display this data on my Toon.

Have you made any progress? Or have you abandoned it...
georon
Starting Member
Starting Member
 
Posts: 15
Joined: July 2017

Re: http url

Postby vso » Thu May 21, 2020 4:38 pm

mAiden wrote:


Yes, i did..
Can't find what i was searching..

Was searching for a url, i can update gas en power usage on Toon with it.

You're links update Domoticz gas en power usage from Toon



georon wrote:@mAiden,

I am trying to do the same.
If have an alternative gas meter that sends data to Domoticz.
Now I am trying to display this data on my Toon.

Have you made any progress? Or have you abandoned it...

any progress ?
vso
Member
Member
 
Posts: 63
Joined: March 2019

Re: http url

Postby Toonz » Thu May 21, 2020 5:03 pm

vso wrote:any progress ?


Nope, not anywhere near the top of our priority list. So far Toon does a pretty good itself keeping track of the power and gas usage.
But feel free to dig into it yourself and share the results here.

Kind regardz,

Toonz
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1591
Joined: December 2016

Re: http url

Postby vso » Tue May 26, 2020 4:16 pm

ln -s /mnt/data/qmf/config/config_happ_pwrusage.xml /qmf/www/config_happ_pwrusage.xml )don't know if this the correct xml to "extract" data .. but

thx to a lighttpd.conf
http://192.168.1.65:10080/config_happ_pwrusage.xml works now :)

thx guys ..
vso
Member
Member
 
Posts: 63
Joined: March 2019

Re: http url

Postby Toonz » Sun May 31, 2020 9:05 am

you're welcome, by the way, are you going to look into writing data into the rrd databases or will you start reporting from domoticz or others?
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1591
Joined: December 2016

Re: http url

Postby Toonz » Wed Dec 30, 2020 2:11 pm

Toonz wrote:If you look at my other thread how to query the rra databases you will have a starting point....

reading is via http://toon-ip/hcb_rrd?action=getRrdData.....
writing will be via http://toon-ip/hcb_rrd?action=setRrdData......

just need to figure out all parameters to supply.


After neglecting this for quite some time I just found out how to write data into the rra databases with the setRrdData action (thanks to glsf91 for the final push):
In this sample the time is entered as string in epoch format (1609331100), value injected is 100 in this example. The JSON part can contain multiple samples separated by commas.

Code: Select all
http://192.168.x.x/hcb_rrd?action=setRrdData&loggerName=<whicheveryouwant>&rra=30days&samples={"1609331100":100}


Opens up a ton of integration opportunities to connect external devices to Toon or create a proper data transfer utility from one Toon to another without the need for rooting the source Toon.
Happy developing :-)

Kind regards,

Toonz

EDIT: first application using this technique: domoticaforum.eu/viewtopic.php?f=103&am ... 410#p96410
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1591
Joined: December 2016


Return to Toon miscellaneous

Who is online

Users browsing this forum: No registered users and 1 guest