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

[bluetooth] Add support for RadonEye (BLE) device #11958

Merged
merged 23 commits into from
Feb 27, 2023

Conversation

petero-dk
Copy link
Contributor

@petero-dk petero-dk commented Jan 4, 2022

Similar to airthings, provide a specific bluetooth device implementation to handle radon detection via the RadonEye

Only tested with original RadonEye RD200, compiled jar is available here:
org.openhab.binding.bluetooth.radoneye-3.3.0-SNAPSHOT.jar.zip

CI built jar can be downloaded here: https://openhab.jfrog.io/ui/native/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.bluetooth.radoneye

@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/smart-radon-sensor/53730/39

@petero-dk petero-dk changed the title [BLE] Add support for RadonEye (BLE) device [WIP][BLE] Add support for RadonEye (BLE) device Jan 4, 2022
if (radon != null) {
logger.debug("Parsed data radon: {}", String.format("[radon=%d Bq/m3]", radon));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line fails silently.

@petero-dk petero-dk changed the title [WIP][BLE] Add support for RadonEye (BLE) device [BLE] Add support for RadonEye (BLE) device Jan 4, 2022
@wborn wborn added the enhancement An enhancement or new feature for an existing add-on label Jan 4, 2022
Signed-off-by: Peter Obel <[email protected]>
Signed-off-by: Peter Obel <[email protected]>
Signed-off-by: Peter Obel <[email protected]>
Signed-off-by: Peter Obel <[email protected]>
Signed-off-by: Peter Obel <[email protected]>
Signed-off-by: Peter Obel <[email protected]>
Signed-off-by: Peter Obel <[email protected]>
Signed-off-by: Peter Obel <[email protected]>
Signed-off-by: Peter Obel <[email protected]>
Signed-off-by: Peter Obel <[email protected]>
Signed-off-by: Peter Obel <[email protected]>
Signed-off-by: Peter Obel <[email protected]>
@petero-dk
Copy link
Contributor Author

petero-dk commented Jan 5, 2022

@wborn this is ready now, I am running this in my "production" and completed all checks. My only issue is if I have given appropriate reference to the people who made the Airthings bluetooth binding - also would they make good reviewers, since this is based mostly on their code.

@wborn
Copy link
Member

wborn commented Jan 5, 2022

Thanks for the PR @petero-dk!

We only reference authors by their real name and only for non-trivial contributions. So I think you can safely remove:

* @author the authors of the airthings bluetooth binding

I've also requested a review from a few other bluetooth binding contributors. 🙂

@petero-dk
Copy link
Contributor Author

I have removed the reference, but I would not say their contribution is non-trivial as this contribution is literally a repurpose of the Airthings Binding :-)

@petero-dk
Copy link
Contributor Author

Any news on the reviews? Anything I can do?

Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @petero-dk for your contribution and your patience!
Code looks good to me, I just have one last question - see below.

@kaikreuzer kaikreuzer changed the title [BLE] Add support for RadonEye (BLE) device [bluetooth] Add support for RadonEye (BLE) device Feb 19, 2022
@lolodomo lolodomo added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Nov 6, 2022
@joerg1985
Copy link
Contributor

I tried to use the binary, is it the current build? The thing shows a com error in the ui and the logs are not verry helpful:

20:13:44.632 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'bl
uetooth:radoneye_rd200:85429d11aa' changed from OFFLINE (COMMUNICATION_E
RROR): Read/write data from device failed to OFFLINE (COMMUNICATION_ERRO
R): Connecting to device failed
20:13:44.678 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'bl
uetooth:radoneye_rd200:85429d11aa' changed from OFFLINE (COMMUNICATION_E
RROR): Connecting to device failed to OFFLINE (COMMUNICATION_ERROR): Rea
d/write data from device failed
20:13:45.098 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'bl
uetooth:radoneye_rd200:85429d11aa' changed from OFFLINE (COMMUNICATION_E
RROR): Read/write data from device failed to OFFLINE (COMMUNICATION_ERRO
R): Connecting to device failed
20:13:45.112 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'bl
uetooth:radoneye_rd200:85429d11aa' changed from OFFLINE (COMMUNICATION_E
RROR): Connecting to device failed to OFFLINE (COMMUNICATION_ERROR): Rea
d/write data from device failed
20:13:45.988 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'bl
uetooth:radoneye_rd200:85429d11aa' changed from OFFLINE (COMMUNICATION_E
RROR): Read/write data from device failed to OFFLINE (COMMUNICATION_ERRO
R): Connecting to device failed
20:13:46.054 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'bl
uetooth:radoneye_rd200:85429d11aa' changed from OFFLINE (COMMUNICATION_E
RROR): Connecting to device failed to OFFLINE (COMMUNICATION_ERROR): Rea
d/write data from device failed
^C~

I am able to manually connect to the RD200 device (firmware 2.0.2)

[��CHG��] Controller B8:27:EB:C5:0E:34 Pairable: yes
[bluetooth]# scan on
Discovery started
[bluetooth]# connect 24:4C:AB:00:B6:7E
Attempting to connect to 24:4C:AB:00:B6:7E
[��CHG��] Device 24:4C:AB:00:B6:7E Connected: yes
Connection successful
[��CHG��] Device 24:4C:AB:00:B6:7E ServicesResolved: yes
[FR:RE22207111667]# info
Device 24:4C:AB:00:B6:7E (public)
        Name: FR:RE22207111667
        Alias: FR:RE22207111667
        Paired: no
        Trusted: no
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Unknown                   (00001523-0000-1000-8000-00805f9
b34fb)
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9
b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9
b34fb)
        RSSI: -31

@petero-dk petero-dk requested review from kaikreuzer and removed request for cpmeister and paulianttila January 4, 2023 22:21
@petero-dk
Copy link
Contributor Author

Also, I don't know why the CI build compiles all modules? It fails on some other module

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hope you can fix the DCO, otherwise LGTM

@petero-dk
Copy link
Contributor Author

Hope you can fix the DCO, otherwise LGTM

I tried, but apparently I am not smart enough

Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, @petero-dk and thanks for the review, @lsiepel!

The DCO is fine, it is part of the first commit and I simply squash the commits when merging.

@kaikreuzer kaikreuzer merged commit e9a1dd5 into openhab:main Feb 27, 2023
@kaikreuzer kaikreuzer added the new binding If someone has started to work on a binding. For a new binding PR. label Feb 27, 2023
@kaikreuzer kaikreuzer added this to the 4.0 milestone Feb 27, 2023
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Feb 28, 2023
miloit pushed a commit to miloit/openhab-addons that referenced this pull request Mar 10, 2023
renescherer pushed a commit to renescherer/openhab-addons that referenced this pull request Mar 23, 2023
FordPrfkt pushed a commit to FordPrfkt/openhab-addons that referenced this pull request Apr 20, 2023
@wborn wborn mentioned this pull request Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on new binding If someone has started to work on a binding. For a new binding PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants