openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.59k forks source link

[Bluetooth] RadonEye extension does not support fwVersion >2 #15276

Open doftnet opened 1 year ago

doftnet commented 1 year ago

Expected Behavior

Configure RadonEye thing in OpenHAB with the bluetooth address, provide firmware major verison 3 as my device reports Version 3.0.1. on the screen. OpenHAB should connect to the device and periodically update a corresponding item with the detected radon level.

Current Behavior

OpenHAB fails to communicate with RadonEye device with firmware v3.0.1. If fwVersion is omitted, it defaults to 1. Thing is ONLINE for a short time before going OFFLINE - COMMUNICATION_ERROR. If fwVersion is set to 2, thing goes directly to OFFLINE - COMMUNICATION_ERROR. Does not accept a value greater than 2.

Steps to Reproduce (for Bugs)

Configure RadonEye thingin OpenHAB via UI and omit Firmware version. Item status is briefly ONLINE before going OFFLINE due to communication error within refresh interval. corresponding item remains NULL.
Attempt to add firmware version. OpenHAB reports that fwVersion must not be greater than 2. Attempt to configure via .things file. Omit firmware version. Item status is ONLINE for a short time before going OFFLINE due to coummunication error. Item remains NULL. Add fwVersion to file. Thing remains UNINITIALIZED. Attempt to set fwVersion to 2. Thing goes from INITALIZING to either UNKNOWN or OFFLINE - COMMUNICATION ERROR.

Context

The RadonEye RD200 that I recently purchased reports a firmware version of v3.0.1. I am able to use their app on my phone to get data from the device but I have not been successful getting OpenHAB to communicate with it. The device itself shows it's bluetooth connect icon briefly but it never seems to pass data.

When I have background discovery on in the bluetooth adapter thing, it does detect several bluetooth items and puts them in the thing inbox as beacon things, including the RadonEye, however adding it as a beacon item from the inbox doesn't really help as lacks the radon level channel I'm after.

Your Environment

XCP-ng VM - 4 cores, 4GB ram, 64GB storage openHAB 4.0.0.M5 Bluetooth (according to lsusb): Bus 002 Device 007: ID 0a5c:21e8 Broadcom Corp. BCM20702A0 Bluetooth 4.0 Connected via SEH myUTN-2500 along with an insteon adapter and z-wave adapter. Debian 11 (Bullseye) bluez 5.55 OpenJDK 17.0.7

lsiepel commented 1 year ago

Recently a PR was merged by @joerg1985 related to firmware support, maybe he has some guidance to get this fixed.

jlaur commented 1 year ago

14549 for reference.

joerg1985 commented 1 year ago

Sorry for the late answer, but i don't think i can help here. There is no documentation available to the different versions. I only found a working python script and tried to adopt the changes to the java code.

@petero-dk is the plugin working for you, with firmware v1? I only see connection issues in the logs.

joerg1985 commented 9 months ago

I had a closer look at the binding, after i talked to a coworker with a v1 device. It is not working for him too, so it think the binding is broken.

I reworked the binding and will create a PR for this the next days. With some luck the v2 way will work for v3 too.

petero-dk commented 4 months ago

I am sorry I have not looked at this for a while. My openHab completely died, it fried my Pi and I just gave up redoing everything again. This was the third time.

The binding did work for me, I am unsure about the firmware version. @joerg1985 glad to know that you have been working on it.

joerg1985 commented 4 months ago

I am currently testing the change on my local system to see if the connection is stable for multiple days. Here are the fixes https://github.com/joerg1985/openhab-addons/tree/randoneye-fixes if someone does want to test it.