Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partially detected Govee H5054 water leak sensors #2404

Closed
Vlad-Star opened this issue Mar 3, 2023 · 6 comments
Closed

Partially detected Govee H5054 water leak sensors #2404

Vlad-Star opened this issue Mar 3, 2023 · 6 comments

Comments

@Vlad-Star
Copy link

Re: pbkhrv/rtl_433-hass-addons#124

I've bought two 5-packs of Govee H5054 sensors, one directly from Govee and another one from Amazon. In both sets the battery is detected by auto-discovery plugin, but the sensor itself is not. I am using the latest "next" version of rtl_433 and auto-discovery.

Please, review and let me know if you need any further information. Thanks!

Button press:

DEBUG:paho.mqtt.client:Received PUBLISH (d0, q0, r0, m0), 'rtl_433/9b13b3f4-rtl433/events', ... (123 bytes)
DEBUG:root:MQTT message: "{"time":"2023-02-28 16:55:18","model":"Govee-Water","id":56948,"event":"Button Press","code":"218b05050750","mic":"PARITY"}"
DEBUG:root:homeassistant/sensor/Govee-Water-56948/Govee-Water-56948-UTC/config:{"device_class": "timestamp", "name": "Govee-Water-56948-UTC", "entity_category": "diagnostic", "enabled_by_default": false, "icon": "mdi:clock-in", "state_topic": "rtl_433/9b13b3f4-rtl433/devices/Govee-Water/56948/time", "unique_id": "Govee-Water-56948-UTC", "device": {"identifiers": ["Govee-Water-56948"], "name": "Govee-Water-56948", "model": "Govee-Water", "manufacturer": "rtl_433"}}
DEBUG:paho.mqtt.client:Sending PUBLISH (d0, q0, r1, m54065), 'b'homeassistant/sensor/Govee-Water-56948/Govee-Water-56948-UTC/config'', ... (389 bytes)
INFO:root:Published Govee-Water/56948: time
INFO:root:Skipped Govee-Water/56948: event, code

Shortened contacts:

DEBUG:root:MQTT message: "{"time":"2023-02-28 16:56:32","model":"Govee-Water","id":56948,"event":"Water Leak","code":"218b04040750","mic":"PARITY"}"
DEBUG:root:Discovery timeout in the future for: homeassistant/sensor/Govee-Water-56948/Govee-Water-56948-UTC/config
DEBUG:paho.mqtt.client:Received PUBLISH (d0, q0, r0, m0), 'rtl_433/9b13b3f4-rtl433/events', ... (121 bytes)
DEBUG:root:MQTT message: "{"time":"2023-02-28 16:56:34","model":"Govee-Water","id":56948,"event":"Water Leak","code":"218b04040750","mic":"PARITY"}"
DEBUG:root:Discovery timeout in the future for: homeassistant/sensor/Govee-Water-56948/Govee-Water-56948-UTC/config

Battery re-insert:

