http url

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

Moderators: marcelr, TerrorSource, Toonz, TheHogNL

http url

Postby mAiden » Wed Aug 15, 2018 10: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: 330
Joined: July 2017

Re: http url

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

TerrorSource
Administrator
Administrator
 
Posts: 494
Joined: May 2017

Re: http url

Postby mAiden » Wed Aug 15, 2018 11: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: 330
Joined: July 2017

Re: http url

Postby TerrorSource » Wed Aug 15, 2018 11: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
Administrator
Administrator
 
Posts: 494
Joined: May 2017

Re: http url

Postby Toonz » Thu Aug 16, 2018 4: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
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1679
Joined: December 2016

Re: http url

Postby georon » Thu Feb 07, 2019 10: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: 20
Joined: July 2017

Re: http url

Postby vso » Thu May 21, 2020 5: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 6: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
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1679
Joined: December 2016

Re: http url

Postby vso » Tue May 26, 2020 5: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 10: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
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1679
Joined: December 2016

Re: http url

Postby Toonz » Wed Dec 30, 2020 3: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
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1679
Joined: December 2016

Re: http url

Postby warp » Mon Sep 06, 2021 12:07 pm

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
warp
Starting Member
Starting Member
 
Posts: 21
Joined: August 2019


Return to Toon miscellaneous

Who is online

Users browsing this forum: No registered users and 1 guest