homeassistant-zwave_mqtt icon indicating copy to clipboard operation
homeassistant-zwave_mqtt copied to clipboard

add doorbell / alarm siren support

Open marcelveldt opened this issue 5 years ago • 31 comments

the z-wave 1.6 specification supports a doorbell/alarm device.

Usecases:

  • Possibility to trigger the chime/sound from Homeassistant.
  • If supported by device: differentiate between alarm siren and doorbell/notification chime.
  • Configure volume, ringtone etc.
  • In case of a doorbell (like Aeotec Doorbell 6), event in hass that the doorbell is pressed so you can attach your own automations in hass.

I own the Aeotec Doorbell 6 myself and a couple of NEO Coolcam sirens. Looking for feedback how people like to see this implemented.

marcelveldt avatar Jan 21 '20 13:01 marcelveldt

It’s supported via a new command class called SoundSwitch. Just FYI.

Fishwaldo avatar Jan 21 '20 13:01 Fishwaldo

2020-01-21 16:03:08 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/58: {'Name': 'Lifeline', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1579390888}
2020-01-21 16:03:08 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/58: {'Name': 'Browse', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1579390888}
2020-01-21 16:03:08 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/58: {'Name': 'Tampering', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1579390888}
2020-01-21 16:03:08 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/58: {'Name': 'Doorbell 1', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1579390888}
2020-01-21 16:03:08 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/58: {'Name': 'Doorbell 2', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1579390888}
2020-01-21 16:03:08 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/58: {'Name': 'Doorbell 3', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1579390888}
2020-01-21 16:03:08 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/58: {'Name': 'Environment', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1579390888}
2020-01-21 16:03:08 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/58: {'Name': 'Security', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1579390888}
2020-01-21 16:03:08 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/58: {'Name': 'Emergency', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1579390888}

marcelveldt avatar Jan 21 '20 15:01 marcelveldt

It’s supported via a new command class called SoundSwitch. Just FYI.

Yeah, I discovered but in my case I'm missing the nodes in the MQTT topics. Can be my setup or something else. Will dig into it later.

Schermafbeelding 2020-01-21 om 16 08 58

marcelveldt avatar Jan 21 '20 15:01 marcelveldt

I can send some MQTT nodes from my side, but Currently I also filed a bug as the commands doesn't work with my ZW162 Using qt-openzwave, but work with z-way (razberry server). https://github.com/OpenZWave/open-zwave/issues/2085

I would help on the specifics of it.

varet80 avatar Jan 29 '20 17:01 varet80

I can send some MQTT nodes from my side, but Currently I also filed a bug as the commands doesn't work with my ZW162 Using qt-openzwave, but work with z-way (razberry server). OpenZWave/open-zwave#2085

I would help on the specifics of it.

I actually own the device myself so no need but thanks for the offer. At this time I'm not getting some info from OpenZWave and I need to take a good look at it to better find out what's happening so Fishwaldo has a more concrete report.

marcelveldt avatar Feb 05 '20 17:02 marcelveldt

@Fishwaldo any tips how to use the SoundSwitch CC. ?

Schermafbeelding 2020-02-21 om 10 52 48

marcelveldt avatar Feb 21 '20 09:02 marcelveldt

@billiaz I've updated the first post. Can you validate I'm correct on the usecases ?

marcelveldt avatar Feb 21 '20 13:02 marcelveldt

Usecases:

  • Possibility to trigger the chime/sound from Homeassistant.
  • If supported by device: differentiate between alarm siren and doorbell/notification chime.
  • Configure volume, ringtone etc.
  • In case of a doorbell (like Aeotec Doorbell 6), event in hass that the doorbell is pressed so you can attach your own automations in hass.

I think user cases covers most of it. Cannot think right now something different.

varet80 avatar Feb 21 '20 14:02 varet80

I also own this device and Cannot think of more usecases.

If you need me to test anything I’m available

mosjonathan avatar Feb 21 '20 15:02 mosjonathan

Looking at the aeotec siren 6 documentation, it appears that there are several functional aspects that are device-specific. Would these device-specific configuration aspects be coded into this component code, or would that be handled by a separate Home Assistant custom component?

