cgarwood / homeassistant-zwave_mqtt

Limited Pre-Release of the new OZW1.6 Z-Wave component. Currently has limited platform support. Check the README for more details.
72 stars 8 forks source link

add doorbell / alarm siren support #45

Open marcelveldt opened 4 years ago

marcelveldt commented 4 years ago

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

Usecases:

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

Fishwaldo commented 4 years ago

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

marcelveldt commented 4 years ago
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 commented 4 years ago

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

varet80 commented 4 years ago

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.

marcelveldt commented 4 years ago

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 commented 4 years ago

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

Schermafbeelding 2020-02-21 om 10 52 48

marcelveldt commented 4 years ago

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

varet80 commented 4 years ago

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.

mosjonathan commented 4 years ago

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

If you need me to test anything I’m available

skis4hire2 commented 4 years ago

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:

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:

From the Aeotec Zwave command documentation here

hostrup commented 4 years ago

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

mosjonathan commented 4 years ago

The aeotec button uses 443.92 FSK

isabellaalstrom commented 4 years ago

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.

varet80 commented 4 years ago

@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.

hostrup commented 4 years ago

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.

varet80 commented 4 years ago

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

isabellaalstrom commented 4 years ago

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.

hostrup commented 4 years ago

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

isabellaalstrom commented 4 years ago

@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

hostrup commented 4 years ago

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.

isabellaalstrom commented 4 years ago

@hostrup That should do it, still not working?

hostrup commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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.

isabellaalstrom commented 4 years ago

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

hostrup commented 4 years ago

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?

marcelveldt commented 4 years ago

@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.

Fishwaldo commented 4 years ago

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.

marcelveldt commented 4 years ago

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

hostrup commented 4 years ago

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

marcelveldt commented 4 years ago

Good to know, so the deConz platform is abusing the light platform for siren devices. More evidence we're not the only ones spotting that there's need for a platform for siren devices.