Detect message to association groups

Hi.

I would like to use an Aeotec ZW132 to detect activations of an external PIR, but I do not want the PIR to directly activate the load - I want to use it as an input to a more complex automation.

Aeotec support have said it should be possible to do this using group associations; when the switch sees a change in state on S2 it can send BASIC SET 0x00 or 0xFF to group 4, for example.

How do I configure my controller to detect and report on these messages to Home Assistant, please? I’ve never used any direct associations before, all of my integrations are via the controller logic.

I am using Zwavejs to MQTT deployed in a docker container (integrated direct to Home Assistant - MQTT is disabled), if that makes any difference.

Many thanks for any help

Does nobody know how to do this, please?

It’d also be useful to know if it’s even possible or whether I’m wasting my time trying… Thanks.

And what can be happened after detection? Dancing pink elephant?
If you want send command from the PIR to the switch - it a command.
If you want to detect motion - its a motion event sent by the PIR to the controller.

I’m a bit unclear on what exactly you’re trying to accomplish with an association here. Zwave associations are meant where two devices on the zwave network talk to eachother directly, completely bypassing the controller. An example of an association I use is double tap on a Jasco switch for my downstairs lights. I have two sets of lights, on two different switches in two different parts of the same room. One switch is hooked to one set of lights, the other is the second set. With double tap association, if I double tap the switch for “light A” down, it turns off “light b”. It does this directly between the switches - so even if zwavejs2mqtt is stopped or the machine is off, the double tap still works since it bypasses the controller.

Associations aren’t able to accomplish complex automations, since the controller is bypassed (which would have the logic to control a complex automation). In my example, the double tap will trigger regardless of any automations I set in Home Assistant, again since the controller is bypassed here. With a PIR, if you directly associate it to a switch, it will always trigger regardless of any automation triggers you setup. This generally results in undesirable situations, and triggering a switch by direct automation with a motion sensor is generally not helpful since you can’t add any conditions to the trigger.

Also, you would set the association on the device you want to be the trigger. If you want the motion sensor to trigger the Aeotec, you would have to set the association on the motion sensor. If you associate something to group 4 on the Aeotec, what you are doing is triggering some other zwave device to go on and off when you turn switch s2 on and off on the Aeotec - basically making it work in unison. This generally would be if someone wants another bank of lights to turn on and off the same time you turn the switch on and off without wiring them to eachother. I don’t know what motion sensor you are using and if it has an “on and off” to activate or not, but that’s the only possible thing I could see you trying to do here with a motion sensor associated to group 4.

If you want more details, it might be better posting exactly what your “more complex automation” is that you are trying to accomplish, so we can get a better idea of it and hopefully offer some more helpful advice.

If you want to set associations in zwavejs2mqtt, go to the control panel, select your device, click groups, then click “add”

One thing to keep in mind, zwave devices associated with eachother must be included with the same security class - ie non-secure devices can only associate to other non secure devices, and S2 devices and only associate to other S2 devices. If you want to use association and the security classes are different, you will have to exclude/reinclude with matching security classes for it to work.

Thanks for the response.

I’m a bit unclear on what exactly you’re trying to accomplish with an association here. Zwave associations are meant where two devices on the zwave network talk to eachother directly, completely bypassing the controller. Associations aren’t able to accomplish complex automations, since the controller is bypassed (which would have the logic to control a complex automation)

I understand that - that’s why I’m not sure how to achieve what I’m trying to do (or if it’s even possible). To set the scene - the lamp and the PIR are both ‘old fashioned’ electrical units already installed and wired on the outside of my house - traditionally the PIR just acts as a mains switch and turns the lamp on and off.

To try and clarify what I’m trying to do:

The flow shown by the black arrows is completely standard Home Assistant controlling the switch over z-wave - no problems there. I know I could also connect the PIR to S1 and have the PIR operate the load independently of the controller.

However, I don’t want the PIR to be able to operate the load without the controller in the loop - I just want to use the activation of the PIR as a sensor input so that Home Assistant can decide whether to turn the light on or not.

A previous Fibaro double switch that I had made this easy - the switch reported the status of S1 (or S2) directly - I simply used the status of Switch S2 as part of the automation logic controlling O1. However the Aeotec unit does not report the status of its switches, unfortunately.

What their tech support have said is that the unit CAN notify an association group when a switch changes state, so what I want to do is work out how to have the controller listen for the message that would activate that group and expose it to Home Assistant as a sensor or switch state or something…

Does what I want to do (and why) make more sense now?

I get it you’re not actually associating the switch to another device directly (you can’t associated it to a non-zwave device anyway like your PIR), you are trying to make sure the controller itself is associated and getting status.

It doesn’t by default but If you change the config parameters you should get status. I have an Aeotec Micro where this was the case - changing the config parameter solved the issue and gives me status. If you can get status, this should solve your issue. The config parameters for your device are listed here, and there are a lot of them

https://products.z-wavealliance.org/products/2151/configs

First, try changing parameter 80 which is “To set which notification would be sent to the associated devices (Group 1)” to the number 2, which is “Send Basic CC report”. This should cause the device to report status to “group 1”, which is your controller.

If that fails,

Try changing parameter 121 - “Configure the external switch mode for S2”, to 1, which is “2-state switch mode”

You may need to reinterview the device - this should create an on/off switch entity for S2 that reports status.

I could be wrong and don’t have that exact switch, but try playing with those config parameters first.

If changing those config parameters still fails, try adding the controller (group 1) to association group 4. Then listen for an event to trigger on zwave_js_value_notification when you switch s2.

Thanks Tim, that’s a fantastic response.

I have no idea if any of that will work yet, but there are ideas there I’ve not thought of so thank you for contributing. I’ll test that out over the next couple of days.

1 Like

Hi, i have a similar challenge - did you ever get this to work @mullermn?

TBH I can’t remember if I kept trying with this association technique - I was having huge reliability problems with the whole Z-Wave network and basically abandoned it for a year. However! I have recently come back to it, found that there was a bug in the dongle firmware which has since been patched and the network now works really well.

Back to the original problem - I am now using a Fibaro FGS221 for this function. I have the lamp wired up as load 1 and the PIR switch wired up as switch 2 as per the diagram I did for the Aeotec unit. The Fibaro unit correctly reports its status to Home Assistant and Home Assistant controls load 1 to turn on the light when required.