graph on air quality not rendering

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
checkingnl
Posts: 11
Joined: Thursday 11 October 2018 15:43
Target OS: -
Domoticz version:
Contact:

graph on air quality not rendering

Post by checkingnl »

Hi

not a long time user yet, but having fun a lot creating good dashboard. However, there is one graph that does not get rendered. A block appears with current value and text, but no graph. I'm not a developer, but i can see in graph.js there is no specific case for airquality devices. Is it required to have a case for such type? If yes, is it just defining the variables as done for the other types to get this working?
seems screenshot is not working here 'board quota reached' although this would be my first attachment...??
checkingnl
Posts: 11
Joined: Thursday 11 October 2018 15:43
Target OS: -
Domoticz version:
Contact:

Re: graph on air quality not rendering

Post by checkingnl »

So i tried adding a 'case' for Air Quality, what results in the ? for units changed to my 'ppm' input, so that part did something. However, there is still no graph, did see in desktop browser a script error, but that one i just can't figure out. Will post that error later, maybe someone can give a hint
User avatar
HansieNL
Posts: 957
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: graph on air quality not rendering

Post by HansieNL »

Do you mean airquality from longfonds? If so, those values are not stored in Domoticz database.
Blah blah blah
checkingnl
Posts: 11
Joined: Thursday 11 October 2018 15:43
Target OS: -
Domoticz version:
Contact:

Re: graph on air quality not rendering

Post by checkingnl »

HEy Hansie,
thanks for responding, but no, it's the internal CO2 measures i get from the Netatmo.
Within domoticz, it shows nicely the graph, just not in dashticz..

