Toon app: boiler status

Forum about forum-provided applications on Toon

Moderators: marcelr, TheHogNL, Toonz

Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: boiler status

Post by Toonz »

If you don't want to use a form but want to retrieve the data directly use this url:

Code: Select all

http://192.168.x.x/hcb_rrd?action=getRrdData&loggerName=thermstat_boilerChPressure&rra=year
of course you can replace the loggerName and rra values to any variable you want (as long as they are defined in /HCBv2/config/config_hcb_rrd.xml)
member of the Toon Software Collective
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Toon app: boiler status

Post by marcelr »

That's an awful lot of numbers ;-)
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: boiler status

Post by Toonz »

you can limit the number of samples with the 'sample' parameter and have the epoch dates converted to something readable ;-) :

Code: Select all

http://192.168.x.x/hcb_rrd?action=getRrdData&loggerName=thermstat_boilerChPressure&rra=year&readableTime=1&samples=100
In this case you get 100 values evenly spread across the year, extremely convenient for building graphs.
I will check the full list of supported parameters
member of the Toon Software Collective
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: boiler status

Post by Toonz »

I believe these are the parameters you can use in the http call which I have successfully tested:

readableTime (values 0 or 1 - converts Epoch to normal time
skipEmpty (values 0 or 1 - skips null value readings)
nullForNaN (values 0 or 1 - shows null instead of NaN)
loggerName (string without quotes)
rra (string without quotes)
from (epoch time)
to (epoch time)
samples (integer value - determines how many values you will receive back)

Example:

Code: Select all

http://192.168.x.x/hcb_rrd?action=getRrdData&loggerName=thermstat_boilerChPressure&rra=year&readableTime=1&samples=100&nullForNaN=1&from=1504301154&to=1509301154&skipEmpty=1
More parameters exist but these are for the function setRrdData with which you can create rra data yourself
member of the Toon Software Collective
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Toon app: boiler status

Post by marcelr »

Toonz wrote: More parameters exist but these are for the function setRrdData with which you can create rra data yourself
Could be useful for generating your own databases (with stuff from other equipment inside your home).
gielie
Member
Member
Posts: 70
Joined: Thu Nov 02, 2017 11:06 am

Re: Toon app: boiler status

Post by gielie »

Toonz wrote:No need to chmod +x the file.

Have you used to correct url (without the port number): e.g. http://192.168.x.x/hcb_rrd/ReadRRD.html?
Is the Toon webserver running properly?

Or do you mean you get that back as the source? Which is correct.
You will get the dataset back when you press the SEND button on the webpage.
I get the content of the html info back as plain text, there i must be doing something wrong.
I dont get a webpage with a send button or something, how do i check if my webserver runs properly?
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Toon app: boiler status

Post by marcelr »

Is your webroot set correctly in /qmf/etc/qmf_project.xml?

It should read /qmf/www, port 10080.
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: boiler status

Post by Toonz »

gielie wrote:I get the content of the html info back as plain text, there i must be doing something wrong.
I dont get a webpage with a send button or something, how do i check if my webserver runs properly?
Do you get proper numbers back if you use the other URL which doesn't require the html page on Toon?
member of the Toon Software Collective
Ierlandfan
Member
Member
Posts: 151
Joined: Thu Oct 03, 2013 7:53 pm

Re: Toon app: boiler status

Post by Ierlandfan »

For example:

Code: Select all

http://ip_toon:10080/happ_thermstat?action=printTableInfo
What does that do?
gielie
Member
Member
Posts: 70
Joined: Thu Nov 02, 2017 11:06 am

Re: Toon app: boiler status

Post by gielie »

Ok, when i use the port number in the url it does work, i don't know why.
so i use this; http://192.168.1.15:10080/hcb_rrd/ReadRRD.html
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Toon app: boiler status

Post by marcelr »

Because the http server does not serve on the default http port (80) but on 10080 instead.
So you have to state the port number in the http request.
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: boiler status

Post by Toonz »

marcelr wrote:Because the http server does not serve on the default http port (80) but on 10080 instead.
So you have to state the port number in the http request.
why does it work with me without the port number?
member of the Toon Software Collective
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Toon app: boiler status

Post by marcelr »

Toonz wrote: why does it work with me without the port number?
Probably because the server port numbers as set in the server configuration and the project file are the same.
Sometimes one has 7080, the other 10080. When that's the case, you have to state the port number in the request.
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Toon app: boiler status

Post by RDNZL »

This is great and works fine!
Did anyone look into an influxdb import scenario yet?
Regards, Ron.
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: boiler status

Post by Toonz »

RDNZL wrote:This is great and works fine!
Did anyone look into an influxdb import scenario yet?
Don't have a clue what your asking for to be honest. Influxdb? import into what? :wink:
member of the Toon Software Collective
Post Reply

Return to “Toon Apps”