Yes, now we are talking:
However, I am not sure what I should inject if I want to retrieve the actual prices of today instead of the "old" prices that I use in the injector of this example?
The Tibber query node just establish connection to the Tibber service, I need to inject a good json line. I did some trying on my own but I dont get good data (rather a error message, TypeError: Cannot read property 'homes' of undefined).
This is probably the last piece of the puzzle. Sorry guys!
[{"id":"f19ab0f8.b0a42","type":"inject","z":"9af8501c.86c62","name":"Inject \"fixed\" fixed input","topic":"","payload":"{\"viewer\":{\"homes\":[{\"currentSubscription\":{\"priceInfo\":{\"today\":[{\"total\":0.1624,\"energy\":0.1104,\"tax\":0.052,\"startsAt\":\"2020-07-02T00:00:00+02:00\"},{\"total\":0.1299,\"energy\":0.0844,\"tax\":0.0455,\"startsAt\":\"2020-07-02T01:00:00+02:00\"},{\"total\":0.111,\"energy\":0.0693,\"tax\":0.0417,\"startsAt\":\"2020-07-02T02:00:00+02:00\"},{\"total\":0.1072,\"energy\":0.0662,\"tax\":0.041,\"startsAt\":\"2020-07-02T03:00:00+02:00\"},{\"total\":0.1213,\"energy\":0.0776,\"tax\":0.0437,\"startsAt\":\"2020-07-02T04:00:00+02:00\"},{\"total\":0.1466,\"energy\":0.0978,\"tax\":0.0488,\"startsAt\":\"2020-07-02T05:00:00+02:00\"},{\"total\":0.1867,\"energy\":0.1299,\"tax\":0.0568,\"startsAt\":\"2020-07-02T06:00:00+02:00\"},{\"total\":0.2217,\"energy\":0.1579,\"tax\":0.0638,\"startsAt\":\"2020-07-02T07:00:00+02:00\"},{\"total\":0.2606,\"energy\":0.189,\"tax\":0.0716,\"startsAt\":\"2020-07-02T08:00:00+02:00\"},{\"total\":0.2571,\"energy\":0.1862,\"tax\":0.0709,\"startsAt\":\"2020-07-02T09:00:00+02:00\"},{\"total\":0.2783,\"energy\":0.2032,\"tax\":0.0751,\"startsAt\":\"2020-07-02T10:00:00+02:00\"},{\"total\":0.2592,\"energy\":0.1879,\"tax\":0.0713,\"startsAt\":\"2020-07-02T11:00:00+02:00\"},{\"total\":0.2445,\"energy\":0.1761,\"tax\":0.0684,\"startsAt\":\"2020-07-02T12:00:00+02:00\"},{\"total\":0.2288,\"energy\":0.1635,\"tax\":0.0653,\"startsAt\":\"2020-07-02T13:00:00+02:00\"},{\"total\":0.2234,\"energy\":0.1592,\"tax\":0.0642,\"startsAt\":\"2020-07-02T14:00:00+02:00\"},{\"total\":0.215,\"energy\":0.1525,\"tax\":0.0625,\"startsAt\":\"2020-07-02T15:00:00+02:00\"},{\"total\":0.2103,\"energy\":0.1488,\"tax\":0.0615,\"startsAt\":\"2020-07-02T16:00:00+02:00\"},{\"total\":0.2082,\"energy\":0.1471,\"tax\":0.0611,\"startsAt\":\"2020-07-02T17:00:00+02:00\"},{\"total\":0.2047,\"energy\":0.1442,\"tax\":0.0605,\"startsAt\":\"2020-07-02T18:00:00+02:00\"},{\"total\":0.199,\"energy\":0.1397,\"tax\":0.0593,\"startsAt\":\"2020-07-02T19:00:00+02:00\"},{\"total\":0.193,\"energy\":0.1349,\"tax\":0.0581,\"startsAt\":\"2020-07-02T20:00:00+02:00\"},{\"total\":0.1867,\"energy\":0.1299,\"tax\":0.0568,\"startsAt\":\"2020-07-02T21:00:00+02:00\"},{\"total\":0.1743,\"energy\":0.1199,\"tax\":0.0544,\"startsAt\":\"2020-07-02T22:00:00+02:00\"},{\"total\":0.1579,\"energy\":0.1068,\"tax\":0.0511,\"startsAt\":\"2020-07-02T23:00:00+02:00\"}]}}}]}}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":280,"wires":[["bfcb622b.401e4"]]},{"id":"bfcb622b.401e4","type":"function","z":"9af8501c.86c62","name":"","func":"msg.topic = msg.payload.viewer.homes[0].currentSubscription.priceInfo.today[0].startsAt.split(\":00+\")[0].split(\"T\")[0];\nmsg.payloadorg = msg.payload;\nmsg.payload = [{\"series\":[\"Totals\"], \"data\": [[]], \"labels\": []}];\nfor ( var i in msg.payloadorg.viewer.homes[0].currentSubscription.priceInfo.today){\n msg.payload[0].data[0][i] = msg.payloadorg.viewer.homes[0].currentSubscription.priceInfo.today[i].total;\n msg.payload[0].labels[i] = msg.payloadorg.viewer.homes[0].currentSubscription.priceInfo.today[i].startsAt.split(\":00+\")[0].split(\"T\")[1];\n}\nreturn msg;","outputs":1,"noerr":0,"x":370,"y":280,"wires":[["f0a3077d.f54248"]]},{"id":"f0a3077d.f54248","type":"ui_chart","z":"9af8501c.86c62","name":"elpriser idag","group":"f92abb1b.7c98d8","order":2,"width":"15","height":"9","label":"{{msg.topic}}","chartType":"bar","legend":"false","xformat":"HH","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":530,"y":280,"wires":[["8a09938b.39991"]]},{"id":"8a09938b.39991","type":"debug","z":"9af8501c.86c62","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":710,"y":280,"wires":[]},{"id":"ec4b43bc.29acf","type":"inject","z":"9af8501c.86c62","name":"Inject real prices","topic":"","payload":"{\"viewer\":{\"homes\":[{\"currentSubscription\":{\"priceInfo\":{\"today\":[{\"total\":0.1624,\"energy\":0.1104,\"tax\":0.052,\"startsAt\":\"2020-07-02T00:00:00+02:00\"},{\"total\":0.1299,\"energy\":0.0844,\"tax\":0.0455,\"startsAt\":\"2020-07-02T01:00:00+02:00\"},{\"total\":0.111,\"energy\":0.0693,\"tax\":0.0417,\"startsAt\":\"2020-07-02T02:00:00+02:00\"},{\"total\":0.1072,\"energy\":0.0662,\"tax\":0.041,\"startsAt\":\"2020-07-02T03:00:00+02:00\"},{\"total\":0.1213,\"energy\":0.0776,\"tax\":0.0437,\"startsAt\":\"2020-07-02T04:00:00+02:00\"},{\"total\":0.1466,\"energy\":0.0978,\"tax\":0.0488,\"startsAt\":\"2020-07-02T05:00:00+02:00\"},{\"total\":0.1867,\"energy\":0.1299,\"tax\":0.0568,\"startsAt\":\"2020-07-02T06:00:00+02:00\"},{\"total\":0.2217,\"energy\":0.1579,\"tax\":0.0638,\"startsAt\":\"2020-07-02T07:00:00+02:00\"},{\"total\":0.2606,\"energy\":0.189,\"tax\":0.0716,\"startsAt\":\"2020-07-02T08:00:00+02:00\"},{\"total\":0.2571,\"energy\":0.1862,\"tax\":0.0709,\"startsAt\":\"2020-07-02T09:00:00+02:00\"},{\"total\":0.2783,\"energy\":0.2032,\"tax\":0.0751,\"startsAt\":\"2020-07-02T10:00:00+02:00\"},{\"total\":0.2592,\"energy\":0.1879,\"tax\":0.0713,\"startsAt\":\"2020-07-02T11:00:00+02:00\"},{\"total\":0.2445,\"energy\":0.1761,\"tax\":0.0684,\"startsAt\":\"2020-07-02T12:00:00+02:00\"},{\"total\":0.2288,\"energy\":0.1635,\"tax\":0.0653,\"startsAt\":\"2020-07-02T13:00:00+02:00\"},{\"total\":0.2234,\"energy\":0.1592,\"tax\":0.0642,\"startsAt\":\"2020-07-02T14:00:00+02:00\"},{\"total\":0.215,\"energy\":0.1525,\"tax\":0.0625,\"startsAt\":\"2020-07-02T15:00:00+02:00\"},{\"total\":0.2103,\"energy\":0.1488,\"tax\":0.0615,\"startsAt\":\"2020-07-02T16:00:00+02:00\"},{\"total\":0.2082,\"energy\":0.1471,\"tax\":0.0611,\"startsAt\":\"2020-07-02T17:00:00+02:00\"},{\"total\":0.2047,\"energy\":0.1442,\"tax\":0.0605,\"startsAt\":\"2020-07-02T18:00:00+02:00\"},{\"total\":0.199,\"energy\":0.1397,\"tax\":0.0593,\"startsAt\":\"2020-07-02T19:00:00+02:00\"},{\"total\":0.193,\"energy\":0.1349,\"tax\":0.0581,\"startsAt\":\"2020-07-02T20:00:00+02:00\"},{\"total\":0.1867,\"energy\":0.1299,\"tax\":0.0568,\"startsAt\":\"2020-07-02T21:00:00+02:00\"},{\"total\":0.1743,\"energy\":0.1199,\"tax\":0.0544,\"startsAt\":\"2020-07-02T22:00:00+02:00\"},{\"total\":0.1579,\"energy\":0.1068,\"tax\":0.0511,\"startsAt\":\"2020-07-02T23:00:00+02:00\"}]}}}]}}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":220,"wires":[["734da5d0.4f332c"]]},{"id":"734da5d0.4f332c","type":"tibber-query","z":"9af8501c.86c62","name":"","active":true,"apiEndpointRef":"f93f16b5.d5efb8","x":330,"y":200,"wires":[["bfcb622b.401e4"]]},{"id":"f92abb1b.7c98d8","type":"ui_group","z":"","name":"Elpris idag","tab":"69a5e334.ac1d1c","order":4,"disp":true,"width":"15","collapse":false},{"id":"f93f16b5.d5efb8","type":"tibber-api-endpoint","z":"","feedUrl":"wss://api.tibber.com/v1-beta/gql/subscriptions","queryUrl":"https://api.tibber.com/v1-beta/gql","name":"Älgstigen 47"},{"id":"69a5e334.ac1d1c","type":"ui_tab","z":"","name":"Hem","icon":"dashboard","order":1,"disabled":false,"hidden":false}]