User guide RF

herrwusel edited this page Dec 7, 2018 · 10 revisions

RF gateway

Level of complexity: low

Receiving data from RF signal

Subscribe to the base topic "home" 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 1312084

home/OpenMQTTGateway/433toMQTTAdvanced Value 1312084 Bit 24 Delay 319 Protocol 1

home/OpenMQTTGateway/433toMQTT 1312095

home/OpenMQTTGateway/433toMQTTAdvanced Value 1312095 Bit 24 Delay 319 Protocol 1

The 433toMQTTAdvanced subject values enables you to know which protocol and pulselength to use, in this case protocol 1 is the RCSwitch default and Delay 319 is 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 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 topic 433_2, 2 representing the protocol you want to use.

if you want to use a pulselength 315 put inside your topic PLSL_315

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

Example: mosquitto_pub -t home/OpenMQTTGateway/commands/PLSL_315/433_4/RFBITS_25 -m 33151562 will make RCswitch use the protocol 4 with a pulselength of 315ms and a bits number of 25

RF supported protocols:

  • 433_1
  • 433_2
  • 433_3
  • 433_4
  • 433_5
  • 433_6

If you don’t want to use special parameters for RF just publish your data into “home/OpenMQTTGateway/commands/MQTTto433”

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.