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

[boschshc] Support for Smoke Alarm II channel Alarm #18161

Closed
name-lake opened this issue Jan 22, 2025 · 14 comments · Fixed by #18194
Closed

[boschshc] Support for Smoke Alarm II channel Alarm #18161

name-lake opened this issue Jan 22, 2025 · 14 comments · Fixed by #18194
Assignees
Labels
enhancement An enhancement or new feature for an existing add-on

Comments

@name-lake
Copy link

The Bosch smoke detector II seems to support the read/write channel Alarm, but I am missing this channel in the Bosch binding.
I would expect the sensor to show an alarm in the event of fire.
Also it would be good if the siren could go on in the event of, for example, a water alarm. I use water detectors from Bosch, but also from other manufacturers.
I would be very grateful for an extension.

  • The console command boschshc showBindingInfo returns:
Bosch SHC Binding
  SymbolicName org.openhab.binding.boschshc
  Version 4.3.2
  • The command boschshc showDevices returns:
...
 - SD = boschshc:smoke-detector
...
 - SMOKE_DETECTOR2 = boschshc:smoke-detector-2
  • The console command boschshc deviceInfo returns:
  deviceID: hdm:ZigBee:b43a31fffefd4473
      type: SMOKE_DETECTOR2 -> smoke-detector-2
            service: CommunicationQuality -> communicationquality
            service: BatteryLevel -> batterylevel
            service: Alarm -> !UNSUPPORTED!
            service: SmokeDetectorCheck -> smokedetectorcheck
@name-lake name-lake added the enhancement An enhancement or new feature for an existing add-on label Jan 22, 2025
@david-pace david-pace changed the title Support for Smoke Alarm II channel Alarm [boschshc] Support for Smoke Alarm II channel Alarm Jan 23, 2025
@david-pace david-pace self-assigned this Jan 23, 2025
@david-pace
Copy link
Member

Hi @name-lake, I have good news: I finished a first implementation of the alarm channel support 👍

If would be great if you could help me by testing the development version, since I don't have any smoke detector hardware. It looks like you have a Smoke Detector as well as a Smoke Detector II. If you could test both for me, that would be fantastic.

I have uploaded the JAR for testing here.

According to my research, both smoke detectors should support the following values in the the new alarm channel:

  • IDLE_OFF
  • PRIMARY_ALARM
  • SECONDARY_ALARM
  • INTRUSION_ALARM

The new channel provides the current state as string and should also be writable/settable using a string.

