Hi, I am hoping that some of you smart folk out there can help me with this…
I recently got an Ecowitt 2000 gateway (weather station). I want to retrieve the current data from it directly and use that in HomeAssistant.
To retrieve the data I simply make a call to http://192.168.20.210/get_livedata_info and this returns the following JSON (trimmed down a little to keep this post shorter)
{
"common_list": [
{
"id": "0x02",
"val": "19.4",
"unit": "C"
},
{
"id": "0x07",
"val": "70%"
},
{
"id": "3",
"val": "19.4",
"unit": "C"
},
{
"id": "0x05",
"val": "21.0",
"unit": "C"
}
],
"piezoRain": [
{
"id": "0x0D",
"val": "0.0 mm"
},
{
"id": "0x0E",
"val": "0.0 mm/Hr"
}
],
"wh25": [
{
"intemp": "22.9",
"unit": "C",
"inhumi": "62%",
"abs": "1013.7 hPa",
"rel": "1013.7 hPa"
}
]
}
The outdoor temperature is id 0x02
I am using the following in my configuration to try and get the temperature value (which I pieced together from some posts from other people doing similar things
rest:
- scan_interval: 60
resource: http://192.168.20.210/get_livedata_info
sensor:
- name: "Ecowitt Outdoor Temp"
json_attributes_path: "$..[?(@.id==2)]"
value_template: "OK"
json_attributes:
- "id"
- "val"
- "unit"
but unfortunately the result never gives me the attributes… I get a status (of “OK” - from the value_template) and I get a friendly_name attribute (of “Ecowitt Outdoor Temp” - from the sensor name)
Can anyone tell me what is is that I am doing wrong here… as far as I can tell (from this post here) what I have should be giving me the temperature value/unit etc