http url

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

Moderators: marcelr, TheHogNL, Toonz

Post Reply
mAiden
Member
Member
Posts: 330
Joined: Mon Jul 10, 2017 10:22 am

http url

Post by mAiden »

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
TerrorSource
Administrator
Administrator
Posts: 494
Joined: Thu May 04, 2017 9:28 pm

Re: http url

Post by TerrorSource »

mAiden
Member
Member
Posts: 330
Joined: Mon Jul 10, 2017 10:22 am

Re: http url

Post by mAiden »

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
TerrorSource
Administrator
Administrator
Posts: 494
Joined: Thu May 04, 2017 9:28 pm

Re: http url

Post by TerrorSource »

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.
Toonz
Forum Moderator
Forum Moderator
Posts: 1871
Joined: Mon Dec 19, 2016 1:58 pm

Re: http url

Post by Toonz »

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
georon
Starting Member
Starting Member
Posts: 25
Joined: Wed Jul 19, 2017 8:23 pm

Re: http url

Post by georon »

@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...
vso
Member
Member
Posts: 63
Joined: Wed Mar 27, 2019 11:27 pm

Re: http url

Post by vso »

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 ?
Toonz
Forum Moderator
Forum Moderator
Posts: 1871
Joined: Mon Dec 19, 2016 1:58 pm

Re: http url

Post by Toonz »

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
vso
Member
Member
Posts: 63
Joined: Wed Mar 27, 2019 11:27 pm

Re: http url

Post by vso »

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 ..
Toonz
Forum Moderator
Forum Moderator
Posts: 1871
Joined: Mon Dec 19, 2016 1:58 pm

Re: http url

Post by Toonz »

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
Toonz
Forum Moderator
Forum Moderator
Posts: 1871
Joined: Mon Dec 19, 2016 1:58 pm

Re: http url

Post by Toonz »

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
warp
Starting Member
Starting Member
Posts: 21
Joined: Tue Aug 20, 2019 9:11 am

Re: http url

Post by warp »

Hi all,
I come back to this forum a bit by chance, to see if there are News.
And indeed there are News.
This function to update the power data is really interesting for me since I've never been able to connect my P1 cable to the Toon.
It works flawlessly with my Domoticz installation though, however I would love to see the data directly on the toon.

Setting the data with this url (setrrddata) works perfectly.
I can see the data is effectively in the DB. (and I of course I receive the ok feedback when inserting the data)
I would like now to inject the current power usage, which seems to be outside of the scope of setrrddata, it's probably a live data that is not stored anywhere.
But if someone could help me find the way to do so, it would be really great. (Tell me if opening a new thread would make sense)

For information I have a Toon 1 that I rooted by myself.
I'm currently using it for reading the gas consumption from a good-old gas meter with a good old analog dials.
Thanks.
Warp
Post Reply

Return to “Toon miscellaneous”