Aqara MQTT auto discovery problem with new stable.
Posted: Thursday 03 February 2022 19:46
Greetings fellow Domoticz lovers.
I have just moved to MQTT A.D. from the Zigbee2mqtt plugin and have discovered something that seems to be stopping me fully switch over.
I have 2 Aqara H1 wireless switches (https://www.zigbee2mqtt.io/devices/WRS- ... mi-wrs-r02) that worked with the old plugin but not with the new MQTT autodiscovery.
They expose in Zigbee2mqtt a single "action" field (I am using the "events" operation mode rather than the "command".
With the plugin, this was "discovered" as a single selector switch with the following "levels" ;
0 Off
10 button_1_hold
20 button_1_release
30 button_1_single
40 button_1_double
50 button_1_triple
60 button_2_hold
70 button_2_release
80 button_2_single
90 button_2_double
100 button_2_triple
110 button_3_hold
120 button_3_release
130 button_3_single
140 button_3_double
150 button_3_triple
160 toggle_1
I was able to use this in my scripts as I wanted.
However, with Auto Discovery, the device is "discovered" as a multiple push button devices for each action and also for each switch.
1568 MQTT 0x54ef4410001aec87_action_zigbee2mqtt 239 light switch action_button_1_single Light/Switch Switch Off 1 2022-02-03 18:08:16
1577 MQTT 0x54ef4410001aec87_action_zigbee2mqtt 52 light switch action_button_2_single Light/Switch Switch Off 1 2022-02-03 08:15:39
This in itself isn't a problem as I could modify all my scripts, however, the device only ever is "off" and never changes, even momentarily, to "on" when the switch is pressed.
2022-02-03 17:58:13 Off
2022-02-03 17:58:11 Off
2022-02-03 17:57:28 Off
2022-02-03 17:57:26 Off
2022-02-03 17:57:22 Off
2022-02-03 17:57:20 Off
2022-02-03 17:56:26 Off
2022-02-03 17:56:11 Off
2022-02-03 17:55:35 Off
2022-02-03 17:55:32 Off
2022-02-03 17:55:27 Off
With the old plugin, the momentary status was visible in the logs, for example;
2022-02-03 17:58:13 Off
2022-02-03 17:58:13 button_1_single
2022-02-03 17:58:11 Off
2022-02-03 17:58:11 button_1_single
2022-02-03 17:57:29 Off
2022-02-03 17:57:28 button_1_single
2022-02-03 17:57:26 Off
2022-02-03 17:57:26 button_1_single
I am at a bit of a loss how to proceed to be able to enable the switch state to be available to Domoticz with MQTT auto discovery.
I have just moved to MQTT A.D. from the Zigbee2mqtt plugin and have discovered something that seems to be stopping me fully switch over.
I have 2 Aqara H1 wireless switches (https://www.zigbee2mqtt.io/devices/WRS- ... mi-wrs-r02) that worked with the old plugin but not with the new MQTT autodiscovery.
They expose in Zigbee2mqtt a single "action" field (I am using the "events" operation mode rather than the "command".
With the plugin, this was "discovered" as a single selector switch with the following "levels" ;
0 Off
10 button_1_hold
20 button_1_release
30 button_1_single
40 button_1_double
50 button_1_triple
60 button_2_hold
70 button_2_release
80 button_2_single
90 button_2_double
100 button_2_triple
110 button_3_hold
120 button_3_release
130 button_3_single
140 button_3_double
150 button_3_triple
160 toggle_1
I was able to use this in my scripts as I wanted.
However, with Auto Discovery, the device is "discovered" as a multiple push button devices for each action and also for each switch.
1568 MQTT 0x54ef4410001aec87_action_zigbee2mqtt 239 light switch action_button_1_single Light/Switch Switch Off 1 2022-02-03 18:08:16
1577 MQTT 0x54ef4410001aec87_action_zigbee2mqtt 52 light switch action_button_2_single Light/Switch Switch Off 1 2022-02-03 08:15:39
This in itself isn't a problem as I could modify all my scripts, however, the device only ever is "off" and never changes, even momentarily, to "on" when the switch is pressed.
2022-02-03 17:58:13 Off
2022-02-03 17:58:11 Off
2022-02-03 17:57:28 Off
2022-02-03 17:57:26 Off
2022-02-03 17:57:22 Off
2022-02-03 17:57:20 Off
2022-02-03 17:56:26 Off
2022-02-03 17:56:11 Off
2022-02-03 17:55:35 Off
2022-02-03 17:55:32 Off
2022-02-03 17:55:27 Off
With the old plugin, the momentary status was visible in the logs, for example;
2022-02-03 17:58:13 Off
2022-02-03 17:58:13 button_1_single
2022-02-03 17:58:11 Off
2022-02-03 17:58:11 button_1_single
2022-02-03 17:57:29 Off
2022-02-03 17:57:28 button_1_single
2022-02-03 17:57:26 Off
2022-02-03 17:57:26 button_1_single
I am at a bit of a loss how to proceed to be able to enable the switch state to be available to Domoticz with MQTT auto discovery.