The Aeotec Siren 6 has 8 endpoints, each being a separate virtual SOUND_SWITCH siren device which can play any of 30 different tones in response to a SOUND_SWITCH command.

Endpoint 1 is unique because it is used only to test the different sounds, and you can configure how it will test them (looping all tones, repeating tones, etc).

For endpoints 2-8, you can configure the following:

  • Strobe Light Effect Setting to use
  • # of repeats for the siren sound
  • delay in seconds between repeats of the siren sound
  • duration limit (in seconds) of the siren sound (can be used to clip sounds to a shorter length)

Endpoints 6,7,8 will also respond to specific zwave notification report commands from other devices like smoke alarm, motion detection, etc.

The device exposes 7 custom lighting effects which can each be configured with:

  • how quickly the light is brightened
  • how quickly the light is dimmed
  • how long the light is at max brightness
  • how long the light is kept off

From the Aeotec Zwave command documentation here

skis4hire2 avatar Feb 23 '20 20:02 skis4hire2

Hi! I just wanne "chime in to" I have the device too. Actually i bought the Siren 6 - and "upgraded" it to the Doorbell 6 - while waiting for the siren to be fully implemented.

I am not sure what "technology" the aeotec button actually uses - but as far as i can see - it's linked directly to the aeotec siren - and therefore i think it's using RF.

A usecase - and i am not sure if this is supported - but it would be nice if you could somehow "decide" if the button "doorbell" should actually toggle the "chime" function - or just ( let's say in the evening when the kids are sleeping ) notify the phone / tv etc.

I guess - you could setup this as an time automation - in which you would "silence" the alarm for that specific doorbell instance ( 2 i min case ).

br Ronni

hostrup avatar Feb 24 '20 08:02 hostrup

The aeotec button uses 443.92 FSK

mosjonathan avatar Feb 24 '20 17:02 mosjonathan

I would very much like to be able to turn off the tamper alarm, but that might be covered in the use case for setting volume.

isabellaalstrom avatar Feb 26 '20 14:02 isabellaalstrom

@isabellaalstrom I've done that by sending MQTT command and setting the volume to se under 121 - soundswitch command class 2 -tamper settings 2 - volume translates on my mqtt: 121/2/2 If you have access on MQTT server you can do it. I use Z2M for now but also the qt-openzwave has similar way to do so.

varet80 avatar Feb 26 '20 15:02 varet80

Hi billiaz Can you share how you build up your MQTT command? - then i will se if i can send the same commands from inside home-assistants mqtt console.

hostrup avatar Feb 27 '20 07:02 hostrup

Hi billiaz Can you share how you build up your MQTT command? - then i will se if i can send the same commands from inside home-assistants mqtt console.

My Device is at Location MetersBox and named doorbell Using Z2M

Publish the raw value 0 to topic zwave2mqtt/MetersBox/Doorbell/121/2/2/set

varet80 avatar Feb 27 '20 17:02 varet80

This worked for me to shut off the tamper alarm volume on the doorbell. image the value id key comes from the config gotten from mqtt.

isabellaalstrom avatar Feb 27 '20 17:02 isabellaalstrom

Hi! When i "shake" my doorbell / Siren i get this in the console:

tampering

But i am not sure how to make sure that the value is correct. i tried this without luck: tamper2

br Ronni

hostrup avatar Feb 28 '20 07:02 hostrup

@hostrup No, that's not the right one. I followed a tip from issue #67 and downloaded MQTT Explorer. There I could find my node and the correct setting. Hopefully you can see how from this screenshot, in the red box is the ValueIDKey for Tampering Volume (as seen in the json below it). I set tampering volume to 0 and then proceeded to turn down the volume for doorbell 1 by looking through the other instances for that. You also need to have the "Value": 0 in the payload, otherwise you aren't setting anything. image

isabellaalstrom avatar Feb 28 '20 07:02 isabellaalstrom

Hi again! Thanks alot for helping me out. I guess i am a bit of noob when it comes to MQTT and Z-Wave in general :).