DEBUG:paho.mqtt.client:Received PUBLISH (d0, q0, r0, m0), 'rtl_433/9b13b3f4-rtl433/events', ... (160 bytes)
DEBUG:root:MQTT message: "{"time":"2023-02-28 16:59:34","model":"Govee-Water","id":56948,"battery_ok":1.0,"battery_mV":3000,"event":"Battery Report","code":"218b039b035a","mic":"PARITY"}"
DEBUG:root:Discovery timeout in the future for: homeassistant/sensor/Govee-Water-56948/Govee-Water-56948-UTC/config
DEBUG:root:Discovery timeout in the future for: homeassistant/sensor/Govee-Water-56948/Govee-Water-56948-B/config
DEBUG:paho.mqtt.client:Received PUBLISH (d0, q0, r0, m0), 'rtl_433/9b13b3f4-rtl433/events', ... (160 bytes)
DEBUG:root:MQTT message: "{"time":"2023-02-28 16:59:36","model":"Govee-Water","id":56948,"battery_ok":1.0,"battery_mV":3000,"event":"Battery Report","code":"218b039b035a","mic":"PARITY"}"
DEBUG:root:Discovery timeout in the future for: homeassistant/sensor/Govee-Water-56948/Govee-Water-56948-UTC/config
DEBUG:root:Discovery timeout in the future for: homeassistant/sensor/Govee-Water-56948/Govee-Water-56948-B/config`

My rtl_433.conf.template:

output mqtt://hass.example.com:1883,user=USER,pass=PASS,devices=rtl_433/9b13b3f4-rtl433/devices[/type][/model][/subtype][/channel][/id],events=rtl_433/9b13b3f4-rtl433/events,states=rtl_433/9b13b3f4-rtl433/states
frequency 433.92M
protocol 73 # LaCrosse TX141-Bv2, TX141TH-Bv2, TX141-Bv3, TX141W, TX145wsdth, (TFA, ORIA) sensor
protocol 41 # Acurite 986 Refrigerator / Freezer Thermometer
protocol 192 # Govee Water Leak Detector H5054, Door Contact Sensor B5023
protocol 231 # Govee Water Leak Detector H5054
convert si

@zuckschwerdt
Copy link
Collaborator

Read the newer issues on https://github.com/merbanan/rtl_433/issues?q=is%3Aissue+Govee

Maybe @aav7fl and @jasonmichalski from #2273 can help?

@aav7fl
Copy link
Contributor

aav7fl commented Mar 3, 2023

I'm not really sure what the next version is when referencing this project. I don't use the hass rtl433 addon or auto discovery.

Can you ensure your rtl433 is running a version that includes the Govee fixes? Can you somehow force whatever you're running to use the latest nightly? https://github.com/merbanan/rtl_433/releases/tag/nightly

@jasonmichalski
Copy link
Contributor

I think this is working as expected. There are two different (known) revisions floating around.

One of them uses a PARITY check and reports these fields: https://github.com/merbanan/rtl_433/blob/master/src/devices/govee.c#L224

The newer version that I implemented uses a CRC check and reports these fields: https://github.com/merbanan/rtl_433/blob/master/src/devices/govee.c#L375

I don't have any of the older models to experiment with to say whether or not a leak_num exists in that message.

When you short the contacts, clear the alarm, wait a little bit, and short the contacts again, do you see any changing / incrementing values in the code word?

@Vlad-Star
Copy link
Author

Ok... to be clear, I just reinstalled both "next" versions,and rtl_433 reported the following version upon startup:

Starting rtl_433 with rtl_433.conf...
[rtl_433] rtl_433 version nightly-2-g80d332cd branch master at 202303021545 inputs file rtl_tcp RTL-SDR

Shortened the contacts:

DEBUG:paho.mqtt.client:Received PUBLISH (d0, q0, r0, m0), 'rtl_433/9b13b3f4-rtl433/events', ... (121 bytes)
DEBUG:root:MQTT message: "{"time":"2023-03-03 13:56:03","model":"Govee-Water","id":56948,"event":"Water Leak","code":"218b04040750","mic":"PARITY"}"
DEBUG:root:homeassistant/sensor/Govee-Water-56948/Govee-Water-56948-UTC/config:{"device_class": "timestamp", "name": "Govee-Water-56948-UTC", "entity_category": "diagnostic", "enabled_by_default": false, "icon": "mdi:clock-in", "state_topic": "rtl_433/9b13b3f4-rtl433/devices/Govee-Water/56948/time", "unique_id": "Govee-Water-56948-UTC", "device": {"identifiers": ["Govee-Water-56948"], "name": "Govee-Water-56948", "model": "Govee-Water", "manufacturer": "rtl_433"}}
DEBUG:paho.mqtt.client:Sending PUBLISH (d0, q0, r1, m15), 'b'homeassistant/sensor/Govee-Water-56948/Govee-Water-56948-UTC/config'', ... (389 bytes)
INFO:root:Published Govee-Water/56948: time
INFO:root:Skipped Govee-Water/56948: event, code
DEBUG:paho.mqtt.client:Received PUBLISH (d0, q0, r0, m0), 'rtl_433/9b13b3f4-rtl433/events', ... (121 bytes)
DEBUG:root:MQTT message: "{"time":"2023-03-03 13:56:05","model":"Govee-Water","id":56948,"event":"Water Leak","code":"218b04040750","mic":"PARITY"}"
DEBUG:root:Discovery timeout in the future for: homeassistant/sensor/Govee-Water-56948/Govee-Water-56948-UTC/config

Pressed the button:

DEBUG:paho.mqtt.client:Received PUBLISH (d0, q0, r0, m0), 'rtl_433/9b13b3f4-rtl433/events', ... (123 bytes)
DEBUG:root:MQTT message: "{"time":"2023-03-03 13:56:57","model":"Govee-Water","id":56948,"event":"Button Press","code":"218b05050750","mic":"PARITY"}"
DEBUG:root:Discovery timeout in the future for: homeassistant/sensor/Govee-Water-56948/Govee-Water-56948-UTC/config

Waited for a minute, then shortened the contacts again:

DEBUG:paho.mqtt.client:Received PUBLISH (d0, q0, r0, m0), 'rtl_433/9b13b3f4-rtl433/events', ... (121 bytes)
DEBUG:root:MQTT message: "{"time":"2023-03-03 13:58:07","model":"Govee-Water","id":56948,"event":"Water Leak","code":"218b04040750","mic":"PARITY"}"
DEBUG:root:Discovery timeout in the future for: homeassistant/sensor/Govee-Water-56948/Govee-Water-56948-UTC/config
DEBUG:paho.mqtt.client:Received PUBLISH (d0, q0, r0, m0), 'rtl_433/9b13b3f4-rtl433/events', ... (121 bytes)
DEBUG:root:MQTT message: "{"time":"2023-03-03 13:58:09","model":"Govee-Water","id":56948,"event":"Water Leak","code":"218b04040750","mic":"PARITY"}"
DEBUG:root:Discovery timeout in the future for: homeassistant/sensor/Govee-Water-56948/Govee-Water-56948-UTC/config

@jasonmichalski
Copy link
Contributor

unfortunately it looks like the version of the sensor you have doesn't have that leak_num in the message -- I was hoping maybe it was there and just wasn't extracted in the original implementation, but it seems like it's really not there at all

wish i had better news, but hope that helps!

@Vlad-Star
Copy link
Author

Thank you folks for helping out, I truly appreciate it! It seems this problem is not really related to rtl_433 code, but rather to the "old" revision of the sensors I've got and MQTT auto-discovery plugin, that seems to be expecting "new" version with leak_num field, in order to fully discover the sensor.

Closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants