Gateway will not control anything (receives fine)

Been messing around with different solutions in the hopes of finding one device for all my RF needs and it seems like OpenMQTTGateway is the way to go. I have it all setup (i think correctly) on an ESP32 with a cc1101 but i cannot for the life of me get this setup to actually control anything.

When i for example press a button on a remote to turn on a light the gateway receives a bunch of commands;

home/OpenMQTTGateway_multi_receiver/PilighttoMQTT/smartwares_switch/19149406 {"message":{"id":19149406,"unit":0,"state":"on"},"protocol":"smartwares_switch","length":"19149406","value":"19149406","repeats":2,"status":2}
home/OpenMQTTGateway_multi_receiver/PilighttoMQTT/arctech_switch/19149406 {"message":{"id":19149406,"unit":0,"state":"on"},"protocol":"arctech_switch","length":"19149406","value":"19149406","repeats":2,"status":2}
home/OpenMQTTGateway_multi_receiver/PilighttoMQTT/arctech_screen/19149406 {"message":{"id":19149406,"unit":0,"state":"up"},"protocol":"arctech_screen","length":"19149406","value":"19149406","repeats":2,"status":2}
home/OpenMQTTGateway_multi_receiver/PilighttoMQTT/arctech_dimmer/19149406 {"message":{"id":19149406,"unit":0,"state":"on"},"protocol":"arctech_dimmer","length":"19149406","value":"19149406","repeats":2,"status":2}
home/OpenMQTTGateway_multi_receiver/PilighttoMQTT/arctech_contact/19149406 {"message":{"id":19149406,"unit":0,"state":"opened"},"protocol":"arctech_contact","length":"19149406","value":"19149406","repeats":2,"status":2}

However, im woefully incapable of sending a command from my gateway to turn the light on without using my remote. The documentation gives an example of how to do so but i dont know what a system code is, where to find it or if i even need it for this protocol and just dumping the whole message like this also gets me nowhere fast;

mosquitto_pub -t "home/OpenMQTTGateway_multi_receiver/commands/MQTTtoPilight" -m '{"message":"{\"id\":19149406,\"unit\":0,\"state\":"on"}","protocol":"smartwares_switch","length":"19149406","value":"19149406","repeats":2,"status":2}' -u "xxx" -P "xxx"

I am missing the crucial step of how to fabricobble an instruction to make my gateway actually control anything. I’d love it if someone would be able to point me in the right direction because if been googling for hours now and all i managed to do is get a headache :stuck_out_tongue:

Hi @Maarten682,

While I don’t have any experience with a Pilight gateway, have you tried sending with just the message and only the protocol, as with the examples in the docs?

I have tried most combinations i could think of, including just the message part, each with all 5 protocols. The only difference that it made was spitting out the following error every now and then;

home/OpenMQTTGateway_multi_receiver/PilighttoMQTT {"Status": "Error"}

Best to wait then for someone with Pilight experience for an informed answer :slight_smile:

My first thought is that something is happening on the command line and causing a garbled message being sent to OMG. Have you tried using MQTT Explorer to ensure that the message is being published correctly ?

I took a quick look at the pilight code and it is pretty robust and will provide some pretty good diagnostics, but needs a well formed message. Have you been monitoring the serial output from the OMG device ?