Closed petterl closed 3 years ago
The data.json is correct. Looks like the Aidon meter. Which application do you use to read the json data?
Dont worry about the log.txt, it looks it was filled during startup.
Yes its an aidon meter from tekniska verken. I was planning to Use it in HASS. How to I setup the sensors for this?
For Home Assistant, try using this in your configuration.yaml:
sensor:
- platform: rest
resource: http://emeter.local/data.json
name: electricity_meter
scan_interval: 10
value_template: 'OK'
json_attributes:
- payload
- platform: template
sensors:
p1_current:
friendly_name: 'P1 Current'
value_template: '{{ states.sensor.electricity_meter.attributes["payload"]["01001F0700FF"][0] | float/10 }}'
p2_current:
friendly_name: 'P2 Current'
value_template: '{{ states.sensor.electricity_meter.attributes["payload"]["0100330700FF"][0] | float/10 }}'
p3_current:
friendly_name: 'P3 Current'
value_template: '{{ states.sensor.electricity_meter.attributes["payload"]["0100470700FF"][0] | float/10 }}'
I setup the emeter but dont get the correct data as the examples. There could be hw issues and error in connections, but I get data to data.json
{"elapsedtime":390288,"rssi":-75,"mac":"48:3F:DA:01:31:1E","localip":"192.168.1.200","ssid":"petter@sandholdt.se","header":{"encoding":"A-XDR","frameformat":3,"segmentation":0,"datalength":579,"client":65,"server":2179,"control":19,"hcs":"eb85","fcs":"cb30","llc":"e6e700"},"apdu":{"tag":15,"liiap":"40000000","datetime":"00"},"payload":{"0000010000FF":["07E502140615050AFF8000FF"],"0100010700FF":[1136,[0,"W"]],"0100020700FF":[0,[0,"W"]],"0100030700FF":[0,[0,"var"]],"0100040700FF":[685,[0,"var"]],"01001F0700FF":[21,[-1,"A"]],"0100330700FF":[18,[-1,"A"]],"0100470700FF":[18,[-1,"A"]],"0100200700FF":[2298,[-1,"V"]],"0100340700FF":[2300,[-1,"V"]],"0100480700FF":[2316,[-1,"V"]],"0100150700FF":[472,[0,"W"]],"0100160700FF":[0,[0,"W"]],"0100170700FF":[0,[0,"var"]],"0100180700FF":[127,[0,"var"]],"0100290700FF":[277,[0,"W"]],"01002A0700FF":[0,[0,"W"]],"01002B0700FF":[0,[0,"var"]],"01002C0700FF":[323,[0,"var"]],"01003D0700FF":[372,[0,"W"]],"01003E0700FF":[0,[0,"W"]],"01003F0700FF":[0,[0,"var"]],"0100400700FF":[214,[0,"var"]],"0100010800FF":[3344019,[0,"Wh"]],"0100020800FF":[0,[0,"Wh"]],"0100030800FF":[77281,[0,"varh"]],"0100040800FF":[639546,[0,"varh"]]}}
and log.txt: