Matze0211, you are perfectly right.
I wrongly assessed the acknowledge of the switches. These are sent for almost most of my switches 2 times.
oh4 “send command” is correctly sending it only once.
Debug 2023-09-17 08:14:13Received MQTT message on 'zigbee2mqtt/SwBtn_EG/set' with data '{ "state" : "ON" }'
Debug 2023-09-17 08:14:13Publishing 'set' 'state' to 'SwBtn_EG'
Debug 2023-09-17 08:14:13Received Zigbee message from 'SwBtn_EG', type 'attributeReport', cluster 'genOnOff', data '{"onOff":1}' from endpoint 1 with groupID 0
Info 2023-09-17 08:14:14MQTT publish: topic 'zigbee2mqtt/SwBtn_EG', payload '{"linkquality":72,"state":"ON"}'
Info 2023-09-17 08:14:14MQTT publish: topic 'zigbee2mqtt/SwBtn_EG', payload '{"linkquality":72,"state":"ON"}'
Debug 2023-09-17 08:14:14Received MQTT message on 'zigbee2mqtt/SwBtn_EG/set' with data '{ "state" : "OFF" }'
Debug 2023-09-17 08:14:14Publishing 'set' 'state' to 'SwBtn_EG'
Debug 2023-09-17 08:14:14Received Zigbee message from 'SwBtn_EG', type 'attributeReport', cluster 'genOnOff', data '{"onOff":0}' from endpoint 1 with groupID 0
Info 2023-09-17 08:14:15MQTT publish: topic 'zigbee2mqtt/SwBtn_EG', payload '{"linkquality":72,"state":"OFF"}'
Info 2023-09-17 08:14:15MQTT publish: topic 'zigbee2mqtt/SwBtn_EG', payload '{"linkquality":72,"state":"OFF"}'
And you were also absolutly right with the assumption that the PIR sensor is reporting a changed state twice within a short time.
Debug 2023-09-17 08:03:27Received Zigbee message from 'PIR_EG', type 'attributeReport', cluster 'msIlluminanceMeasurement', data '{"measuredValue":15}' from endpoint 1 with groupID 0
Info 2023-09-17 08:03:27MQTT publish: topic 'zigbee2mqtt/PIR_EG', payload '{"battery":90,"device_temperature":32,"illuminance":15,"illuminance_lux":15,"linkquality":91,"occupancy":true,"power_outage_count":20,"voltage":2985}'
Debug 2023-09-17 08:03:27Received Zigbee message from 'PIR_EG', type 'attributeReport', cluster 'msOccupancySensing', data '{"occupancy":1}' from endpoint 1 with groupID 0
Info 2023-09-17 08:03:27MQTT publish: topic 'zigbee2mqtt/PIR_EG', payload '{"battery":90,"device_temperature":32,"illuminance":15,"illuminance_lux":15,"linkquality":91,"occupancy":true,"power_outage_count":20,"voltage":2985}'
That’s the reason why the rule is triggered 2 times. (as it already happened in oh3 as well) .
Now I understand the zigbee communication behavior. Thx!!!
But my timer problem is still not explained to me. See my next post.