Hi. I will try to help. It was i while ago and when i look at this today i have some problem understand how i figured it out. Well. I’ll give it a shot…
I will copy from my mysensors.json-file.
This particular node have the node id 78.
When i look in my mysensors.json-file i do it in terminal with nano.
This give me my file printer in one row.
Here it is formatted json-style
I have commented after #<— in the code below.
"78":{
"protocol_version":"2.1.1",
"sensor_id":78,
"sketch_name":"Energy Meter",
"children":{
"1":{
"values":{
"17":"1250" #<--- here i get Watt right now.
},
"id":1,
"description":"",
"type":13 #<--- this is the value type. 13 means S_POWER (WATT, KWH)
},
"2":{
"values":{
"18":"42.6160" #<--- here i get kwh over time
},
"id":2,
"description":"",
"type":13
},
"3":{
"values":{
"24":"42616" #<--- this is the pulse counter.
},
"id":3,
"description":"",
"type":23 #<--- value type S_CUSTOM
}
},
"battery_level":0,
"sketch_version":"1.0",
"type":17
}
If this should work, you need to copy my sketch in the link above so you get the right vaue type.
Try to use this and edit it to match your node id and node name.
Set all values to 0 or 1 to start from the beginning.
You should delete #— and the text after.
Here is from my mysensors.json-file unfromatted in just one line…
"78": {"protocol_version": "2.1.1", "sensor_id": 78, "sketch_name": "Energy Meter", "children": {"1": {"values": {"17": "1250"}, "id": 1, "description": "", "type": 13}, "2": {"values": {"18": "42.6160"}, "id": 2, "description": "", "type": 13}, "3": {"values": {"24": "42616"}, "id": 3, "description": "", "type": 23}}, "battery_level": 0, "sketch_version": "1.0", "type": 17}}
Check this site to get all value types.