Page 2 of 14
Re: Toon app: boiler status
Posted: Tue Nov 21, 2017 10:09 pm
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)
Re: Toon app: boiler status
Posted: Tue Nov 21, 2017 10:21 pm
by marcelr
That's an awful lot of numbers

Re: Toon app: boiler status
Posted: Tue Nov 21, 2017 10:35 pm
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
Re: Toon app: boiler status
Posted: Tue Nov 21, 2017 11:32 pm
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
Re: Toon app: boiler status
Posted: Tue Nov 21, 2017 11:35 pm
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).
Re: Toon app: boiler status
Posted: Thu Nov 23, 2017 3:31 pm
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?
Re: Toon app: boiler status
Posted: Thu Nov 23, 2017 5:18 pm
by marcelr
Is your webroot set correctly in /qmf/etc/qmf_project.xml?
It should read /qmf/www, port 10080.
Re: Toon app: boiler status
Posted: Thu Nov 23, 2017 5:27 pm
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?
Re: Toon app: boiler status
Posted: Fri Nov 24, 2017 1:00 am
by Ierlandfan
For example:
Code: Select all
http://ip_toon:10080/happ_thermstat?action=printTableInfo
What does that do?
Re: Toon app: boiler status
Posted: Fri Nov 24, 2017 12:46 pm
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
Re: Toon app: boiler status
Posted: Fri Nov 24, 2017 2:52 pm
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.
Re: Toon app: boiler status
Posted: Fri Nov 24, 2017 3:15 pm
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?
Re: Toon app: boiler status
Posted: Fri Nov 24, 2017 4:55 pm
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.
Re: Toon app: boiler status
Posted: Sun Nov 26, 2017 12:17 pm
by RDNZL
This is great and works fine!
Did anyone look into an influxdb import scenario yet?
Re: Toon app: boiler status
Posted: Sun Nov 26, 2017 12:52 pm
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?