With MQTT explorer - everything turns out just as in your screenshot - actually i can se that we get the same ID's :

tamper3

Now - trying to change the value - i am not quite sure how to do that. i tried simply to send the mqtt topic + values - without specifying anything other than the ID and Value:

tamper4

But this did nothing - i will see if i can do it from inside MQTT explorer.

hostrup avatar Feb 28 '20 08:02 hostrup

@hostrup That should do it, still not working?

isabellaalstrom avatar Mar 04 '20 07:03 isabellaalstrom

Hi! Nope - still no turning of the Tampering switch. i send the following commands from within HA:

OpenZWave/1/command/setvalue/

and with value: { "ValueIDKey": 562950047678497, "Value": 0 }

But nothing happens.

When i trigger the alarm - by "tampering" ( shaking ) the bell - the follwing turns on in HA: sensor.doorbell_1_siren it goes from 0 to 1 so i am able to recieve the commands.

hostrup avatar Mar 04 '20 12:03 hostrup

Hi again. Ok - just tried something else.

I browsed through mqtt-box and found this:

OpenZWave/1/node/5/instance/2/commandclass/121/value/281475066773540/ which is: Tampering Tones.

Now - i am able to make them "play" by calling:

OpenZWave/1/command/setvalue/ with this: { "ValueIDKey": 281475066773540, "Value": 5 } This will play tone 5. but it will not set the tone.

hostrup avatar Mar 04 '20 12:03 hostrup

Hi again - ok - now i think i got alot of the stuff setup:

OpenZWave/1/command/setvalue/

Volume:

{ "ValueIDKey": 562950047678529, "Value": 10 }

Tone: Default: { "ValueIDKey": 844425024389188, "Value": 1 }

Browse tones: { "ValueIDKey": 281475066773572, "Value": 1 }

I am still not able to completly disable the tampering alarm - atleast nok when i am shaking it - but that doesnt matter - right now it's nice that i can change the tones - and turn down the volume too.

hostrup avatar Mar 04 '20 13:03 hostrup

Weird that you can't turn it off completely, but changing the volume to not deafening is at least something!

isabellaalstrom avatar Mar 04 '20 13:03 isabellaalstrom

kinda strange yes - but right now it's ok :-) i got the very loud volume turned down - so that the post man wont wake up the whole house! - will theese functions ever be integrated as "direct" service calls from within HA?

hostrup avatar Mar 04 '20 13:03 hostrup

@hostrup yes it will but for now we're still focused on the basic stuff. Remember that this implementation is still in a very early stage.

marcelveldt avatar Mar 04 '20 16:03 marcelveldt

SoundSwitch CC is pretty complicated, and the Aoetec doorbell is really complex device (for a doorbell!). Just for completness sake (and others that are not using the Aeotec doorbell/siren):

Tone.

Its used to trigger the device to play a sound

Volume

The Volume - For the individual tone. Correct that its the "only" way to "silence" the tampering alarm.

Default Tone

What is the normal tone to play when the device is triggered by the actual button

For the above - They are the "standard" labels. Some devices will show as "Instance 1: Tone" etc, but it can be changed by the device config file: zw162.xml

Both "Tone" and "Default Tone" are a ValueList type - So each entry is the available "tones" implemented on the device. Auto discovered.

Also - The Aeotec doorbell has a complex config - very customizable so you can try to change its behavior via updating its config.

Fishwaldo avatar Mar 05 '20 03:03 Fishwaldo

I've been busy with this and came to the conclusion that currently there is no perfect fit for these devices in Home Assistant entities. Sure, a mediaplayer could be abused but that will not be good for user experience.

An architecture issue has been filed to get approval for creating a new type of entity to fit these siren/chime devices: https://github.com/home-assistant/architecture/issues/375

marcelveldt avatar Apr 28 '20 07:04 marcelveldt

Hi Marcel. Great suggestion. Besides the Aeotech - i also have an aliexpress / china zigbee alarm-chime ( named Heiman ) - which - today is registrered as a lightbulb - via. deConz. So i guess there is "room" for a siren instance.

br Ronni

hostrup avatar Apr 28 '20 08:04 hostrup