stefan-kaestle / openhab2-addons

Add-ons for openHAB 2.x
Eclipse Public License 2.0
16 stars 1 forks source link

Send alarm system to BSH via openhab (use integrated alarm ton in BSH APP) #42

Closed kreack closed 1 year ago

kreack commented 3 years ago

Adding of virtual Thing / Item for activation and deactivation of the alarm system / ton in the BSH APP via OepnHab.

IMG_0CF41679FD35-1

coeing commented 3 years ago

This should be accessible by the "IntrusionDetectionSystem" service: https://apidocs.bosch-smarthome.com/local/

kreack commented 3 years ago

any idea how it can be configured (which thing type, item type etc)?

coeing commented 3 years ago

@kreack We don't have a handler for it in our binding, but we can implement it in the next version. But this will only work if you will help with the testing because none of us has the hardware at home.

kreack commented 3 years ago

@coeing of course I'm happy to support 👍

tuxianerDE commented 3 years ago

@coeing count me in on the testing piece here!

VL2019 commented 3 years ago

Same here. Happy to help with a test installation

VL2019 commented 3 years ago

FYI: there was an update for this feature in the Bosch Smart Home App. There are now three different alarm profiles. Here is the release note (german, sorry): https://www.bosch-smarthome.com/de/de/release-notes/system/2020-09-28

VL2019 commented 3 years ago

For all who are interested in this feature (start / stop the BOSCH IntrusionDetectionSystem in OH) and can not wait until this feature is part of the beta or final version I would like to share my work-around.

First of all you have to buy a "Bosch adapter plug" (https://www.bosch-smarthome.com/de/de/shop?url=produkte/smart-system-solutions/zwischenstecker) In addition to that you can use the HomeKit binding with AppleHome or (if Siri not necessary) this beta binding to control the adapter plug.

Here my solution: I created a virtual Alarm System in Apple Home with this items:

Group           gSecuritySystem            "Security System Group"                                   {homekit="SecuritySystem"}

String          security_current_state     "Security Current State"             (gSecuritySystem)    {homekit="SecuritySystem.CurrentSecuritySystemState"}

String          security_target_state      "Security Target State"              (gSecuritySystem)    {homekit="SecuritySystem.TargetSecuritySystemState"}

You need also these rules to update the status. I have no delay in these rules because the delay is configured in the Bosch App.

rule "Apple Home Alarm aktivieren"
when
Item security_target_state changed to "AWAY_ARM"
then
        security_current_state.postUpdate("AWAY_ARM")
end

rule "Apple Home Alarm deaktivieren"
when
Item security_target_state changed to "DISARM"
then
        security_current_state.postUpdate("DISARMED")
end

The Alarm System in Apple Home has nice usability (Siri) and design but of course you can use a simple virtual switch, instead of the Apple "SecuritySystem - CurrentSecuritySystemState and TargetSecuritySystemState". Details for HomeKit SecuritySystem in OH here: https://www.openhab.org/addons/integrations/homekit/

Next steps: --> create an automation in Apple Home like "if Alarm will be set on active, turn on the Bosch adapter plug".

--> this event of activating / deactivating Bosch Adapter Plug can be used in the Bosch Smart Home app to create a rule like "If plug turns on, activate the IntrusionDetectionSystem" and of course also the other way round to deactivate.

But remember. if you have an HomePod or something else every one can deactivate the alarm with his / her voice.

Not sure how reliable this works. Activate the adapter plug with the current beta solution of this binding could be more reliable. But I also like the Apple Home Alarm System. So I use this binding and Apple Home.

david-pace commented 1 year ago

This was implemented in https://github.com/openhab/openhab-addons/issues/12700. Please report any future issues in https://github.com/openhab/openhab-addons/issues.

david-pace commented 1 year ago

@stefan-kaestle or @GerdZanker, could you please close this issue? Thanks 🙂

kreack commented 1 year ago

Hello everyone! do you have an example how this thing and the affected items should be configured? thanks & regards

stefan-kaestle commented 1 year ago

Thanks @david-pace . I also added you to the list of collaborators, so you should be able to manage this project yourself as well.

david-pace commented 1 year ago

Thank you @stefan-kaestle ❤️

@kreack please refer to this table for an overview of channels and data types for the intrusion detection system.