I’ve been trying to read data from the ABB Auroravision platform using a JSON query to their service. I can authenticate and retrieve the JSON, but I’m having issues filtering it and have been going in circles trying to get the right configuration.
I’ve removed some of the personally identifiable information so please ignore the brackets.
Desired Outcome: I’m trying to get the “Today” KWH value so I can display it as part of my dashboard.
Current Platform Configuration:
- platform: rest
name: Aurora_API
resource: https://easyview.auroravision.net/easyview/services/gmi/summary/PlantEnergy.json?eids=<ID Goes Here>
username: <Account Goes Here>
password: <Password Goes Here>
authentication: basic
scan_interval: 900
Current Returned JSON:
{"status":"SUCCESS","fields":[
{"type":"instant","field":"GenerationPower","label":"now","entityId":111,"entityName":"Residence","timeZone":"ACT","units":"kilowatts","parameters":[],"start":1567824300000,"startLabel":"2019-09-07 12:15:00 CST","end":1567824300000,"endLabel":"2019-09-07 12:15:00 CST","value":"3.018246582031"},
{"type":"window","field":"GenerationEnergy","label":"today","entityId":111,"entityName":"Residence","timeZone":"ACT","units":"kilowatt-hours","parameters":[{"value":"60","name":"DataItem.now.maxCacheAge"},{"value":"true","name":"SummaryRequest"}],"start":1567753200000,"startLabel":"20190906163000","end":1567824625333,"endLabel":"20190907122025","sampleStart":1567753201000,"sampleStartLabel":"20190906163001","sampleEnd":1567824300000,"sampleEndLabel":"20190907121500","value":"14.762"},
{"type":"window","field":"GenerationEnergy","label":"week","entityId":111,"entityName":"Residence","timeZone":"ACT","units":"kilowatt-hours","parameters":[{"value":"60","name":"DataItem.now.maxCacheAge"},{"value":"true","name":"SummaryRequest"}],"start":1567321200000,"startLabel":"20190901163000","end":1567824625333,"endLabel":"20190907122025","sampleStart":1567321212000,"sampleStartLabel":"20190901163012","sampleEnd":1567824300000,"sampleEndLabel":"20190907121500","value":"121.37"},
{"type":"window","field":"GenerationEnergy","label":"month","entityId":111,"entityName":"Residence","timeZone":"ACT","units":"kilowatt-hours","parameters":[{"value":"60","name":"DataItem.now.maxCacheAge"},{"value":"true","name":"SummaryRequest"}],"start":1567321200000,"startLabel":"20190901163000","end":1567824625333,"endLabel":"20190907122025","sampleStart":1567321212000,"sampleStartLabel":"20190901163012","sampleEnd":1567824300000,"sampleEndLabel":"20190907121500","value":"121.37"},
{"type":"window","field":"GenerationEnergy","label":"lifetime","entityId":111,"entityName":"Residence","timeZone":"ACT","units":"kilowatt-hours","parameters":[{"value":"60","name":"DataItem.now.maxCacheAge"},{"value":"true","name":"SummaryRequest"}],"start":631152000000,"startLabel":"19900101093000","end":1567824625333,"endLabel":"20190907122025","sampleStart":1561694992000,"sampleStartLabel":"20190628133952","sampleEnd":1567824300000,"sampleEndLabel":"20190907121500","value":"1164.833"}]
,"timestamp":1567824625562}
I’ve played around with the sensors and using “value_template” but I’m doing my head in. I can get the right value by placing “{{ my_test_json.fields[1].value }}” in the template test area, but the configuration.yaml doesn’t want to play ball (and I don’t like using static array identifiers in case ABB change the ordering).
Any help (brutal or otherwise) would be much appreciated. It will be something simple I’m missing.