MQTT433gateway -- MQTT 433.92 MHz radio-frequency device gateway

I’m trying to get you code to work with a 3-pack of Telldus Slim RF outlets.
I begun with trying to sniff the codes, and this is what I get:

pulses: 132 possible protocol: arctech_switch
RF signal arrived [arctech_switch][52381518] (3) {"id":52381518,"unit":15,"state":"off"}
pulses: 132 possible protocol: arctech_screen
RF signal arrived [arctech_screen][52381518] (3) {"id":52381518,"unit":15,"state":"down"}
pulses: 132 possible protocol: arctech_contact
RF signal arrived [arctech_contact][52381518] (3) {"id":52381518,"unit":15,"state":"closed"}

pulses: 132 possible protocol: arctech_switch
RF signal arrived [arctech_switch][52381518] (0) {"id":52381518,"unit":15,"state":"on"}
pulses: 132 possible protocol: arctech_screen
RF signal arrived [arctech_screen][52381518] (0) {"id":52381518,"unit":15,"state":"up"}
pulses: 132 possible protocol: arctech_contact
RF signal arrived [arctech_contact][52381518] (0) {"id":52381518,"unit":15,"state":"opened"}

for off and on respectivly. So i tried to set it up in my config file like this:

switch:
  - platform: mqtt
    name: "arctech_switch"
    command_topic: "rf434/send/arctech_switch"
    payload_on: '{"id":52381518,"unit":15,"on":1}'
    payload_off: '{"id":52381518,"unit":15,"off":1}'

But it is not really working as it should, the outlets aint turning either on or off. This is what I get when I subscribe to the topic:

Client mosqsub|2882-hassbian received PUBLISH (d0, q0, r0, m0, 'rf434/send/arctech_switch', ... (32 bytes))
{"id":52381518,"unit":15,"on":1}
Client mosqsub|2882-hassbian received PUBLISH (d0, q0, r0, m0, 'rf434/recv/arctech_switch/52381518', ... (38 bytes))
{"id":52381518,"unit":15,"state":"on"}
Client mosqsub|2882-hassbian received PUBLISH (d0, q0, r0, m0, 'rf434/recv/arctech_screen/52381518', ... (38 bytes))
{"id":52381518,"unit":15,"state":"up"}
Client mosqsub|2882-hassbian received PUBLISH (d0, q0, r0, m0, 'rf434/recv/arctech_contact/0', ... (34 bytes))
{"id":0,"unit":0,"state":"closed"}

It looks like the last line with arctech_contact is not getting the correct id and unit. Do you have any idea of what could be wrong or could be done?
Or maybe it is more of question to the PiLight guys/guy?

This is really great stuff. I used a cheap superheterodyne receiver and transmitter set, from China ($1.25)

Somehow I had to comment out this line to get the receiver working.

pinMode(RECEIVER_PIN, INPUT_PULLUP); //5V protection with reverse diode needs pullup

Additionally, I added this library myself to enable a wall switch :
iwds07, found in https://github.com/wo-rasp/pilight/tree/dev_gs_iwds07

