Data not coming through
Opened this issue · 4 comments
Hi, thanks for setting up these nodes.
I've tried using them but the messages are not coming through.
The 'raw' and 'json' debug nodes register the messages just fine, but the 'sensor_json' is not picking up anything.
I've double checked the sids in the configurator, and the nodes pick up the configurator OK:
From /var/log/syslog I do see what appear valid events up to that point:
Feb 28 13:03:20 raspberrypi Node-RED[11734]: 28 Feb 13:03:20 - [info] [xiaomi-ht:sensor_terras] Received message from: weather.v1 sid: (sid_of_sensor_terras) payload: {"temperature":"1091"}
Feb 28 13:03:20 raspberrypi Node-RED[11734]: 28 Feb 13:03:20 - [info] [xiaomi-ht:sensor_garage] Received message from: weather.v1 sid: (sid_of_sensor_terras) payload: {"temperature":"1091"}
Feb 28 13:03:20 raspberrypi Node-RED[11734]: 28 Feb 13:03:20 - [info] [xiaomi-ht:sensor_slaapkamer_si] Received message from: weather.v1 sid: (sid_of_sensor_terras) payload: {"temperature":"1091"}
Feb 28 13:03:20 raspberrypi Node-RED[11734]: 28 Feb 13:03:20 - [info] [xiaomi-ht:sensor_slaapkamer_ir] Received message from: weather.v1 sid: (sid_of_sensor_terras) payload: {"temperature":"1091"}
Seems model names have changed, local fix e.g.:
< if (payload.sid == node.sid && (payload.model == "motion") {
> if (payload.sid == node.sid && (payload.model == "motion" || payload.model == "sensor_motion.aq2")) {
Hi. I had to rename "weather.v1 to "sensor_ht" to get it to work.
Please make it possible to configure the temperature node to different sensor model and even include the 3rd output pressure as my Aqara sensors have temperature, humidity and pressure.
Original message that does not work:
"cmd":"report","model":"weather.v1","sid":"158d00044afb","short_id":65098,"data":"{"temperature":"2467"}"}
Modified message that works.
"cmd":"report","model":"sensor_ht","sid":"158d00044afb","short_id":65098,"data":"{"temperature":"2467"}"}
I use a function node between the json node and the temperature node to change it so it works with temperature node.