User guide RF 09

Florian edited this page Jan 28, 2019 · 3 revisions

RF gateway

Level of complexity: low

Receiving data from RF signal

Subscribe to all the messages with mosquitto:

sudo mosquitto_sub -t +/# -v

Generate your RF signals by pressing a remote button or other and you will see :

home/OpenMQTTGateway/433toMQTT {"value":1315156,"protocol":1,"length":24,"delay":317}

In this case protocol 1 is the RCSwitch default and Delay 317is close to 350 the default we don"t need to specify pulselength and procotol when sending commands. If the procotol was not 1 and the delay far from 320 you will have to specify these parameters when sending (see below).

Send data by MQTT to convert it on RF signal

mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTto433" -m '{"value":1315156}'

This command will send by RF the code 1315156 and use the default parameters (protocol 1, delay 350)

Arduino IDE serial data received when publishing data by MQTT

We see that the Arduino receive the value 1315156 on the MQTT subject "MQTTto433" and send the data by RF

Arduino IDE serial data received when receiving data by 433Mhz

Send data by MQTT with advanced RF parameters

RF sending support three advanced parameters; bits length, RF protocol and RF pulselength if you want to use a different RCswitch protocol put inside your payload the protocol number 2, "protocol":2.

if you want to use a pulselength 315 put inside your topic "delay":315

if you want to use a bits number different than 24 put inside your topic "length":24 for example

Example: mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTto433" -m '{"value":1315156,"protocol":2,"length":24,"delay":315}' will make RCSwitch use the protocol 2 with a pulselength of 315ms and a bits number of 24

Repeat the RF signal OpenMQTTGateway receive

So as to repeat the RF signal received by the gateway once set the following parameter to true in config_RF.h

#define repeatRFwMQTT true

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.