NorthernMan54 / homebridge-rtl

Homebridge Plugin for rtl_433 devices
MIT License
22 stars 10 forks source link

Acurite 5-in-1 support #14

Open Londo-Mollari opened 3 years ago

Londo-Mollari commented 3 years ago

First, thanks NorthernMan54 for this plugin. It opened my eyes to all of the data out there on 433MHz.

Second, your plugin does work with the Acurite 5-in-1 weather station. It does generate some logfile errors when so configured, though. Not really a problem.

Sample 5-in-1 JSON:

[04/08/2021, 20:23:49] [rtl_433] FYI: Message from unknown device ID 550
[04/08/2021, 20:23:49] [rtl_433] Message {"time" : "2021-08-04 20:23:48", "model" : "Acurite-5n1", "message_type" : 49, "id" : 550, "channel" : "C", "sequence_num" : 2, "battery_ok" : 0, "wind_avg_km_h" : 0.000, "wind_dir_deg" : 157.500, "rain_mm" : 19.812, "mic" : "CHECKSUM"}
[04/08/2021, 20:24:07] [rtl_433] FYI: Message from unknown device ID 550
[04/08/2021, 20:24:07] [rtl_433] Message {"time" : "2021-08-04 20:24:06", "model" : "Acurite-5n1", "message_type" : 56, "id" : 550, "channel" : "C", "sequence_num" : 0, "battery_ok" : 1, "wind_avg_km_h" : 0.000, "temperature_C" : 21.000, "humidity" : 86, "mic" : "CHECKSUM"}

The batteries on my unit are low, and you'll note above the unit actually sends a battery low and a battery ok signal. I believe one is ignored by the Acurite display base. The battery feature does work ok on your plugin, so perhaps the last value being sent by the weather station is the correct value.

My config:

                {
                    "id": "550",
                    "name": "Outside Temperature",
                    "type": "temperature"
                },
                {
                    "id": "550",
                    "name": "Outside Humidity",
                    "type": "humidity"
                }

My results:

[04/08/2021, 21:01:01] [rtl_433] Updating Outside Temperature
[04/08/2021, 21:01:01] [homebridge-rtl] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.
[04/08/2021, 21:01:01] [rtl_433] Updating Outside Humidity
[04/08/2021, 21:01:01] [homebridge-rtl] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.

It is my guess that the errors are being generated on message type 49 for device ID 550, because that deals with wind speed, wind direction, and rainfall and does not contain the correct data tags/names. I'm not sure how you would adjust your code to handle two different message types from one device, but it does appear to work even though it complains in the error log.

Finally, does HomeKit itself support sensors for Wind speed, wind direction, and rainfall? I have not seen such a thing before, but having written for HomeBridge, you know far more than myself. Thanks much for your insight.

NorthernMan54 commented 3 years ago

This is a new device for me, and as you have determined two different message types are not supported. Give me a work or so to figure this feature out.

Also, Wind speed, wind direction, and rainfall are not supported by HomeKit.

matopeto commented 3 years ago

@Londo-Mollari

add only one sensor and add "humidity": true to config. It wil show humidity in the sensor. In homekit and also in EVE app (i recomend use EVE for temperatures, also shows history graph...)

 {
                    "id": "550",
                    "name": "Outside Temperature",
                    "type": "temperature",
                    "humidity": true
                }

Edit: Oh, i see the device trasmit two messages with same id and channel, only determination is from message_type

I was solving the same issue. And i was about to write PR determine id with cobination of fields egg. "id": ["id": "550", "message_type": 49] but at the end i didnt need to.

@NorthernMan54 maybe it is good idea to adding support also for scalar ID :)