creating graphs based on the available Toon webservices

If your (rooted) Toon doesn't do what it's supposed to, post here. Dutch allowed / Posten in 't Nederlands toegestaan.

Moderators: marcelr, TheHogNL, Toonz

Post Reply
jerver
Starting Member
Starting Member
Posts: 19
Joined: Wed Feb 06, 2019 5:01 pm

creating graphs based on the available Toon webservices

Post by jerver »

Based on the information in this post viewtopic.php?f=99&t=11671&hilit=rrd+co ... =30#p84364 I am experimenting with graph tools like Grafana or Google graphs to create a nice overview of the historical data in my Toon on my local webserver.

I am stuck in parsing the output data because the format is not plain json (only values without attributes):

Code: Select all

{ "28-05-2020 02:00:00": 42286,"09-06-2020 02:00:00": 245990,"21-06-2020 02:00:00": 407340,"03-07-2020 02:00:00": 605033,"15-07-2020 02:00:00": 752018,"27-07-2020 02:00:00": 918115,"08-08-2020 02:00:00": 1116298,"20-08-2020 02:00:00": 1297054,"01-09-2020 02:00:00": 1410707,"13-09-2020 02:00:00": 1520067,"25-09-2020 02:00:00": 1695973,"07-10-2020 02:00:00": 1762527,"19-10-2020 02:00:00": 1830729,"31-10-2020 01:00:00": 1879163,"12-11-2020 01:00:00": 1955781,"24-11-2020 01:00:00": 1989700,"06-12-2020 01:00:00": 2018634,"18-12-2020 01:00:00": 2042712,"30-12-2020 01:00:00": 2070929,"11-01-2021 01:00:00": 2087527,"23-01-2021 01:00:00": 2116655,"04-02-2021 01:00:00": 2165957,"16-02-2021 01:00:00": 2229368,"28-02-2021 01:00:00": 2331331,"12-03-2021 01:00:00": 7362083}
I am not so experienced with json and webservices, so I appreciate it very much if someone can set me in the right direction, or maybe someone has already fixed this and is willing to share the code. If there are alternative approaches I am also happy to hear your suggestions. Thx!
glsf91
Member
Member
Posts: 184
Joined: Fri Sep 15, 2017 9:25 pm

Re: creating graphs based on the available Toon webservices

Post by glsf91 »

jerver wrote:Based on the information in this post viewtopic.php?f=99&t=11671&hilit=rrd+co ... =30#p84364 I am experimenting with graph tools like Grafana or Google graphs to create a nice overview of the historical data in my Toon on my local webserver.

I am stuck in parsing the output data because the format is not plain json (only values without attributes):

Code: Select all

{ "28-05-2020 02:00:00": 42286,"09-06-2020 02:00:00": 245990,"21-06-2020 02:00:00": 407340,"03-07-2020 02:00:00": 605033,"15-07-2020 02:00:00": 752018,"27-07-2020 02:00:00": 918115,"08-08-2020 02:00:00": 1116298,"20-08-2020 02:00:00": 1297054,"01-09-2020 02:00:00": 1410707,"13-09-2020 02:00:00": 1520067,"25-09-2020 02:00:00": 1695973,"07-10-2020 02:00:00": 1762527,"19-10-2020 02:00:00": 1830729,"31-10-2020 01:00:00": 1879163,"12-11-2020 01:00:00": 1955781,"24-11-2020 01:00:00": 1989700,"06-12-2020 01:00:00": 2018634,"18-12-2020 01:00:00": 2042712,"30-12-2020 01:00:00": 2070929,"11-01-2021 01:00:00": 2087527,"23-01-2021 01:00:00": 2116655,"04-02-2021 01:00:00": 2165957,"16-02-2021 01:00:00": 2229368,"28-02-2021 01:00:00": 2331331,"12-03-2021 01:00:00": 7362083}
I am not so experienced with json and webservices, so I appreciate it very much if someone can set me in the right direction, or maybe someone has already fixed this and is willing to share the code. If there are alternative approaches I am also happy to hear your suggestions. Thx!
The loggerName you used is specifying what you are requesting. There are no attributes. I you ask for gas usage you get a json with the timestamps and the gas usage value for that timestamp.
So you have to put this data in a database and use grafana to report.
jerver
Starting Member
Starting Member
Posts: 19
Joined: Wed Feb 06, 2019 5:01 pm

Re: creating graphs based on the available Toon webservices

Post by jerver »

What I am trying to do is to bypass an extra database and read the json data directly from Grafana (or alternative reporting tool).
Grafana has functionality to parse json data directly, but the format which is delivered from Toon makes it more complex. I am wondering if and how this can be achieved.
glsf91
Member
Member
Posts: 184
Joined: Fri Sep 15, 2017 9:25 pm

Re: creating graphs based on the available Toon webservices

Post by glsf91 »

jerver wrote:What I am trying to do is to bypass an extra database and read the json data directly from Grafana (or alternative reporting tool).
Grafana has functionality to parse json data directly, but the format which is delivered from Toon makes it more complex. I am wondering if and how this can be achieved.
I don't know if that is a good idea. you have to request every time the data again if you do something with the graph(s). This will stress the Toon if you request a lot of data when playing with the graphs.
In this case you have to put something in between to make an conversion. Maybe you can use NodeRed for this.
And do you need OpenApi for this json plugin? Toon is not supporting this open api.
jerver
Starting Member
Starting Member
Posts: 19
Joined: Wed Feb 06, 2019 5:01 pm

Re: creating graphs based on the available Toon webservices

Post by jerver »

Indeed if it stresses the Toon too much it is better to have a database in between.
I will go that way. Thanks for your advise.
Post Reply

Return to “Toon issues and support (Nederlands toegestaan)”