I played with my OMG (downloaded from master branch today) with Plight only enabled.
It reacts to my hardware RF remote (which can control RF sockets) - that’s what it shows when I press ON button:
22:21:30: (0) home/OMG_2nd_floor/PilighttoMQTT {“message”:“{"systemcode":684549,"unitcode":7,"state":"off"}”,“protocol”:“logilink_switch”,“length”:“”,“repeats”:2,“status”:2}
22:21:30: (0) home/OMG_2nd_floor/PilighttoMQTT {“message”:“{"unitcode":656613,"battery":"low"}”,“protocol”:“kerui_D026”,“length”:“”,“repeats”:2,“status”:2}
22:21:30: (0) home/OMG_2nd_floor/PilighttoMQTT {“message”:“{"unitcode":195981,"state":"opened"}”,“protocol”:“ev1527”,“length”:“”,“repeats”:2,“status”:2}
22:21:30: (0) home/OMG_2nd_floor/PilighttoMQTT {“message”:“{"id":1,"state":"on"}”,“protocol”:“ehome”,“length”:“1”,“repeats”:2,“status”:2}
22:21:30: (0) home/OMG_2nd_floor/PilighttoMQTT {“message”:“{"id":41,"systemcode":12805,"unit":7,"state":"off"}”,“protocol”:“daycom”,“length”:“41”,“repeats”:2,“status”:2}
and OFF button:
22:22:08: (0) home/OMG_2nd_floor/PilighttoMQTT {“message”:“{"systemcode":684549,"unitcode":6,"state":"off"}”,“protocol”:“logilink_switch”,“length”:“”,“repeats”:2,“status”:2}
22:22:08: (0) home/OMG_2nd_floor/PilighttoMQTT {“message”:“{"unitcode":656613,"state":"opened"}”,“protocol”:“kerui_D026”,“length”:“”,“repeats”:2,“status”:2}
22:22:08: (0) home/OMG_2nd_floor/PilighttoMQTT {“message”:“{"systemcode":19,"unitcode":7,"state":"off"}”,“protocol”:“heitech”,“length”:“”,“repeats”:2,“status”:2}
22:22:08: (0) home/OMG_2nd_floor/PilighttoMQTT {“message”:“{"unitcode":195981,"state":"opened"}”,“protocol”:“ev1527”,“length”:“”,“repeats”:2,“status”:2}
22:22:08: (0) home/OMG_2nd_floor/PilighttoMQTT {“message”:“{"systemcode":371,"unitcode":7,"state":"off"}”,“protocol”:“elro_800_switch”,“length”:“”,“repeats”:2,“status”:2}
22:22:08: (0) home/OMG_2nd_floor/PilighttoMQTT {“message”:“{"id":1,"state":"on"}”,“protocol”:“ehome”,“length”:“1”,“repeats”:2,“status”:2}
22:22:08: (0) home/OMG_2nd_floor/PilighttoMQTT {“message”:“{"id":41,"systemcode":12805,"unit":6,"state":"off"}”,“protocol”:“daycom”,“length”:“41”,“repeats”:2,“status”:2}
Quite a lot for each button, isn’t it?
Anyway, it turns on and off a light when I press ON and OFF button.
Now I want to send these ON/OFF signals via OMG/Plight.
If I follow this guide, my OMG reboots on the following command (tried with or without length
, repeats
and status
):
mosquitto_pub -h 192.168.0.34 -t home/OMG_2nd_floor/commands/MQTTtoPilight -m ‘{“message”:“{"systemcode":684549,"unitcode":7,"off": 1}”,“protocol”:“logilink_switch”,“length”:“”,“repeats”:2,“status”:2}’
If I send something like this, nothing happens:
mosquitto_pub -h 192.168.0.34 -t home/OMG_2nd_floor/commands/MQTTtoPilight -m ‘{“message”:“{"systemcode":684549,"unitcode":7,"state":"off"}”,“protocol”:“logilink_switch”,“length”:“”,“repeats”:2,“status”:2}’
It’s confusing when there is no answer to a message published to the command topic - should it be like that?
The trouble I cannot see anything in Serial Monitor if I connect my ESP8266 directly to my PC with a USB cable:
22:38:19.550 -> ⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮BN⸮⸮⸮⸮⸮⸮⸮e'e⸮c%⸮:x⸮⸮9{dl⸮⸮|⸮l⸮|⸮l⸮c|⸮⸮⸮e⸮{⸮c⸮c⸮⸮gg⸮dno⸮⸮⸮cpp⸮l{d{d
and OMG goes offline.
I cannot connect it via a FTDI programmer as the emitter should be connected to RX pin, which is used by the programmer.
Could anyone tell me what’s wrong with my approach and how to achieve my goal?