Open baldisos opened 1 month ago
maybe a duplicate of #5655 ?
As per the instructions from https://esphome.io/components/sensor/radon_eye_ble.html, if i understand it correctly, the _radon_eyeble component is just used to find the mac address of the Radon Eye? The _radon_eyeble isn't referenced in the _radon_eyerd200 component which is used to read the values, right? So the issue should be within the _radon_eyerd200 component. The referenced issue is within the _radon_eyeble component.
For fun, I patched radon_eye_rd200 to use the UUIDs from sormy/radoneye/KNOWLEDGE_V2.md ... which also doesn't work, but at least gets a little further. Far enough to say whether protocol v1 or v2 is in use.
I haven't tried updating the decoder to work with v2 responses.
[C][esp32_ble:032]: Setting up BLE...
[D][esp32_ble:284]: Enabling BLE...
[C][esp32_ble:032]: Setting up BLE...
[C][esp32_ble:032]: Setting up BLE...
[W][radon_eye_rd200:141]: Connection in progress
[D][esp32_ble:284]: Enabling BLE...
[V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 4] - 0
[V][esp32_ble_client:121]: [0] [30:C9:22:A3:7E:CE] gattc_event_handler: event=0 gattc_if=4
[V][esp32_ble_client:127]: [0] [30:C9:22:A3:7E:CE] gattc registered app id 1
[D][esp32_ble_client:110]: [0] [30:C9:22:A3:7E:CE] Found device
[D][esp32_ble_tracker:671]: Found device 30:C9:22:A3:7E:CE RSSI=-57
[D][esp32_ble_tracker:692]: Address Type: PUBLIC
[D][esp32_ble_tracker:694]: Name: 'FR:ID16RE000939'
[D][esp32_ble_tracker:219]: Pausing scan to make connection...
[D][esp32_ble_tracker:219]: Pausing scan to make connection...
[D][esp32_ble_tracker:219]: Pausing scan to make connection...
[I][esp32_ble_client:067]: [0] [30:C9:22:A3:7E:CE] 0x00 Attempting BLE connection
[V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 4] - 40
[V][esp32_ble_client:121]: [0] [30:C9:22:A3:7E:CE] gattc_event_handler: event=40 gattc_if=4
[D][esp32_ble_client:110]: [0] [30:C9:22:A3:7E:CE] ESP_GATTC_CONNECT_EVT
[V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 4] - 2
[V][esp32_ble_client:121]: [0] [30:C9:22:A3:7E:CE] gattc_event_handler: event=2 gattc_if=4
[D][esp32_ble_client:110]: [0] [30:C9:22:A3:7E:CE] ESP_GATTC_OPEN_EVT
[I][radon_eye_rd200:015]: Connected successfully!
[V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 4] - 46
[V][esp32_ble_client:121]: [0] [30:C9:22:A3:7E:CE] gattc_event_handler: event=46 gattc_if=4
[D][esp32_ble_client:306]: [0] [30:C9:22:A3:7E:CE] Event 46
[V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 4] - 7
[V][esp32_ble_client:121]: [0] [30:C9:22:A3:7E:CE] gattc_event_handler: event=7 gattc_if=4
[V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 4] - 7
[V][esp32_ble_client:121]: [0] [30:C9:22:A3:7E:CE] gattc_event_handler: event=7 gattc_if=4
[V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 4] - 7
[V][esp32_ble_client:121]: [0] [30:C9:22:A3:7E:CE] gattc_event_handler: event=7 gattc_if=4
[V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 4] - 6
[V][esp32_ble_client:121]: [0] [30:C9:22:A3:7E:CE] gattc_event_handler: event=6 gattc_if=4
[D][esp32_ble_client:110]: [0] [30:C9:22:A3:7E:CE] ESP_GATTC_SEARCH_CMPL_EVT
[V][esp32_ble_client:223]: [0] [30:C9:22:A3:7E:CE] Service UUID: 0x1801
[V][esp32_ble_client:225]: [0] [30:C9:22:A3:7E:CE] start_handle: 0x1 end_handle: 0x5
[V][esp32_ble_client:223]: [0] [30:C9:22:A3:7E:CE] Service UUID: 0x1800
[V][esp32_ble_client:225]: [0] [30:C9:22:A3:7E:CE] start_handle: 0x14 end_handle: 0x1c
[V][esp32_ble_client:223]: [0] [30:C9:22:A3:7E:CE] Service UUID: 0x1523
[V][esp32_ble_client:225]: [0] [30:C9:22:A3:7E:CE] start_handle: 0x28 end_handle: 0xffff
[I][esp32_ble_client:227]: [0] [30:C9:22:A3:7E:CE] Connected
[V][esp32_ble_client:069]: [0] [30:C9:22:A3:7E:CE] characteristic 0x1524, handle 0x2a, properties 0x6
[V][esp32_ble_client:069]: [0] [30:C9:22:A3:7E:CE] characteristic 0x1525, handle 0x2c, properties 0x12
[V][esp32_ble_client:069]: [0] [30:C9:22:A3:7E:CE] characteristic 0x1526, handle 0x2f, properties 0x12
[V][radon_eye_rd200:147]: writing 0x50 to write service
[V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 4] - 18
[V][esp32_ble_client:121]: [0] [30:C9:22:A3:7E:CE] gattc_event_handler: event=18 gattc_if=4
[D][esp32_ble_client:188]: [0] [30:C9:22:A3:7E:CE] cfg_mtu status 0, mtu 517
[V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 4] - 9
[V][esp32_ble_client:121]: [0] [30:C9:22:A3:7E:CE] gattc_event_handler: event=9 gattc_if=4
[D][esp32_ble_client:110]: [0] [30:C9:22:A3:7E:CE] ESP_GATTC_WRITE_DESCR_EVT
[V][esp32_ble:359]: (BLE) gattc_event [esp_gatt_if: 4] - 3
[V][esp32_ble_client:121]: [0] [30:C9:22:A3:7E:CE] gattc_event_handler: event=3 gattc_if=4
[D][esp32_ble_client:110]: [0] [30:C9:22:A3:7E:CE] ESP_GATTC_READ_CHAR_EVT
[V][radon_eye_rd200:081]: result bytes: 0000 00000000 00000000 00000000 0000 0000 0000
I tried the same thing, but i can't wrap my head around how the decoding works. I can't get this to work. The data is read, but as you say, it's not decoded properly.
first problem is radon_eye_rd200.cpp#L148 where it's sending a 0x50
to poll the device and according to KNOWLEDGE_V2.md the newer version seems to use 0x40
.
after I 3d print some round tuits, I'm going to see about adding another check in here to try detect characteristics with the new UUIDs and use that to set some sort of version flag. Once the protocol version is known, the right command can be send and its response can be decoded. of course, there will need to be a decoder written for the new protocol...
Yay, a different error! I'm still not getting meaningful data from my RD200 - getting back a 20-byte message full of 0x00
, but at least I can now make my detector beep when the ESP32 connects.
I wonder if @sormy could be of help here. This is beyond my capabilities.
Original implementation for v1 polls, but is supposed to subscribe. V2 works only with subscribe. I have actually implementation v1/v2 that i have never tested (i sold house with radon meters so have no devices to test on), i can share branch for testing if interested. Alternative is to use bluetooth protocol dump to reverse engineer v3, i can provide instructions for ios and mac.
Sure, that sounds helpful.interesting
My RD200V3 works with https://github.com/sormy/radoneye and https://github.com/sormy/radoneye-reader - I'm able to poll the full measurements as described in https://github.com/sormy/radoneye/blob/main/KNOWLEDGE_V2.md
Here is a branch: https://github.com/sormy/esphome/tree/rd200v2 Feel free to polish if needed
The problem
I am trying to connect my Radon Eye RD200 V3 sensor with the radon_eye_ble component. I can read and write data with the python script from https://github.com/sormy/radoneye. The output i get from the python script when using radoneye list:
94:B5:55:7F:51:26 FR:HG04RE000465
And when using radoneye status 94:B5:55:7F:51:26But when using the radon_eye_ble within esphome on a Wemos Mini D1 ESP32 (ESP32-Wroom-32) i don't get any output. No logs on connection and no data.
I've only ever read about V2 versions online, the device i got is a V3. But it does work with the python script, so i guess there's something missing within the esphome component.
Which version of ESPHome has the issue?
2024.9.2
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2024.10.1
What platform are you using?
ESP32
Board
Wemos Mini D1 ESP32 (ESP32-Wroom-32)
Component causing the issue
radon_eye_rd200
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information