I noticed very interesting problem and would like to find out why it happens.
I have a RF wall switch I control from HA via OMG v 0.9.1beta.
My automation sends 2 mqtt commands to OMG with a very small interval between them.
- Turn on the switch
home/OpenMQTTGateway/commands/MQTTto433 {"value":12001361}
- Turn off the switch
home/OpenMQTTGateway/commands/MQTTto433 {"value":12001360}
The wall switch turns on and remains on.
In mqtt log I have this
home/OpenMQTTGateway/commands/MQTTto433 {βvalueβ:12001361}
home/OpenMQTTGateway/commands/MQTTto433 {βvalueβ:12001360}
home/OpenMQTTGateway/433toMQTT {βvalueβ:12001361}
home/OpenMQTTGateway/433toMQTT {βvalueβ:12001360}
and in Serial Monitor
Hey I got a callback
11:57:34.324 β MQTTtoRF json
MQTTtoRF OK
11:57:35.193 β Pub json into:
11:57:35.193 β home/OpenMQTTGateway/433toMQTT
11:57:35.193 β {βvalueβ:12001361}
11:57:35.193 β Hey I got a callback
11:57:35.193 β MQTTtoRF json
MQTTtoRF OK
11:57:36.104 β Pub json into:
11:57:36.104 β home/OpenMQTTGateway/433toMQTT
11:57:36.104 β {βvalueβ:12001360}
11:57:36.104 β Hey I got a callback
11:57:36.104 β Store signal
11:57:36.104 β Json buf.
11:57:36.104 β Min ind:
11:57:36.104 β 0
11:57:36.104 β store code :
11:57:36.104 β 12001361/76872
11:57:36.104 β Col: val/timestamp
11:57:36.104 β 0:12001361/76872
11:57:36.104 β 1:13916622/64536
11:57:36.104 β 2:75/74694
11:57:36.104 β 3:75/74710
11:57:36.104 β Data JSON stored
11:57:36.104 β Hey I got a callback
11:57:36.208 β Store signal
11:57:36.208 β Json buf.
11:57:36.208 β Min ind:
11:57:36.208 β 0
11:57:36.208 β store code :
11:57:36.208 β 12001360/76892
11:57:36.208 β Col: val/timestamp
11:57:36.208 β 0:12001360/76892
11:57:36.208 β 1:13916622/64536
11:57:36.208 β 2:75/74694
11:57:36.208 β 3:75/74710
11:57:36.208 β Data JSON stored
I wonder why the switch turns on but then does not turn off?
And what is the right way to get it work properly?
Apparently I have the same problem as this personβ¦
P.S. The only way to get a correct behaviour (i.e the switch is off at the end) is to add small (1-2 seconds) delay between these 2 commands (actually, itβs just adding for: '00:00:01
β to trigger: platform: state
), in which case I get
in mqtt log
home/OpenMQTTGateway/commands/MQTTto433 {βvalueβ:12001361}
home/OpenMQTTGateway/433toMQTT {βvalueβ:12001361}
home/OpenMQTTGateway/commands/MQTTto433 {βvalueβ:12001360}
home/OpenMQTTGateway/433toMQTT {βvalueβ:12001360}
in Serial Monitor
Hey I got a callback
12:15:09.941 β MQTTtoRF json
MQTTtoRF OK
12:15:10.795 β Pub json into:
12:15:10.795 β home/OpenMQTTGateway/433toMQTT
12:15:10.829 β {βvalueβ:12001361}
12:15:10.829 β Hey I got a callback
12:15:10.829 β Store signal
12:15:10.829 β Json buf.
12:15:10.829 β Min ind:
12:15:10.829 β 0
12:15:10.829 β store code :
12:15:10.829 β 12001361/1125296
12:15:10.829 β Col: val/timestamp
12:15:10.829 β 0:12001361/1125296
12:15:10.829 β 1:13916622/64536
12:15:10.829 β 2:75/74694
12:15:10.829 β 3:75/74710
12:15:10.896 β Data JSON stored
Hey I got a callback
12:15:13.328 β MQTTtoRF json
MQTTtoRF OK
12:15:14.253 β Pub json into:
12:15:14.253 β home/OpenMQTTGateway/433toMQTT
12:15:14.253 β {βvalueβ:12001360}
12:15:14.253 β Hey I got a callback
12:15:14.253 β Store signal
12:15:14.253 β Json buf.
12:15:14.253 β Min ind:
12:15:14.253 β 0
12:15:14.253 β store code :
12:15:14.253 β 12001360/1128692
12:15:14.253 β Col: val/timestamp
12:15:14.253 β 0:12001360/1128692
12:15:14.253 β 1:13916622/64536
12:15:14.253 β 2:75/74694
12:15:14.253 β 3:75/74710
12:15:14.522 β Data JSON stored