There aren’t any ‘special’ commands sent for associations - associations are just a way to tell the device to send an update.
Therefore, these commands are simply status updates of an existing item. So if the device is a switch, then it will send an ON/OFF status to the item, and this will be received by OH, the item state will be updated, and you can use this in a rule.
I ask this, because my z-rain sensor does not work as expected.
sensor_rainrate (how much rain at the moment)
sensor_general (sum of rain overall)
meter_water_cubic_meters (sum of rain in cubic)
This device measures the rain level on a certain position. The internal mechanics and electronics counts the rain level and will report it every about 4 minutes if and only if there is rain. The device also monitors a heavy rain condition (10 l/sqm within 5 minutes) and will send out alarm messages when detected.
But this will not happen. Only once a day the channels are updated.
In the documentation is written:
Parameter 2: Rain Start Command
This BASIC Set Command value is sent out into Association Group 2 when the device detects start of rain
Parameter 3: Rain Stop Command
This BASIC Set Command value is sent out into Association Group 2 when the device detects stop of rain
Parameter 6: Heavy Rain Start Command
This BASIC Set Command value is sent out into Association Group 3 when the device detects start of heavy rain
Parameter 7: Heavy Rain Stop Command
This BASIC Set Command value is sent out into Association Group 3 when the device detects stop of heavy rain
But how to catch these informations? No channel is available which can handle this informations.
Then we would need to add a channel. It sounds like there should be a channel associated with the BASIC class to be added.
Are you sure that this is really needed though? What is group 1? Is this the lifeline? If so, is it not reporting something through the lifeline? Normally, BASIC command class is only used for controlling other devices…
This means for me, that I need to catch this information from somewhere?
Or can I accociate group 2 of z-rain device to openhab controller too, which indirectly added this to lifeline and I can catch the information?
I can try this, can you add a channel for this? Or do you need a debug log?
Normally, in this case, I would expect that the device sends something useful to the lifeline group, and the other groups are really just there in case you wanted to (for example) close the shutters or turn off a switch or something - ie direct control of another device.
Looking at the manual, it looks like the device sends either meter, or sensor_multilevel to report rain rate - you should be able to use this in an item and rule to detect rain in the same way as the device is with the BASIC command class. BASIC is really for interdevice commanding.
So, I think that you should be able to use the existing messages that the device sends?
but the device sends this messages only once a day (even if there is heavy rain or not). But this does not make sence because if I know one day later that there was rain it is not what I expect from a rain meter
This is why I search how to use it in a proper way. I think this can only reached by catching “Rain Start Command/stop” or “Heavy Rain Start Command/stop”
rain sensor is working with the newest snapshot. Looks like I have to send some config datas to the sensor to get this to work. This was missing in the old version of the binding
But I thought about the original topic a little bit.
I got a multi sensor now: Philio PST02-1A. This one will only work if set to “sensor binary report”. It will not work in “report notification” mode. This will bring me back to the initial question. As I understood z-wave devices can send messages to other devices without the need of a controller.
if a “Rain Start Command” occurs, a message can send to associated group 2. (This BASIC Set Command value is sent out into Association Group 2 when the device detects start of rain). This will cause something on all devices in this group. But the controller does not get this informations because no item can be bound to this notification.
Does is make sence to implement channels at the controller which can be used to catch this messages by just adding the controller to the associated group config of the device.