The wall switch (https://www.aliexpress.com/item/EU-UK-Standrad-Vhome-Remote-Controller-white-1gang1way-Crystal-Penal-Glass-Touch-Lamp-Wall-Light-switch/32806297959.html) is firing an event only, so I have to figure out how to make it behave like a statefull switch.

Thanks a lot @puuu. Your work is really appreciated.

This looks like, your RF outlets are not supported by pilight. The arctech_switch may be very similar to the protocol of your outlet.

The MQTT433gateway uses ESPilight which use the RF protocols as they are in the development branch of pilight. Any protocol development should be done by pilight. Usually, this requires discussion on the piligh forum.

You can enable the RAW mode of MQTT433gateway to get raw signal and observe the differences.

The ESP8266 officially only supports 3.3V on the GPIO, but most of the rf receiver have a output of 5V. As 5V protection, the schematic show a simple diode on the receiver pin. Using this diode requires the pullup.

If you connect the reciever directly to the receiver pin, the pullup can make trouble. So you can remove this line to disable the pullup, but be warned when applying 5V to the ESP8266 GPIOs.

As soon as the iwds07 protocol is merged in the pilight development branch, I can release a new Version of ESPilight. Please open a github issue at ESPilight to remind me. :wink:

I had the same experience.

The rfCallback() procedure checks if the received message is valid (valid flag is set)
It turns out that every message is flagged as invalid, hence the messages is not published.

I didn’t have the time to do a deeper investigation but removed the validity check.
This did the trick. Still I have to figure out why every messages is invalid.

I need some help!

I got the software running on a wemos and connected the receiver to see if I can find the RF code of my remote that controlls the blinds on the outside of the appartment (4 high)

Since I dont have access to the motors and program button. I was hoping I could use the remote???

anyway I was testing your software with the car remote for the gate and I got this when I put it in protocolRAW:

RAW RF signal (26): c:00101200101100101100110013;p:388,734,585,12189@
RAW RF signal (26): c:01212301212301212300220024;p:406,255,764,595,12198@
RAW RF signal (26): c:00101200101100101100110013;p:384,732,591,12187@
RAW RF signal (26): c:00101100101100101100110012;p:391,736,12188@
RAW RF signal (26): c:00101100101100101100110012;p:394,740,12180@
RAW RF signal (26): c:01212301212301212300220024;p:410,254,759,617,12200@
RAW RF signal (26): c:00101100101100101100110012;p:384,731,12196@
RAW RF signal (26): c:00101100101100101100110012;p:391,737,12182@
RAW RF signal (26): c:00101100101100101100110012;p:393,740,12193@
RAW RF signal (26): c:00101100101100101100110012;p:393,744,12192@
RAW RF signal (26): c:00101100101100101100110012;p:394,738,12192@
RAW RF signal (26): c:00101100101100101100110012;p:393,740,12202@
RAW RF signal (26): c:01212301212301212300220024;p:409,256,759,616,12204@
RAW RF signal (26): c:00101200101100101100110013;p:383,732,564,12194@
RAW RF signal (26): c:00101100101100101100110012;p:391,739,12194@
RAW RF signal (26): c:00101100101100101100110012;p:393,740,12197@
RAW RF signal (26): c:00101100101100101100110012;p:393,739,12196@
RAW RF signal (26): c:00102000101100101100110013;p:393,742,893,12191@
RAW RF signal (26): c:00101100101100101100110012;p:393,739,12195@

is it even possible to do what I want? or do I need to rent a crane to reprogram everything.

For the car key it is unlikely that the library would work as it uses a protection mechanism (ie. rolling code) thus no two consecutive codes will be the same. Otherwise you should ditch the car immediately as it could get stolen by any 13 years old kid in the neighborhood.
However, for the blinds it is likely to work with the current settings. As an alternative I would highly recommend:

Case larger horizon is needed, then RFLink (http://www.rflink.nl/blog2) has the largest number of compatible devices but it is sometimes erratic. Also, it works only on Arduino Mega (so no Wemos D1 Mini or D1 R2 support).

Tried openmqttgateway but couldnt get it to work on a wemos. I think its a case of finding a needle in a haystack with the needle being the right tutorial.

I had some compiling errors. I will try again.

Download the current build as it also includes the additional libraries (not links to the libraries to download).
Unzip everything in a folder called “OpenMQTTGateway” (not OpenMQTTGateway-master as it in the zip file). If trying with a single gateway no need to make any changes to the sketch (with additional gateways, then there is need to ensure each has an unique name). It would connect with WifiManager to your wifi router (doesn’t even need to input the wifi SSID, password, MQTT IP, password or username in the sketch as they would get into the webpage).

hi its running thank you. I put the RF receiver to pin D3 on my wemos D1 mini. ( https://wiki.wemos.cc/products:d1:d1_mini )

now this part does nothing: https://github.com/1technophile/OpenMQTTGateway/wiki/User-guide-RF

By that I mean subscribing to home/ and then nothing.

I will post this in the right topic :slight_smile:

Topic where the remote presses are recorded should be “home/433toMQTT”. Try with the following command (replace localhost with another IP if the case).
mosquitto_sub -h 127.0.0.1 -d -t "home/433toMQTT"

or try with the wildcard:

mosquitto_sub -h 127.0.0.1 -d -t "#"

Alternatively, use a RF emitter to send any type of signal to test if the receiver works (the following is the full command but can be sent without the additional options).

mosquitto_pub -h 127.0.0.1 -t home/commands/PLSL_350/433_1/RFBITS_24 -m 1234567