This error is related to it as far as i can dig (it's gone if i don't include the graph)
Spoiler: show
Uncaught TypeError: Cannot read property '0' of undefined
at eval (eval at globalEval (jquery.min.js:2), <anonymous>:216:71)
at Array.filter (<anonymous>)
at Object.success (eval at globalEval (jquery.min.js:2), <anonymous>:215:52)
at i (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at z (jquery.min.js:4)
at HTMLScriptElement.c (jquery.min.js:4)
at HTMLScriptElement.dispatch (jquery.min.js:3)
at HTMLScriptElement.r.handle (jquery.min.js:3)
content_script_bundle.js:13 Uncaught (in promise) ReferenceError: currentURL is not defined
at then.catch.e (content_script_bundle.js:13)
pointing to line of 'code'
Spoiler: show
graphProperties.data = data.result.filter(function (element) {
return element.hasOwnProperty(graphProperties.keys[0]);
and digging trhough a bit more of dev tools console in chrome i can see the json.html request for the device and data returned
http://192.168.1.32:8089/json.htm?usern ... 5056197787

result data
Spoiler: show
var data={
"result" : [
{
"co2" : "867",
"d" : "2018-12-16 15:15"
},
{
"co2" : "891",
"d" : "2018-12-16 15:20"
},
{
"co2" : "891",
"d" : "2018-12-16 15:25"
},
{
"co2" : "884",
"d" : "2018-12-16 15:30"
},
{
"co2" : "884",
"d" : "2018-12-16 15:35"
},
{
"co2" : "887",
"d" : "2018-12-16 15:40"
},
{
"co2" : "887",
"d" : "2018-12-16 15:45"
},
{
"co2" : "887",
"d" : "2018-12-16 15:50"
},
{
"co2" : "887",
"d" : "2018-12-16 15:55"
},
{
"co2" : "896",
"d" : "2018-12-16 16:00"
},
{
"co2" : "896",
"d" : "2018-12-16 16:05"
},
{
"co2" : "927",
"d" : "2018-12-16 16:10"
},
{
"co2" : "927",
"d" : "2018-12-16 16:15"
},
{
"co2" : "927",
"d" : "2018-12-16 16:20"
},
{
"co2" : "927",
"d" : "2018-12-16 16:25"
},
{
"co2" : "1014",
"d" : "2018-12-16 16:30"
},
{
"co2" : "1014",
"d" : "2018-12-16 16:35"
},
{
"co2" : "1009",
"d" : "2018-12-16 16:40"
},
{
"co2" : "1009",
"d" : "2018-12-16 16:45"
},
{
"co2" : "1016",
"d" : "2018-12-16 16:50"
},
{
"co2" : "1016",
"d" : "2018-12-16 16:55"
},
{
"co2" : "1020",
"d" : "2018-12-16 17:00"
},
{
"co2" : "1020",
"d" : "2018-12-16 17:05"
},
{
"co2" : "951",
"d" : "2018-12-16 17:10"
},
{
"co2" : "951",
"d" : "2018-12-16 17:15"
},
{
"co2" : "900",
"d" : "2018-12-16 17:20"
},
{
"co2" : "900",
"d" : "2018-12-16 17:25"
},
{
"co2" : "966",
"d" : "2018-12-16 17:30"
},
{
"co2" : "966",
"d" : "2018-12-16 17:35"
},
{
"co2" : "926",
"d" : "2018-12-16 17:40"
},
{
"co2" : "926",
"d" : "2018-12-16 17:45"
},
{
"co2" : "1028",
"d" : "2018-12-16 17:50"
},
{
"co2" : "1028",
"d" : "2018-12-16 17:55"
},
{
"co2" : "1008",
"d" : "2018-12-16 18:00"
},
{
"co2" : "1008",
"d" : "2018-12-16 18:05"
},
{
"co2" : "997",
"d" : "2018-12-16 18:10"
},
{
"co2" : "997",
"d" : "2018-12-16 18:15"
},
{
"co2" : "1005",
"d" : "2018-12-16 18:20"
},
{
"co2" : "1005",
"d" : "2018-12-16 18:25"
},
{
"co2" : "1065",
"d" : "2018-12-16 18:30"
},
{
"co2" : "1065",
"d" : "2018-12-16 18:35"
},
{
"co2" : "1077",
"d" : "2018-12-16 18:40"
},
{
"co2" : "1077",
"d" : "2018-12-16 18:45"
},
{
"co2" : "1027",
"d" : "2018-12-16 18:50"
},
{
"co2" : "1027",
"d" : "2018-12-16 18:55"
},
{
"co2" : "1027",
"d" : "2018-12-16 19:00"
},
{
"co2" : "1027",
"d" : "2018-12-16 19:05"
},
{
"co2" : "893",
"d" : "2018-12-16 19:10"
},
{
"co2" : "893",
"d" : "2018-12-16 19:15"
},
{
"co2" : "898",
"d" : "2018-12-16 19:20"
},
{
"co2" : "898",
"d" : "2018-12-16 19:25"
},
{
"co2" : "860",
"d" : "2018-12-16 19:30"
},
{
"co2" : "860",
"d" : "2018-12-16 19:35"
},
{
"co2" : "822",
"d" : "2018-12-16 19:40"
},
{
"co2" : "822",
"d" : "2018-12-16 19:45"
},
{
"co2" : "828",
"d" : "2018-12-16 19:50"
},
{
"co2" : "828",
"d" : "2018-12-16 19:55"
},
{
"co2" : "845",
"d" : "2018-12-16 20:00"
},
{
"co2" : "845",
"d" : "2018-12-16 20:05"
},
{
"co2" : "868",
"d" : "2018-12-16 20:10"
},
{
"co2" : "868",
"d" : "2018-12-16 20:15"
},
{
"co2" : "868",
"d" : "2018-12-16 20:20"
},
{
"co2" : "868",
"d" : "2018-12-16 20:25"
},
{
"co2" : "841",
"d" : "2018-12-16 20:30"
},
{
"co2" : "841",
"d" : "2018-12-16 20:35"
},
{
"co2" : "841",
"d" : "2018-12-16 20:40"
},
{
"co2" : "841",
"d" : "2018-12-16 20:45"
},
{
"co2" : "801",
"d" : "2018-12-16 20:50"
},
{
"co2" : "801",
"d" : "2018-12-16 20:55"
},
{
"co2" : "766",
"d" : "2018-12-16 21:00"
},
{
"co2" : "766",
"d" : "2018-12-16 21:05"
},
{
"co2" : "766",
"d" : "2018-12-16 21:10"
},
{
"co2" : "766",
"d" : "2018-12-16 21:15"
},
{
"co2" : "790",
"d" : "2018-12-16 21:20"
},
{
"co2" : "790",
"d" : "2018-12-16 21:25"
},
{
"co2" : "748",
"d" : "2018-12-16 21:30"
},
{
"co2" : "748",
"d" : "2018-12-16 21:35"
},
{
"co2" : "722",
"d" : "2018-12-16 21:40"
},
{
"co2" : "722",
"d" : "2018-12-16 21:45"
},
{
"co2" : "709",
"d" : "2018-12-16 21:50"
},
{
"co2" : "709",
"d" : "2018-12-16 21:55"
},
{
"co2" : "706",
"d" : "2018-12-16 22:00"
},
{
"co2" : "706",
"d" : "2018-12-16 22:05"
},
{
"co2" : "706",
"d" : "2018-12-16 22:10"
},
{
"co2" : "706",
"d" : "2018-12-16 22:15"
},
{
"co2" : "706",
"d" : "2018-12-16 22:20"
},
{
"co2" : "706",
"d" : "2018-12-16 22:25"
},
{
"co2" : "716",
"d" : "2018-12-16 22:30"
},
{
"co2" : "716",
"d" : "2018-12-16 22:35"
},
{
"co2" : "724",
"d" : "2018-12-16 22:40"
},
{
"co2" : "724",
"d" : "2018-12-16 22:45"
},
{
"co2" : "709",
"d" : "2018-12-16 22:50"
},
{
"co2" : "709",
"d" : "2018-12-16 22:55"
},
{
"co2" : "655",
"d" : "2018-12-16 23:00"
},
{
"co2" : "655",
"d" : "2018-12-16 23:05"
},
{
"co2" : "612",
"d" : "2018-12-16 23:10"
},
{
"co2" : "612",
"d" : "2018-12-16 23:15"
},
{
"co2" : "612",
"d" : "2018-12-16 23:20"
},
{
"co2" : "612",
"d" : "2018-12-16 23:25"
},
{
"co2" : "537",
"d" : "2018-12-16 23:30"
},
{
"co2" : "537",
"d" : "2018-12-16 23:35"
},
{
"co2" : "524",
"d" : "2018-12-16 23:40"
},
{
"co2" : "524",
"d" : "2018-12-16 23:45"
},
{
"co2" : "495",
"d" : "2018-12-16 23:50"
},
{
"co2" : "495",
"d" : "2018-12-16 23:55"
},
{
"co2" : "487",
"d" : "2018-12-17 00:00"
},
{
"co2" : "487",
"d" : "2018-12-17 00:05"
},
{
"co2" : "487",
"d" : "2018-12-17 00:10"
},
{
"co2" : "487",
"d" : "2018-12-17 00:15"
},
{
"co2" : "451",
"d" : "2018-12-17 00:20"
},
{
"co2" : "451",
"d" : "2018-12-17 00:25"
},
{
"co2" : "438",
"d" : "2018-12-17 00:30"
},
{
"co2" : "438",
"d" : "2018-12-17 00:35"
},
{
"co2" : "428",
"d" : "2018-12-17 00:40"
},
{
"co2" : "428",
"d" : "2018-12-17 00:45"
},
{
"co2" : "414",
"d" : "2018-12-17 00:50"
},
{
"co2" : "414",
"d" : "2018-12-17 00:55"
},
{
"co2" : "418",
"d" : "2018-12-17 01:00"
},
{
"co2" : "418",
"d" : "2018-12-17 01:05"
},
{
"co2" : "397",
"d" : "2018-12-17 01:10"
},
{
"co2" : "397",
"d" : "2018-12-17 01:15"
},
{
"co2" : "397",
"d" : "2018-12-17 01:20"
},
{
"co2" : "397",
"d" : "2018-12-17 01:25"
},
{
"co2" : "390",
"d" : "2018-12-17 01:30"
},
{
"co2" : "390",
"d" : "2018-12-17 01:35"
},
{
"co2" : "387",
"d" : "2018-12-17 01:40"
},
{
"co2" : "387",
"d" : "2018-12-17 01:45"
},
{
"co2" : "387",
"d" : "2018-12-17 01:50"
},
{
"co2" : "387",
"d" : "2018-12-17 01:55"
},
{
"co2" : "383",
"d" : "2018-12-17 02:00"
},
{
"co2" : "383",
"d" : "2018-12-17 02:05"
},
{
"co2" : "389",
"d" : "2018-12-17 02:10"
},
{
"co2" : "389",
"d" : "2018-12-17 02:15"
},
{
"co2" : "382",
"d" : "2018-12-17 02:20"
},
{
"co2" : "382",
"d" : "2018-12-17 02:25"
},
{
"co2" : "369",
"d" : "2018-12-17 02:30"
},
{
"co2" : "369",
"d" : "2018-12-17 02:35"
},
{
"co2" : "380",
"d" : "2018-12-17 02:40"
},
{
"co2" : "380",
"d" : "2018-12-17 02:45"
},
{
"co2" : "364",
"d" : "2018-12-17 02:50"
},
{
"co2" : "364",
"d" : "2018-12-17 02:55"
},
{
"co2" : "352",
"d" : "2018-12-17 03:00"
},
{
"co2" : "352",
"d" : "2018-12-17 03:05"
},
{
"co2" : "352",
"d" : "2018-12-17 03:10"
},
{
"co2" : "352",
"d" : "2018-12-17 03:15"
},
{
"co2" : "363",
"d" : "2018-12-17 03:20"
},
{
"co2" : "363",
"d" : "2018-12-17 03:25"
},
{
"co2" : "390",
"d" : "2018-12-17 03:30"
},
{
"co2" : "390",
"d" : "2018-12-17 03:35"
},
{
"co2" : "363",
"d" : "2018-12-17 03:40"
},
{
"co2" : "363",
"d" : "2018-12-17 03:45"
},
{
"co2" : "365",
"d" : "2018-12-17 03:50"
},
{
"co2" : "365",
"d" : "2018-12-17 03:55"
},
{
"co2" : "361",
"d" : "2018-12-17 04:00"
},
{
"co2" : "361",
"d" : "2018-12-17 04:05"
},
{
"co2" : "361",
"d" : "2018-12-17 04:10"
},
{
"co2" : "361",
"d" : "2018-12-17 04:15"
},
{
"co2" : "361",
"d" : "2018-12-17 04:20"
},
{
"co2" : "361",
"d" : "2018-12-17 04:25"
},
{
"co2" : "352",
"d" : "2018-12-17 04:30"
},
{
"co2" : "352",
"d" : "2018-12-17 04:35"
},
{
"co2" : "361",
"d" : "2018-12-17 04:40"
},
{
"co2" : "361",
"d" : "2018-12-17 04:45"
},
{
"co2" : "361",
"d" : "2018-12-17 04:50"
},
{
"co2" : "361",
"d" : "2018-12-17 04:55"
},
{
"co2" : "358",
"d" : "2018-12-17 05:00"
},
{
"co2" : "358",
"d" : "2018-12-17 05:05"
},
{
"co2" : "356",
"d" : "2018-12-17 05:10"
},
{
"co2" : "356",
"d" : "2018-12-17 05:15"
},
{
"co2" : "353",
"d" : "2018-12-17 05:20"
},
{
"co2" : "353",
"d" : "2018-12-17 05:25"
},
{
"co2" : "353",
"d" : "2018-12-17 05:30"
},
{
"co2" : "353",
"d" : "2018-12-17 05:35"
},
{
"co2" : "353",
"d" : "2018-12-17 05:40"
},
{
"co2" : "353",
"d" : "2018-12-17 05:45"
},
{
"co2" : "355",
"d" : "2018-12-17 05:50"
},
{
"co2" : "355",
"d" : "2018-12-17 05:55"
},
{
"co2" : "353",
"d" : "2018-12-17 06:00"
},
{
"co2" : "353",
"d" : "2018-12-17 06:05"
},
{
"co2" : "354",
"d" : "2018-12-17 06:10"
},
{
"co2" : "354",
"d" : "2018-12-17 06:15"
},
{
"co2" : "349",
"d" : "2018-12-17 06:20"
},
{
"co2" : "349",
"d" : "2018-12-17 06:25"
},
{
"co2" : "349",
"d" : "2018-12-17 06:30"
},
{
"co2" : "349",
"d" : "2018-12-17 06:35"
},
{
"co2" : "356",
"d" : "2018-12-17 06:40"
},
{
"co2" : "356",
"d" : "2018-12-17 06:45"
},
{
"co2" : "350",
"d" : "2018-12-17 06:50"
},
{
"co2" : "350",
"d" : "2018-12-17 06:55"
},
{
"co2" : "350",
"d" : "2018-12-17 07:00"
},
{
"co2" : "350",
"d" : "2018-12-17 07:05"
},
{
"co2" : "359",
"d" : "2018-12-17 07:10"
},
{
"co2" : "359",
"d" : "2018-12-17 07:15"
},
{
"co2" : "481",
"d" : "2018-12-17 07:20"
},
{
"co2" : "481",
"d" : "2018-12-17 07:25"
},
{
"co2" : "382",
"d" : "2018-12-17 07:30"
},
{
"co2" : "382",
"d" : "2018-12-17 07:35"
},
{
"co2" : "382",
"d" : "2018-12-17 07:40"
},
{
"co2" : "382",
"d" : "2018-12-17 07:45"
},
{
"co2" : "454",
"d" : "2018-12-17 07:50"
},
{
"co2" : "454",
"d" : "2018-12-17 07:55"
},
{
"co2" : "548",
"d" : "2018-12-17 08:00"
},
{
"co2" : "548",
"d" : "2018-12-17 08:05"
},
{
"co2" : "548",
"d" : "2018-12-17 08:10"
},
{
"co2" : "548",
"d" : "2018-12-17 08:15"
},
{
"co2" : "572",
"d" : "2018-12-17 08:20"
},
{
"co2" : "572",
"d" : "2018-12-17 08:25"
},
{
"co2" : "572",
"d" : "2018-12-17 08:30"
},
{
"co2" : "572",
"d" : "2018-12-17 08:35"
},
{
"co2" : "585",
"d" : "2018-12-17 08:40"
},
{
"co2" : "585",
"d" : "2018-12-17 08:45"
},
{
"co2" : "584",
"d" : "2018-12-17 08:50"
},
{
"co2" : "584",
"d" : "2018-12-17 08:55"
},
{
"co2" : "598",
"d" : "2018-12-17 09:00"
},
{
"co2" : "598",
"d" : "2018-12-17 09:05"
},
{
"co2" : "599",
"d" : "2018-12-17 09:10"
},
{
"co2" : "599",
"d" : "2018-12-17 09:15"
},
{
"co2" : "596",
"d" : "2018-12-17 09:20"
},
{
"co2" : "596",
"d" : "2018-12-17 09:25"
},
{
"co2" : "606",
"d" : "2018-12-17 09:30"
},
{
"co2" : "606",
"d" : "2018-12-17 09:35"
},
{
"co2" : "615",
"d" : "2018-12-17 09:40"
},
{
"co2" : "615",
"d" : "2018-12-17 09:45"
},
{
"co2" : "600",
"d" : "2018-12-17 09:50"
},
{
"co2" : "600",
"d" : "2018-12-17 09:55"
},
{
"co2" : "660",
"d" : "2018-12-17 10:00"
},
{
"co2" : "660",
"d" : "2018-12-17 10:05"
},
{
"co2" : "651",
"d" : "2018-12-17 10:10"
},
{
"co2" : "651",
"d" : "2018-12-17 10:15"
},
{
"co2" : "636",
"d" : "2018-12-17 10:20"
},
{
"co2" : "636",
"d" : "2018-12-17 10:25"
},
{
"co2" : "634",
"d" : "2018-12-17 10:30"
},
{
"co2" : "634",
"d" : "2018-12-17 10:35"
},
{
"co2" : "658",
"d" : "2018-12-17 10:40"
},
{
"co2" : "658",
"d" : "2018-12-17 10:45"
},
{
"co2" : "643",
"d" : "2018-12-17 10:50"
},
{
"co2" : "643",
"d" : "2018-12-17 10:55"
},
{
"co2" : "639",
"d" : "2018-12-17 11:00"
},
{
"co2" : "639",
"d" : "2018-12-17 11:05"
},
{
"co2" : "639",
"d" : "2018-12-17 11:10"
},
{
"co2" : "639",
"d" : "2018-12-17 11:15"
},
{
"co2" : "676",
"d" : "2018-12-17 11:20"
},
{
"co2" : "676",
"d" : "2018-12-17 11:25"
},
{
"co2" : "681",
"d" : "2018-12-17 11:30"
},
{
"co2" : "681",
"d" : "2018-12-17 11:35"
},
{
"co2" : "698",
"d" : "2018-12-17 11:40"
},
{
"co2" : "698",
"d" : "2018-12-17 11:45"
},
{
"co2" : "693",
"d" : "2018-12-17 11:50"
},
{
"co2" : "693",
"d" : "2018-12-17 11:55"
},
{
"co2" : "686",
"d" : "2018-12-17 12:00"
},
{
"co2" : "686",
"d" : "2018-12-17 12:05"
},
{
"co2" : "665",
"d" : "2018-12-17 12:10"
},
{
"co2" : "665",
"d" : "2018-12-17 12:15"
},
{
"co2" : "586",
"d" : "2018-12-17 12:20"
},
{
"co2" : "586",
"d" : "2018-12-17 12:25"
},
{
"co2" : "599",
"d" : "2018-12-17 12:30"
},
{
"co2" : "599",
"d" : "2018-12-17 12:35"
},
{
"co2" : "599",
"d" : "2018-12-17 12:40"
},
{
"co2" : "599",
"d" : "2018-12-17 12:45"
},
{
"co2" : "591",
"d" : "2018-12-17 12:50"
},
{
"co2" : "591",
"d" : "2018-12-17 12:55"
},
{
"co2" : "632",
"d" : "2018-12-17 13:00"
},
{
"co2" : "632",
"d" : "2018-12-17 13:05"
},
{
"co2" : "676",
"d" : "2018-12-17 13:10"
},
{
"co2" : "676",
"d" : "2018-12-17 13:15"
},
{
"co2" : "715",
"d" : "2018-12-17 13:20"
},
{
"co2" : "715",
"d" : "2018-12-17 13:25"
},
{
"co2" : "731",
"d" : "2018-12-17 13:30"
},
{
"co2" : "731",
"d" : "2018-12-17 13:35"
},
{
"co2" : "713",
"d" : "2018-12-17 13:40"
},
{
"co2" : "713",
"d" : "2018-12-17 13:45"
},
{
"co2" : "664",
"d" : "2018-12-17 13:50"
},
{
"co2" : "664",
"d" : "2018-12-17 13:55"
},
{
"co2" : "631",
"d" : "2018-12-17 14:00"
},
{
"co2" : "631",
"d" : "2018-12-17 14:05"
},
{
"co2" : "640",
"d" : "2018-12-17 14:10"
},
{
"co2" : "640",
"d" : "2018-12-17 14:15"
},
{
"co2" : "688",
"d" : "2018-12-17 14:20"
},
{
"co2" : "688",
"d" : "2018-12-17 14:25"
},
{
"co2" : "652",
"d" : "2018-12-17 14:30"
},
{
"co2" : "652",
"d" : "2018-12-17 14:35"
},
{
"co2" : "685",
"d" : "2018-12-17 14:40"
},
{
"co2" : "685",
"d" : "2018-12-17 14:45"
},
{
"co2" : "705",
"d" : "2018-12-17 14:50"
},
{
"co2" : "705",
"d" : "2018-12-17 14:55"
},
{
"co2" : "682",
"d" : "2018-12-17 15:00"
},
{
"co2" : "682",
"d" : "2018-12-17 15:05"
},
{
"co2" : "646",
"d" : "2018-12-17 15:10"
},
{
"co2" : "646",
"d" : "2018-12-17 15:15"
}
],
"status" : "OK",
"title" : "Graph counter day"
}

jQuery22408351962433168822_1545056197786(data);
checkingnl
Posts: 11
Joined: Thursday 11 October 2018 15:43
Target OS: -
Domoticz version:
Contact:

Re: graph on air quality not rendering

Post by checkingnl »

got it figured, had to add some more stuff for co2 specific in graph.js

} else if (result.hasOwnProperty('co2')) {
graphProperties = {
keys: ['co2'],
labels: ['ppm'],
};


now graph is showing data nicely
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest