So, what is (PiLight on a Sonoff RF Gateway)

Hi there!

I’m trying to send data by MQTT to convert it on RF signal. As a good user, I’m reading the User guide PiLight 09

Today might not be my brightest day my I don’t seem to grasp what my systemcode is. It’s probably well documented somewhere but I haven’t been able to find it.

This is what I get when pushing my remote:

rf433gw/OpenMQTTGateway_SRFB/PilighttoMQTT {"message":{"id":11018,"unit":15,"state":"on"},"protocol":"arctech_switch","length":"11018","repeats":2,"status":2}
rf433gw/OpenMQTTGateway_SRFB/PilighttoMQTT {"message":{"id":11018,"unit":15,"state":"up"},"protocol":"arctech_screen","length":"11018","repeats":2,"status":2}
rf433gw/OpenMQTTGateway_SRFB/PilighttoMQTT {"message":{"id":11018,"unit":15,"state":"on"},"protocol":"arctech_dimmer","length":"11018","repeats":2,"status":2}
rf433gw/OpenMQTTGateway_SRFB/PilighttoMQTT {"message":{"id":11018,"unit":15,"state":"opened"},"protocol":"arctech_contact","length":"11018","repeats":2,"status":2}

I’d like to find out how to send that data by MQTT to convert it on RF signal. I can’t think straight today. What would my mosquitto_pub command look like?

Thanks in advance!

Cheers!

Hi @skramblar_bram I’m trying to do the same, did you managed to find a way how?

EDIT:
I actually found what is the proper structure… sharing it here in case someone else is struggling like me

The message that I was receiving on a remote press was:

topic: home/OpenMQTTGateway_SRFB/PilighttoMQTT

{"message":{"id":24725970,"unit":3,"state":"on"},"protocol":"arctech_dimmer","length":"24725970","repeats":2,"status":2}

so to send the the same command the syntax is a bit different

topic: home/OpenMQTTGateway_SRFB/commands/MQTTtoPilight

{"message":"{\"id\":24725970,\"unit\":3,\"on\":1}","protocol":"arctech_dimmer","length":"24725970","repeats":2,"status":2}

here as you can see the state is “on”:1 instead of “state”:“on”
and the same goes for turning it off - “off”:1 instead of “state”:“off”

here are also the full commands

Turn ON
mosquitto_pub -h localhost -t home/OpenMQTTGateway_SRFB/commands/MQTTtoPilight -m '{"message":"{\"id\":24725970,\"unit\":2,\"on\":1}","protocol":"arctech_dimmer","length":"24725970","repeats":2,"status":2}'

Turn OFF
mosquitto_pub -h localhost -t home/OpenMQTTGateway_SRFB/commands/MQTTtoPilight -m '{"message":"{\"id\":24725970,\"unit\":2,\"off\":1}","protocol":"arctech_dimmer","length":"24725970","repeats":2,"status":2}'



1 Like