Here are step by step instructions for testing:

  1. if you have a dedicated, second openHAB system just for testing it would be optimal just to be sure your productive system is not affected during testing
  2. please make a backup of your system to be safe (I don't expect that exchanging the JAR can destroy the system but just in case...)
  3. start an openHAB console from the command line with openhab-cli console
  4. find out the bundle ID of the boschshc binding: la -s | grep boschshc
  5. replace the JAR with bundle:update [bundle ID from previous step] /path/to/JAR.jar (sometimes openHAB needs to be restarted)
  6. check if the new channel is added to your smoke detectors automatically. If not, delete and re-create the things for testing.
  7. add items to the alarm channels
  8. change states on the device and check if all channels are updated correctly
  9. check if all changes on writable channels are communicated to the Bosch Smart Home Controller and the app

Optionally, in case you want to revert to the original state/version:

  1. delete and unlink all items that were not present in the original version and delete the things you created
  2. replace the bundle JAR with the original JAR of your release. JARs for all releases can be found here

@david-pace
Copy link
Member

Also notifying @GerdZanker and @mike-bike, in case you guys also have smoke detectors and would like to help testing 👍

@mike-bike
Copy link

mike-bike commented Jan 30, 2025 via email

@GerdZanker
Copy link
Contributor

Hi David, I have TwinGuards and "old" smoke detectors and can do some tests over the weekend.
Is the new alarm channel also possible/available for TwinGuards?

@david-pace
Copy link
Member

Thank you for your interest in helping with the tests ❤

This is actually a very good question about the alarm for Twinguards. But it seems like for Twinguards this is solved differently. The implementation for the smoke detectors is based on a service with the identifier Alarm. I don't own any smoke detectors but maybe you can verify this with the command boschshc deviceInfo on your systems.

Twinguards don't seem to have that service, at least mine shows:

type: TWINGUARD -> twinguard
            service: CommunicationQuality -> communicationquality
            service: BatteryLevel -> batterylevel
            service: AirQualityLevel -> airqualitylevel
            service: SmokeSensitivity -> !UNSUPPORTED!
            service: TwinguardNightlyPromise -> !UNSUPPORTED!
            service: SmokeDetectorCheck -> smokedetectorcheck

I will do some research how this is supported for Twinguards. Obviously there must be some other mechanism because they can actually make noise 😉

Meanwhile, the current PR/JAR only supports the "old" smoke detectors, and no Twinguards yet. But if I find out how it works I will create a new issue/PR 👍

@david-pace
Copy link
Member

I just uploaded a new test JAR because @GerdZanker found a few issues in the first version in #18194 👍

@name-lake
Copy link
Author

Hello @david-pace,
you work very fast, however actuelly I am not able to help with testing the openHab SNAP version.
I'm using Raspi 3 & 4 and openHabian installation. Both works fine with the version 4.3.2 (Build).
The openHab version
Version: 5.0.0-SNAPSHOT (#4497)
is not working properly as openHabian. I have connectivity problems so I started a related openHabian issue. It seems there are fundamental problems with openHabian, which is based on 5.0.0-SNAPSHOT.
After I reported my connection problems, many openHabian issues were raised.
So I am very sorry that I can't test the 5.0.0-SNAPSHOT version.
I'm monitoring the openHabian situation & hope I can resume testing the binding as soon as possible.

@david-pace
Copy link
Member

Hi @name-lake, no problem, I had already suspected that my JAR could not work with 4.3.x because there was an update of the Karaf base platform in the mean time, which probably makes it incompatible with older versions.

No worries, @GerdZanker and I can probably finish this enhancement together and then we will see if anyone has a Door/Window Sensor II Plus for the next enhancement, or maybe the issues are fixed until then. Out of curiosity, could you point me to the issues that were raised?

In any case, thank you very much for your willingness to test 👍

@name-lake
Copy link
Author

Hello @david-pace,
there is a new opehabian which I installed & switched openHAB to the SNAP version. I was able to load the new Bosch binding
Version 5.0.0.202501261424
& get

  deviceID: hdm:ZigBee:b43a31fffefd4473
      type: SMOKE_DETECTOR2 -> smoke-detector-2
            service: CommunicationQuality -> communicationquality
            service: BatteryLevel -> batterylevel
            service: Alarm -> alarm
            service: SmokeDetectorCheck -> smokedetectorcheck

The thing smoke detector 2 was detected with the new channel alarm however the thing status is UNINITIALIZED & channels values are NULL.
You mentioned you made a newer binding version but I can't find it?

By the way the mentioned openHABian issues are #1961 (raised by me) and #1962, #1964, #1967.

@david-pace
Copy link
Member

Hi @name-lake, wow that was fast, cool that you join us testing 👍

Please try to download the JAR again - I uploaded a new version at the same location yesterday evening. After replacing the JAR, the Bosch Binding should display a version similar to 5.0.0.202502032149 (timestamp from February 3rd in the evening).

@name-lake
Copy link
Author

Hello @david-pace,
after updating the boschshc binding, the version was:
Version 5.0.0.202502032049.
The smoke detector 2 was detected (I have only smoke detector 2, none of the "old" version). However there was no alarm channel.

      type: SMOKE_DETECTOR2 -> smoke-detector-2
            service: CommunicationQuality -> communicationquality
            service: BatteryLevel -> batterylevel
            service: Alarm -> !UNSUPPORTED!
            service: SmokeDetectorCheck -> smokedetectorcheck

@david-pace
Copy link
Member

david-pace commented Feb 6, 2025

Hi @name-lake, hmm this is strange, maybe I uploaded a wrong JAR by mistake.

I just rebuilt a new JAR and uploaded it at the same location again. The timestamp should start with 20250206 and it should now hopefully include the support for the Alarm service. Please let me know whether this is the case. Thank you 👍

@name-lake
Copy link
Author

Hello @david-pace,
thanks for the new software. 👍
The today version ist:
Version 5.0.0.202502061951.
The smoke detector 2 was detected. And there is an alarm channel. 👍👍
Further tests follow.

      type: SMOKE_DETECTOR2 -> smoke-detector-2
            service: CommunicationQuality -> communicationquality
            service: BatteryLevel -> batterylevel
            service: Alarm -> alarm
            service: SmokeDetectorCheck -> smokedetectorcheck

@david-pace
Copy link
Member

Hi @name-lake, please report any remaining issues with the alarm channel, even though the enhancement was already merged. If you want you can use the JAR I provided here. It includes both the alarm channel and support for Door/Window Contact II Plus 😎

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants