RFLink – 433Mhz Remote Control and Node-Red

RF LINK

Many moons ago I just happened to be staying overnight with my pal Jonathan and he had some surplus (and so free) Byron 433Mhz wireless doorbell-pushes to demonstrate.

He showed me a universal RF 433Mhz receiver board he purchased with which could look at the signals from the various kinds of 433Mhz standard remote control transmitting units.

This was interesting as I had an Acurite weather station with the most awful interface which required a PC to be ON constantly in order to remotely access the information.

RFLink Board and Mega

I don’t know what planet the Acurite designers were on – but the weather station was a gift from my wife, solar powered and including rain level, wind speed and direction etc.. a nice job other than the software. It sat outside the wall on my office for months doing nothing so I figured it might be interesting to get that talking to my Node-Red/Raspberry Pi setup .

RFLink

The RF unit my friend was using was rather expensive but he suggested I try the free RFLink software along with a DIY unit comprising an Arduino Mega2560, a little board called an RFLink V1.1.4 (now updated to 1.1.48) and an antenna – you see the lot here.

tmpC75DThe kit duly arrived and I put it together with a soldering iron easily enough but had to wait for a Chinese Arduino Mega board to arrive. I downloaded the software – a very simply install program for the PC – couple of button presses really – and that was that. I plugged the little RFLink board into the MEGA, plugged the Mega into my PC (USB connector) and… out of the blue, information from my Acurite board appeared, as did more one-liners from my Byron button presses and even our doorbell. It took no time at all with help from a fellow enthusiast who’s used this stuff before to figure out how to send a signal back to the doorbell to make it work.

All very nice but I needed to get this running in Node-Red.

I took my latest Raspberry Pi using DietPi and after adjusting comms permissions, simply plugged the USB device into the Pi and set up a serial node for both transmit and receive. Note April 2020 – today I use only the full Raspbian for various reasons.

From there on it was easy  – the combination of the two boards and that RFLink software worked really well for receiving info from 433Mhz sensors and for sending out commands to other 433Mhz-based boards.

I had a slight concern about how long you have to leave the Byron SX35 push-buttons before pressing again (3 seconds). But I mentioned this to the RFLINK author and within an hour he came back with an update which made the delay much more practical.

Valid input instructions from the various sensors are in this link along with the Arduino software download….

http://www.rflink.nl/blog2/protref

I bought a bog-standard Arduino 2560 (cheap Chinese version)

I bought this board… the RFLink 433 kit – requires a little soldering…

https://www.nodo-shop.nl/en/21-rflink-gateway

10 minute soldering (take note of version numbers – important), 10 minutes max to blow the software. Test the board (56k baud) to ensure when nearby sensors are sending results – they were coming in and then I wrote this rather inelegant test.

My SERIAL node on the Raspberry Pi was is set to split input on character “\n” so the code had to get rid of return characters as you’ll see in the “replace” line below. Note also that when you send out serial (to actually control something) it should be followed by both “\r\n”.

RF433

Put that in a Node-Red template – attach a Node-Red serial Node set to take serial input from USB0 at 56k – character /r as a separator and deliver ascii strings…and that – is just the beginning…  note also that the designer of this free software has also added GPIO control both input and output – on several pins (recently expanded so check his docs).

Tests

For some time I used an old K10000 phone acting as a server running Debian and running Tasker and the MQTT client Tasker plugin with the same phone running as a resource…. and I could fire an MQTT message at the latter to get a doorbell message out! Meanwhile a Raspberry Pi was running that RFLink unit and when one of the Byron doorbell pushes was pressed – a message was sent out to the phone to play the doorbell – yes, I know, somewhat over the top – but I was just experimenting… and sure enough – press the button and pretty much in real time the doorbell sound appeared.

433Mhz to MQTT Gateway
Original attempts

In the comments below you’ll see reference to an ESP8266 to MQTT Gateway – at one time I thought that this would be ideal as it would be all in one little box – whereas I needed to stick something like a Pi on the end to generate a wireless MQTT signal…. so – back in 2017 I grabbed the software and (disregarding several wasted hours due to a duff FTDI) put together one of these – as you’ll see in the photo on the left –  the antenna was purchased due to kind feedback below – and as you can see, it was a precision job – NOT. (it was however, accurate and worked).

I happen to have a typical AliExpress 4-button keyfob remote control for a cheap Chinese remote and indeed the above little system did pick up the handset signal and sent a unique number for each key as MQTT – lovely – however – even with a decent little aerial the unit did not pick up (or recognise) my weather station of any of my BYRON pushbuttons – and the data coming back was crude compared to the RFLink software so at first glance, not impressed.

Node-Red Code

// So firstly a generic means of getting incoming items into an object 
var the433 = {}; 
msg.payload = msg.payload.replace(/(\r\n|\n|\r)/gm,""); 
node.warn(msg.payload); 
var parts433 = msg.payload.split(";"); 
the433.p1 = parts433[0]; the433.p2 = parts433[1]; 
the433.name = parts433[2]; var a = 3; 
while (a < parts433.length) { var bits433 = parts433[a].split("="); 
switch (bits433[0]) 
{ 
case "ID": the433.id = bits433[1]; break; 
case "SWITCH": the433.switch = bits433[1]; break; 
case "CMD": the433.cmd = bits433[1]; break; 
case "SET_LEVEL":
the433.set_level = parseInt(bits433[1], 10); break; 
case "TEMP":
var int=parseInt(bits433[1],16);
if ((int & 0x8000) >0) {
the433.temp=-(int & 0x7fff) / 10;
} else {
the433.temp = int / 10;
}
break; 
case "HUM": the433.hum = parseInt(bits433[1], 10); break; 
case "BARO": the433.baro = parseInt(bits433[1], 16); break; 
case "HSTATUS": the433.hstatus = parseInt(bits433[1], 10); break; 
case "BFORECAST": the433.bforecast = parseInt(bits433[1], 10); break; 
case "UV": the433.uv = parseInt(bits433[1], 16); break; 
case "LUX": the433.lux = parseInt(bits433[1], 16); break; 
case "BAT": the433.bat = bits433[1]; break; case "RAIN":
the433.rain = parseInt(bits433[1], 16) / 10; break; 
case "RAIN":
the433.rainrate = parseInt(bits433[1], 16) / 10; break; 
case "WINSP":
the433.winsp = parseInt(bits433[1], 16) / 10; break; 
case "AWINSP":
the433.awinsp = parseInt(bits433[1], 16) / 10; break; 
case "WINGS": the433.wings = parseInt(bits433[1], 16); break; 
case "WINDIR":
the433.windir = parseInt(bits433[1], 10); break; 
case "WINCHL":
the433.winchl = parseInt(bits433[1], 16); break; 
case "WINTMP":
the433.wintmp = parseInt(bits433[1], 16); break; 
case "CHIME": the433.chime = parseInt(bits433[1], 10); break; 
case "SMOKEALERT": the433.smokealert = bits433[1]; break; 
case "PIR": the433.pir = bits433[1]; break; 
case "CO2": the433.co2 = parseInt(bits433[1], 10); break; 
case "SOUND": the433.sound = parseInt(bits433[1], 10); break; 
case "KWATT": the433.kwatt = parseInt(bits433[1], 16); break; 
case "WATT": the433.watt = parseInt(bits433[1], 16); break; 
case "CURRENT":
the433.current = parseInt(bits433[1], 10); break; 
case "CURRENT2":
the433.current2 = parseInt(bits433[1], 10); break; 
case "CURRENT3":
the433.current3 = parseInt(bits433[1], 10); break; 
case "DIST": the433.dist = parseInt(bits433[1], 10); break; 
case "METER": the433.meter = parseInt(bits433[1], 10); break; 
case "VOLT": the433.volt = parseInt(bits433[1], 10); break; 
case "RGBW":
the433.rgbc = parseInt(bits433[1].substring(0, 2), 16); 
the433.rgbw = parseInt(bits433[1].substring(2, 4), 16);
break; } 
a++; 
} 
// SO - the above is general... here is my specific setup for 
// temporarily displayingthe Acurite info 
if ((the433.p1 == "20") &&
(the433.name == "Acurite") && (the433.id == "c826")) 
{ if (typeof the433.temp !== 'undefined') temp = the433.temp; 
if (typeof the433.hum !== 'undefined') hum = the433.hum; 
if (typeof the433.bat !== 'undefined') bat = the433.bat; 
if (typeof the433.rain !== 'undefined') rain = the433.rain; 
if (typeof the433.winsp !== 'undefined') winsp = the433.winsp; 
if (typeof the433.windir !== 'undefined') windir = the433.windir; 
node.warn("Temperature: " + temp + "c"); 
node.warn("Humidity: " + hum + "%"); 
node.warn("Battery: " + bat); 
node.warn("Rain: " + rain + "mm"); 
node.warn("Wind Speed: " + winsp + "km/h"); 
node.warn("Wind Dir: " + (windir * 22.5) + " degrees"); }

Costs

The hardware for the little ESP board was DIRT CHEAP compared to what I’ve put together now – which in turn is cheap compared to one of these all in-one ready-built boxes– but you pay your money – I’m sticking with https://www.nodo-shop.nl/en/21-rflink-gateway – my first endeavour in 2017 – at under £20 plus £9 for the aerial plus a Mega2560 (cheap from China) was I think it worth it (no I don’t know the company and no I didn’t get samples etc).

The RF transceiver they supplied costs  £16.51 on Ebay so the board with connectors and the transceiver really is a good deal.  You can of course use cheaper receivers – but the software writer suggests these might be naff. There is information here on that subject. The RXB6 board seems cheap but don’t buy from the UK as they seem to be a rip here – back in 2017 one guy wanted nearly £8 inc postage – China for same board – under £2 all in.

2020 Update

The original RFLINK setup made my day by turning my otherwise useless weather station into another working part of my home control – and soon I had wireless control buttons all over the place. The setup also has good range though I think aerial design and positioning could be improved. 

In April 2020 I resurrected this project as I’ve been playing with the good but slightly restricted Sonoff RF-Bridge and this old project came to my attention. By this time, Antonio (Mr Shark) and I had both bought combined Arduino Mega and ESP8266 boards (cheap from China) so now there was no need to mess with Raspberry Pi serial as the combined Arduino-Mega/ESP8266 board uses WIFI (thanks to the ESP8266) and the two chips talk to each other internally by wired serial – the only issue is that the ESP8266 WIFI signal on these boards has PINGS that are all over the place – see later in this blog entry. We think the board layout and internal ceramic antenna might be the culprits.

The RFLINK software has not changed since 2017 but Antonio and I put Tasmota on the ESP8266 side (using Tasmotiser after setting the onboard dip switches accordingly) and telling Tasmota to use the normal pins for serial – and putting in a rule to set the serial baud rate to 57600 baud permanently.

Having spotted an issue with CRLF in the serial command (see higher up, resolved in the original USB-only board in Node-Red, this is now solved inside the Tasmotized ESP8266). As well as setting the baud rate to 56k on powerup, serial logging needs to be turned off and we need the ESP8266 to know what format of instruction to accept – i.e. text – So:

Flash RFLink and tasmota.bin: 
https://tech.scargill.net/rflink-and-node-red/#comment-48469

Set tasmota rx and tx pins to their serial function in config - module then on console set baudrate on boot with:

Rule1 on System#Boot do backlog Baudrate 57600; serialdelimiter 128; SerialLog 0; SerialSend "Hello"; endon
rule1 1

Incidentally I gave the ESP side the name “rflink” not for any special reason. The settings in the image below (Tasmota) along with WIFI and MQTT.must be set up, takes moments.

The board designers even thought to bring out the remaining GPIO pins on the ESP side of that board and IMHO you can never have too many indicator lights. GPIO0, 2, 4,5, 12 and 16 are on a header doing nothing and it didn’t take me long to find a use for these. PWM works, ON/OFF works, I had no joy with WS2812 (serial LEDs) even though I tried setting “pixels 8” in the Tasmota console – but I digress.

ESP setup

After all of that, watching the web console in Tasmota and pressing one of my RF buttons I saw:

20:59:08 MQT: tele/rflink/RESULT = {"SerialReceived":"20;16;EV1527;ID=048ce4;SWITCH=01;CMD=ON; "}

Below you will see the combined Arduino/ESP board and the RFLINK unit complete with 433Mhz Antenna. You could run the final product on USB power – I had a 9v 600ma wall asupply handy so I used that eventually.

My unit sends and receives data over WIFI (MQTT) to a Raspberry Pi running Node-Red. Using the 7-12v connector for power did not affect WIFI ping times. If you wanted to make use of the unused GPIOs on the ESP8266, you could enable for example RELAY1 and RELAY2 (etc) in the Tasmota configuration, using a LED and series resistor in each case instead of a relay, to indicate the lst change of state – using, say:

Pulsetime1 1
Pulsetime2 1

However, as the Tasmota code will not allow you WILDCARDS in the monitoring of serial events, that would have to be processed elsewhere, say, in Node-Red and passing the LED control back using an MQTT command, That is what I’ve now done.

RFLINK

Antonio suggested these two links…

This Instructables link – Lots of details on the board, on the 8 dipswitch segments on the main board for programming, and in this second link, how to enable an external WiFi antenna. Here’s my take on the latter. I had an unused Orange Pi Zero (which has rubbish WiFi – that’s why it is unused) and pinched the aerial. Dropping the antenna (click fit) onto the Arduino/ESP board was easy – removing a component elsewhere referred to as L2 from the board was also easy (with a clean, small soldering tip. Here’s a picture I took. You can use the internal antenna without physical changes, to use an external antenna, that L2 has to go. You may see a small improvement in signal strength with the external antenna.

Photo of Arduino Mega + ESP board

As a last thought – I decided I needed another LED flashing to let me know that the RFLINK setup was actually powered up.. so, another “Pulsetime” and another Tasmota rule… makes a light flash continually for no other reason than the unit being turned on. The downside of this one being that this is regularly reported to the console.

pulsetime3 1
rule3 on power3#state=0 do backlog delay 20; power3 1; endon
rule3 1

All very nice other than the console madness.

Sonoff RFbridge 433 and RTL-SDR

NEXT: Thanks to Scotland-based subscriber BrianD I now have a spiffy RTL-SDR software radio to play with – maybe a separate article as this one is already WAY too long.

As for Sonoff RFbridge – I’ve already covered this and from 2020 onwards am using it on a daily basis unlike RL-LINK.

139 thoughts on “RFLink – 433Mhz Remote Control and Node-Red

  1. I have successfully flashed the ESP side of the wemos esp mega board with Tasmota 8.2.0 and can configure the GPIO1 to 148, GPIO3 to 149, MQTT host and Wifi. However when the power is cycled the GPI0 configuration resets back to None(0); wifi and MQTT settings remain correctly set.

    Does anyone have any ideas why the GPIO setting are not “sticking”

  2. Hello Pete
    Installing the beta

    If you want to try out the beta, you will need specify node-red@next when you use npm to update. Without the @next you’ll still get 1.0.x.

    So on a Pi you’d do:

    sudo npm install -g –unsafe-perm node-red@next

    regards
    Brian

    1. What I WOULD like to see but I don’t think it’s going to happen – is a re-write of the attrocious colour-wheel in Node-Red-Dashboard.

    1. Thanks for that Brian

      Personally I’m hard at work getting to grips with Zigbee and Home Assistant (with varying degrees of success) – the last thing I need now is doubts about Node-Red so I think I’ll give that a miss until it is out of beta. I do like the additions to the INJECT node.

  3. Pete, i moved for the esp part from tasmota to this: https://github.com/seb821/espRFLinkMQTT/tree/dev
    it’s WAY faster in detecting rf codes, it has a nice web interface which can decode directly rflink codes, and you just need to flash the espRFLinkMQTT_generic_core_263_1MB_DOUT_rflink-wifi-board.bin you’ll find there, connect to the SSID you’ll see on phone to put in wifi and mqtt infos, and that’s it, it just works on our wemos esp mega board…

  4. I wonder if anyone can help … I’ve long followed and been inspired by this blog and Peter’s home automation aspirations. I too had bought a couple of the expensive 433 meg receivers but found they did not decode signals from many of the devices I had accumulated. Accordingly I was delighted to go the RFlink route.

    Everything was tickety-boo until recently when I decided it was about time I moved over to the July build of Raspian Buster lite on my Pi 3 and the latest Script. My approach with this stuff is to take baby steps and get the RFLink working. It seems the new Serial behaviour is different. When I try to read from the serial port I get the following error:

    “serial port /dev/ttyAMA0 error: Error: Error: Permission denied,
    cannot open /dev/ttyAMA0”

    Previously, I recollect the serial port was called USB0. Is it this that has changed or something else?

  5. MEGA+WiFi R3 ATmega2560+ESP8266, flash 32MB, USB-TTL CH340G, Micro-USB

    my exchange with sales at /robotdyn.com

    me
    external antenna ? where and what size fitting?

    sales
    This item has a built in internal antena (in ESP chip) but it can be changed to an external one
    You can connect antena by micro USB on the board, but first You will have to unsolder the corresponding resistor

    Yes, it should start using the external antenna right away, but we can promiss that for every antenna out there, maybee some will require to do some writting in libraries first

    Me
    Whats the connecter by the 12v dc input?

    sales
    By 12V input You mean DC jack? That’is a micro USB socket, it can be used both for uploading purposes and to connect antenna

    me
    yes by the dc jack not by the reset button which is a usb socket

    sales
    Sorry, my mistake, that IS an antenna connector

    me
    ok
    what size is that connecter ? and the designation so I can order one?
    antenna external

    sales
    moment please, I’l lsend the request for measurments

    me
    ok

    sales
    U.FL socket

    me
    ok thank you I will be ordering some of these

    sales
    No problem, thank You!
    bye

    Actually very good service and in 10 mins I had my answer

  6. Further findings and corrections

    My wife pointed out that the selector switch for the connection of the mega to the ESP was labelled

    TX0/RX0 and TX3/RX3 set to TX 3 this is CORRECT

    not as I thought –

    Selecter switch for TX1/RX1,TX2/RX2,TX3/RX3 set to TX1 XXXXXX WRONG

    My sight is bad

    Have decoded and sent to pi in mqqt , which I can pass onto my existing RF transmitters via node-red.

    HOWEVER there are problems to send back by node-red to the RFlink the other way.

    By the schematic on RFlink site –
    The RFout signal from the mega uses TX3/RX3 which is the selected route for internal info exchange mega/esp appears to be okay,
    however a RFin signal is fed to D16,D19. – D16 is TX2, and D19 is RX1 this could be a problem also you are using up 2 serial ports – serial2 and serial1. Unfortunately I don’t have a Transmitter yet, as I only wanted a decoder(sniffer). So I don’t know if it will also send out a 433mhz RF signal correctly.

    There are 4 Serial connections on the mega.
    TX0/RX0 is the main one via the usb connector I have also used TX0 as the selected Internal route for mega/esp (works)
    The bigger problem The piggyback nodo board sits over the esp the wifi reception was very weak.
    There is an external connection for an aerial next to the 12v input. I have not one so could not try it.

    1. finally i had it working… to reach this, i had to program the mega and the esp8266 as you suggested, but THEN put the serial switch to 0 and NOT to 3… with 3, i get messages in console but they’re never sent to my mqtt broker, as the link between esp and mega is not working… with 0 i have no messages in serial console but i finally get them in my mqtt, which is the only think relevant to me… AND i had to comment the following line in: RFLink_to_MQTT.ino
      //#define USE_SOFTWARE_SERIAL TRUE

      but i think i’ll go for espeasy on the esp8266 part, so i can have a decent web interface to deal with and no need to recompile if i need to change mqtt or wifi settings: https://community.home-assistant.io/t/rflink-on-robotdyn-atmega-2560-with-embedded-esp8266-and-espeasy/50793/5

      or to this, i’ll try both this afternoon: https://github.com/seb821/espRFLinkMQTT

  7. This from suggestions by
    DrFragle and MrShark and many thanks to him/them

    Sorry at disjointed notes I am handicapped with bad sight
    and find it difficult to write

  8. Wemos® Mega +WiFi R3 Module ATmega2560+ESP8266 32Mb Memory USB-TTL CH340G Compatible For Arduino Mega NodeMCU ESP8266

    RFLink loaded in mega,
    /rflink-to-mqtt in the esp8226

    1 2 3 4 5 6 7 8
    CH340 connect to ESP8266 (upload sketch) OFF OFF OFF OFF ON ON ON –
    CH340 connect to ESP8266 (connect) OFF OFF OFF OFF ON ON OFF –
    CH340 connect to ATmega2560 (upload sketch)OFF OFF ON ON OFF OFF OFF –
    CH340 connect to Mega2560 COM3 connect –
    to ESP8266 ON ON ON ON OFF OFF OFF –
    Mega2560+ESP8266 ON ON OFF OFF OFF OFF OFF –
    All modules work independent OFF OFF OFF OFF OFF OFF OFF -NoUSE for switch 8

    Bridge from RFLink to an mqtt broker using ESP8266 programmed with arduino IDE
    https://github.com/kainhofer/rflink-to-mqtt

    In Arduino libraries do not use arduinojson version 6 it generates fault in programme use version 5

    Use the switch settings with upload sketch to uoload RFLink to ATmega2560
    Use the switch settings with upload sketch to uoload RFLink_to_MQTT to ESP8266
    Use the switch settings CH340 connect to Mega2560 COM3 connect to ESP8266 for working connection

    Selecter switch for TX1/RX1,TX2/RX2,TX3/RX3 set to TX1

    Wemos
    Wemos® Mega +WiFi R3 Module ATmega2560+ESP8266 32Mb Memory USB-TTL CH340G Compatible For Arduino Mega NodeMCU ESP8266
    Price: 8,87€

    https://www.banggood.com/Wemos-Mega-WiFi-R3-ATmega2560ESP8266-32Mb-Memory-USB-TTL-CH340G-Compatible-For-Arduino-Mega-p-1205437.html?rmmds=search&cur_warehouse=CN

  9. do you wanna go wireless? You can! 🙂
    this board is an arduino Mega with integrated an esp8266, 10€
    https://it.aliexpress.com/item/Mega2560-WiFi-R3-ATmega2560-ESP8266-32-mb-di-memoria-USB-TTL-CH340G-Compatibile-per-Arduino-Mega/32950536539.html

    you can flash the mega with rflink, and the esp8266 with any of the following:
    tasmota serial bridge: https://github.com/arendst/Sonoff-Tasmota/wiki/Commands#serial-bridge
    rflink-to-mqtt: https://github.com/kainhofer/rflink-to-mqtt
    esp-link: https://github.com/jeelabs/esp-link

    here how to set dip-switches to flash alternatively the 2 integrated devices, and then put them in serial intercommunication: https://iotdiary.blogspot.com/2017/11/esp-link-on-atmega2560esp8266-board.html

    video by Andreas Spiess

    video Csongor Varga

    https://youtu.be/mWx5aa1ri2E

  10. None of this existed when I started my journey into Home Automation but I invested early on in a RFXtrx433E USB device that Max Hadley very kindly created Node-RED nodes for.

    That unit has been live for years now and works flawlessly. Connected to my Pi. Node-RED is used to listen for inputs from many devices including various doorbells (currently 1byone), HomeEasy PIR and magnetic door sensors and an Oregon Scientific temperature/humidity sensor. Outputs go to the doorbell ringers, Lightwave, HomeEasy and other switches.

    433MHz was the only cheap game in town when I started so the £80 or so investment in the RFX unit was easily repaid several times over.

    Now, of course, with cheap ESP’s, things have changed a lot though 433MHz is still great for really low-power units.

    Incidentally, the RFX has no problem with signal reach right through our 5 bed Victorian end-terrace. Though it does require a little care in placement as it is in the loft.

    What is weird is that a year or so ago, after a rare firmware upgrade (the unit gets regular updates published, I just rarely update it). It suddenly started receiving far more signals from houses around us 🙂

  11. It does appear that the American’s *need* their half-price televisions. Certainly not worthy of lining up in a crowd or getting in a physical fight over one…

  12. Thanks for sharing. Your code works fine, however for negative temperatures the parsing should be:
    case “TEMP”:
    var int = parseInt(bits433[1], 16);
    if ((int & 0x8000) > 0) {
    the433.temp = -(int & 0x7FFF) / 10;
    } else {
    the433.temp = int / 10;
    }
    break;

  13. Jose Perez, author of the Espurna firmwware, released a new version for the Itead RF Bridge that bypasses the RF chipset integrated and manages the rf codes on its own, based on the same library on which is based RFlink, i think… so MUCH wider set of recognized devices… BUT, hacking the pcb is needed… info:
    https://github.com/xoseperez/espurna/wiki/Hardware-Itead-Sonoff-RF-Bridge—Direct-Hack

    https://github.com/xoseperez/espurna/wiki/Hardware-Itead-Sonoff-RF-Bridge

      1. my mod works a treat 😀
        way faster than the code in the original chipset, both using the original firmware and espurna without the hw hack… with espurna and no hw hack, some codes took about 2 minutes to get learned… with this, 2 seconds top…

  14. Hi Peter, looks good. I only get stuck on the temprature. The script does not take into account a temparature under 0. I am new to JavaScript.

    I saw a python example somewhere:
    —-
    VALUE_TRANSLATION = cast (Dict [str, Callable], {
         ‘temp’: signed_to_float,
    })
    —-
    #def signed_to_float (hex: str) -> float:
    def signed_to_float (hex):
         “” “Convert signed hexadecimal to floating value.” “”
         if int (hex, 16) & 0x8000:
             return – (int (hex, 16) & 0x7FFF) / 10.0
         else:
             return int (hex, 16) / 10.0
    —-

    Can you help me with that?

    1. hi
      cant access that code as it is in cold storage, we’re moving home. did you mean below 0.1c or 0.1c resolution?

      1. I mean a negative temperature. -1.2C becomes something like 3812.3 (Do not know the exact number anymore)

        1. As mentioned above in the comments. The most significant bit being 1 is the negative sign. I use the below code in code node red to convert the string value to actual float value:

          if (msg.msg433.TEMP!==undefined) {
          if (parseInt(msg.msg433.TEMP, 16) >= 0x8000) {
          msg.msg433.TEMP = (parseInt(msg.msg433.TEMP, 16) & 0x7FFF) / 10 * -1;
          } else {
          msg.msg433.TEMP = parseInt(msg.msg433.TEMP, 16) / 10;
          }
          }

          The temperature come in as string in msg.msg433.TEMP (e.g. “803c”) and it is converted to the actual temp in the same property.

          1. Thanks,

            after some fiddling it works
            have the rule

            case “TEMP”: the433.temp = parseInt(bits433[1], 16) / 10; break;

            replaced by:

            case “TEMP”: if (parseInt(bits433[1], 16) >= 0x8000) {
            the433.temp = (parseInt(bits433[1], 16) & 0x7FFF) / 10 * -1;
            } else {
            the433.temp = parseInt(bits433[1], 16) / 10;
            }
            break;

  15. Sorry Pete, I am back here. I got a bit confused because of the two different 433 versions. I assume you have the 433.92 Mhz version which is more widely used. Is this correct?

  16. Hi Pete,
    Can you tell me how it is working in the last 6 months? Any regrets? There are part of my garden were my Wifi would not reach, so I was thinking about complementing it with RF units. Doorbell is one example I have in mind. I also have a Maplin weather station which would also be nice, but also thinking about using RF motion sensors. Do you have any experience with those? Can they be source cheaply from aliexpress?
    Thanks

    1. The RFLink hardware and free (and well supported) software is WELL worth it. It is in use 24-7 here. It just works. I would prefer it worked on an ESP8266 rather than a mega2560 but it is fine. The only ESP software I am aware of pales compared to this.

    2. I’ve got a few of chinese RF 433 PIR motion sensors in use – at home and at my holiday home – both as part of a cobbled together home made home automation setup. I don’t use RF Link, I use some ESP8266 firmware that translates 433 RF to MQTT https://github.com/1technophile/OpenMQTTGateway. As Pete says, this firmware doesn’t support as many devices as RF Link but works okay for my 433 wall switches, window sensors and PIR movement sensors and that’s all I require of it (it doesn’t pick up the signals from some chinese RF 433 temperature sensors, for example).

      With the 433 PIR sensors, I was concerned that the 9v PP3 battery wouldn’t last long but I’m still on my original batteries several months into using them. I’m pretty impressed.

      They’re marketed under the name “YobangSecurity” on AliExpress

      https://www.aliexpress.com/item/hot-sale-433-Mhz-wireless-PIR-motion-detector-for-home-security-alarm-system-PIR-sensor/32731322511.html?spm=a2g0s.9042311.0.0.0uEe2u

    3. Thanks for the comments. I was not aware of the RF to MQTT project, also worth a try. To be honest I find these Chinese sensors at a very good price, I would certainly not be able to put something like this together with a wemos, sensor, battery, case not even considering time. I think I will get one of these RF ones after Xmas when the shipping hype dies down.

  17. Hey Pete, I have been using my Acurite 01036 Pro weather station last 1 year. Till date, the device predicts the weather correctly. But, after reading your article I ordered the RFLink board. Let’s hope I successfully implement it. If any query related to this I will definitely, touch with you.

    1. Don’t count on me being an expert on it – but it does work – with one issue I’ve reported, the latest software (independently developed) occasionally repeats on some door sensors I use… this is new so no doubt it’ll get fixed.. the guy who does the software, Frank, is generally quite responsive. I have it listening to my Accurite weather station (otherwise useless as it demands a PC be left on!!!) and doorbell and window monitors and a 433Mhz keyring switch. It is working with a dirt cheap Chinese Arduino Mega2560 board and talking via serial to my Raspberry Pi.

  18. Had a lot of fun creating these 2 POC sketchs and hopefully others find them fun too. (They both run on a UNO).
    The “RX” sketch outputs a “code” when a 433 Mhz transmission is received and if you program this code into the “TX” sketch, the “TX” sketch can then spoof the original transmission.
    Possible enhancements could be
    – MQTT transmission of the code to the “TX” sketch”
    – Adapting the “RX” sketch to recognize particular codes .
    https://github.com/CurlyWurly-1/uno_433_sniffer_rx_tx

    One thing is for sure, security is shocking!

  19. Hi I’d like to let you that I created a nodered node for rflink with the codes that you shared here – node-red-contrib-rflink. Thanks.

  20. Right, using the antenna analyser I found that a straight piece of enameled 0.7mm copper wire 180mm long gave a very good VSWR (relatively speaking) and this proved true when I quadrupled the range I could detect the friedland door transmitters from but still not as far as I need.

      1. Hmmm, you know in an earlier post when I said it wasn’t very scientific, well all I did was to insert the lengths of antenna wires into the centre connector of the antenna analyser, no co-ax etc. so when the antenna’s “in circuit” I can’t measure the VSWR. I realise this isn’t the best way to do this, if I had the PCB with the SMA connector then I would use a connector and co-ax etc. but hey I’m using what I’ve got to hand and the results matched my findings so it can’t be too far off.
        Before, when I used the 17.3cm antenna I had to be 12 inches or so away from the receiver to get the signal, with the 18cm antenna I get get 12 – 15 feet away.

    1. That looks like an awesome bit of kit Phil. I wish I had one.

      If anyone wants to make a simple straight antenna then it’s fairly easy to calculate the length. It’s all to do with the wavelength and frequency of the radio wave. The antenna must be tuned (cut to length) so that it resonates with the frequency of the transmitter.

      We should aim for a length of wire that is one quarter of the wavelength of the transmitter. Radio waves travel at the speed of light and for this purpose, we’ll use 300,000 km/S. Simply divide this by the frequency in megahertz (MHz) to get the wavelength. Then divide the answer by 4 to get a quarter-wave.

      300,000 / 433.92 = 691mm. Then divide by 4 = 172mm. That’s pretty close to your 180mm Phil.

      1. Yes, I tried 17.2cm but for some reason the 18mm antenna worked better ??

        With the new receiver an pre-formed coil antenna I’m even picking up the transmissions from a weather station 3 houses away and another one from somewhere else!

  21. I think I might have found an issue, for me at least, when I got the RS receiver “QAM-RX4” I found I couldn’t get any signal so I put a scope on the output of the receiver and found that there seems to be a non-stop data stream going on and my signals don’t get a look in !!
    Going back to the cheaper, less sensitive (maybe) I can see there is data on there but there is less of it any my “wanted” signal gets through.
    I might have to try 868MHz or try to find the source but I don’t think it’s from me!

    1. @Phil Just feedback re stray signals. I’ve found that this seems to be normal behavior, all the receivers appear “noisy” by design.

      If you power the Cheaper Chinese receiver using 3.3V (no aerial), the noise problem disappears, but the downside of reduced sensitivity is that to get a signal being seen, the transmitter has to be less than a few cm away.
      This link works well for me but remember to power with 3.3V and that its use is for sniffing. After the code has been found, then switch to using an RB6 with full power etc.
      Unfortunately this power down technique doesn’t work with the RB6, perversely because it is a much better receiver!
      http://arduinobasics.blogspot.co.uk/2014/06/433-mhz-rf-module-with-arduino-tutorial_27.html

      Its just that when no RF signal is present, the auto gain of the receiver is maxed to the point where annoying background noise/sporadic weak signals are demodulated. However, as soon as a strong RF signal is received, the auto gain whacks down and this filters out background crap, leaving only the strong signal to be demodulated, with its desired OOK (On Off Keying) waveform being seen at the receiver output.

      From a system POV, the constant noise isn’t a problem because validity is checked AFTER the receiver (pulse length and pattern is checked etc).
      Consider a receiver as being a telephone and the “pattern recognition” bit being you listening to the telephone, where you work out who is speaking (is this a valid signal?) after hearing a few words being spoken.

      Also, I’ve found that if you use the other sniffing sketches out there (which use a digital pin as an interrupt) , then be aware this power down technique doesn’t work in combination with 5V arduinos because the “hi” signal from the 3.3V receiver is not enough to trip the interrupt (could try with a 3.3V arduino I suppose?) .

      1. Thanks for the info. I tried the Chinese one at 3.3V and, as you said, it was a lot quieter but still as insensitive as before, I’ve borrowed a spectrum analyser/antenna analyser from work and have been playing around with different antenna designs to see what gets a good VSWR at what frequency (nothing scientific). It’s not easy to get a good antenna dead on 433.92.

        I’ve also been comparing the different frequencies and levels of the different transmitters I have, the Friedland door contacts are much more powerful than the remote switch controllers I have and bang on 433.92MHz but still don’t get received more than 6 feet from the receiver.

        I’ve ordered another couple of receivers from China so let’s see how they perform.

        1. Hi Phil,
          Had a lot of fun today deciphering the Maplin mains switch
          Maplin ORB RF Remote Controlled Mains Plug Sockets Set Version S2 – 3 Pack, White
          (cheaper on fleabay)
          and the driveway alarm
          http://www.ebay.co.uk/itm/1byone-Wireless-Driveway-Alert-Alarm-Shed-PIR-Home-Security-Easy-Match-4-sensors-/142332255268?hash=item2123a9dc24:g:U8kAAOSwIgNXrCQt

          Using 5V to power a cheap Chinese receiver, I connected this to analyze the waveform (kept my finger on the “transmit” button to get sample a nice clean signal)
          http://www.ebay.co.uk/itm/24MHz-8-Channel-USB-Logic-Analyzer-Saleae-8-CH-Logic-Analyzer-for-MCU-ARM-FPGA-/291193504688?hash=item43cc7c43b0:g:0gUAAOSwxKtYBDpC

          I’ve posted the rough Arduino code in the next post to show how I coded the pulses – hope its useful

          1. Those logic analysers are great I used one at work to decode some wireless transmissions that a supplier wanted to charge us £6,000 for the equipment to do the same thing.

            I also used it to sniff the I2C password for the RFID on my 3D printer spool.

        2. /*
          Maplin On Off and 1BYONE Driveway alarm (Remember to press “learn” !!)
          POC by Curly Wurly

          */

          #define ldPin 13 //Onboard LED = digital pin 13
          #define txPin 4 //Output to RF TX module

          #define map_F 575 //Pulse Frequency
          #define map_W 7 //No of pulses before repetition
          #define map_R 10 //repeat

          #define onebyone_F 688 //Pulse Frequency
          #define onebyone_W 4 //No of pulses before repetition
          #define onebyone_R 35 //repeat

          int freq;
          int wait;
          int repeat;
          void maplin_1_1_on(void);
          void maplin_1_1_off(void);
          void onebyone_on(void);

          void H(void);
          void L(void);
          void U(void);
          void W(void);

          void setup() {
          pinMode(ldPin, OUTPUT);
          pinMode(txPin, OUTPUT);
          }
          void L() {
          digitalWrite(ldPin, HIGH); // turn the LED on (HIGH is the voltage level)
          digitalWrite(txPin, HIGH);
          delayMicroseconds(250000/freq);
          digitalWrite(ldPin, LOW ); // turn the LED on (HIGH is the voltage level)
          digitalWrite(txPin, LOW );
          delayMicroseconds(750000/freq);
          };

          void H() {
          digitalWrite(ldPin, HIGH); // turn the LED on (HIGH is the voltage level)
          digitalWrite(txPin, HIGH);
          delayMicroseconds(750000/freq);
          digitalWrite(ldPin, LOW ); // turn the LED on (HIGH is the voltage level)
          digitalWrite(txPin, LOW );
          delayMicroseconds(250000/freq);
          };

          void U() {
          digitalWrite(ldPin, HIGH); // turn the LED on (HIGH is the voltage level)
          digitalWrite(txPin, HIGH);
          delayMicroseconds(250000/freq);
          digitalWrite(ldPin, LOW ); // turn the LED on (HIGH is the voltage level)
          digitalWrite(txPin, LOW );
          delayMicroseconds(250000/freq);
          digitalWrite(ldPin, HIGH); // turn the LED on (HIGH is the voltage level)
          digitalWrite(txPin, HIGH);
          delayMicroseconds(500000/freq);
          };

          void W(){
          delayMicroseconds(500000/freq);
          delayMicroseconds(500000/freq);
          };

          // the loop function runs over and over again forever
          void loop() {

          maplin_1_1_on();
          delay(1000);

          maplin_1_1_off();
          delay(1000);

          onebyone_on();
          delay(4000);

          }

          void maplin_1_1_on(){
          freq = map_F;
          for(int i=0; i<map_R; i=i+1){
          L(); L(); L(); H(); L(); H(); L(); H(); L(); L(); L(); H(); L(); H(); L(); H(); L();
          H(); L(); H(); L(); H(); L(); H(); L();
          digitalWrite(ldPin, LOW); // turn the LED off
          digitalWrite(txPin, LOW);
          for(int j=0; j<map_W; j=j+1){
          W();
          };
          };
          }

          void maplin_1_1_off(){
          freq = map_F;
          for(int i=0; i<map_R; i=i+1){
          L(); L(); L(); H(); L(); H(); L(); H(); L(); L(); L(); H(); L(); H(); L(); H(); L();
          H(); L(); H(); L(); H(); L(); L(); L();
          digitalWrite(ldPin, LOW); // turn the LED off
          digitalWrite(txPin, LOW);
          for(int j=0; j<map_W; j=j+1){
          W();
          };
          };
          }

          void onebyone_on(){
          freq = onebyone_F;
          for(int i=0; i<onebyone_R; i=i+1){
          L(); L(); U(); U(); U(); L(); U(); U(); L(); U(); L(); L();
          U(); U(); U(); U(); U();
          digitalWrite(ldPin, LOW); // turn the LED off
          digitalWrite(txPin, LOW);
          for(int j=0; j<onebyone_W; j=j+1){
          W();
          };
          };
          }

  22. Ok Peter, thanks for the explanation.

    With that I will take my leave and leave you all to it.

    It’s been informative.

  23. Ok Peter, sounds confusing.
    I have a dedicated Pi B+ for my MQTT Server , USB’s are available on there.
    Also a dedicated Pi3 for my home automation, PiFaces on both systems.

    I thought you was running PI’s, I always assume that I use the same as everyone else.

    1. Nick – not everyone is using Raspberry Pi by any means – trust me. Up to now a few of us have been developing my script – which currently off the top of my head will install a fairly standard Node-Red setup along with SQLITE, MQTT and other tools on – Raspberrry Pi 1,2,3, Zero, Zero WIFI, Orange Pi Zero, FriendlyArm Nano Pi M1, M1+, M3, M3, T2, T3, LeGuitar, Odroid C2 and others on Raspbian, Debian, Ubuntu and even the likes of Mint on a laptop and various emulators. The only advantage the Pi usually has is support for GPIO and even then, the Orange Pi is starting to get that support, the GPIO utility works on most of the H3 boards – and now of course as the script runs on Debian on some old phones – I’m thinking my K10000 might just make a decent home server because of the battery backup which blows away anything you could do with a Pi – it is also faster.. the only caviat being controlling IO – but that might be something that’s not important for the central controller depending on what you are doing.

      1. don’t forget that that phone cannot be leaved unattended remotly, as if it will go down to 0 power, even if recharged, nobody can press the buttons to put that back on… unless, a separated device with a transistor or relay connected to the power on contacts of phone, and so, hw hacking the phone…

        1. I did see a YouTube video of a guy who used a micro servo with a cam to operate a light switch, maybe that could be used to operate the phones on/off switch when required.

          1. Phil – good idea and we have a link. What does the panel think of this – 2mm travel which seems IDEAL for the job… I’m thinking – turn power on after failure- Jay suggested 20 second hard boot to be sure…. and this afternoon we’ve been playing with:

            /sys/class/power_supply/battery – and despite this being Debian on the K10000 phone and not the native operating system it is indeed correct so that for example…

            cat /sys/class/power_supply/battery/ChargerVoltage

            gives out an integer value as to the charge voltage so you can easily see if it is on charge, off charge or full – there are many more variables in there to look at.

            I can see a very sophisticated system coming out of this eventually…

            What do you think – solenoid do the job?

            1. there’s a lot of cool stuff we can check in /sys virtual fs… this, on a raspberry, will give you the cpu temperature:

              echo $((`cat /sys/class/thermal/thermal_zone0/temp|cut -c1-2`)).$((`cat /sys/class/thermal/thermal_zone0/temp|cut -c3-5`))

              1. That’s a good idea Phil – a REALLY good one – but we may have something simpler. There are a number of small, cheap solenoids out there, SOME of which PUSH when operated..

                Some feedback from readers here would be good.

                http://www.ebay.co.uk/itm/DC-5V-6V-Miniature-Solenoid-Push-Pull-Type-Inhaled-Micro-Electromagnet-/272597654964?var=&hash=item3f78161db4:m:myQNIqHFkMvgsGV2vKO7_2Q

                What we’re looking for should be cheap – a couple of quid or so – but when power is applied – the plunger should come OUT to reset the phone – not retract back in and I’m not 100% sure about these terms push pull – anyone already familiar with this ?

  24. Can you not still use your NodeRed system ?

    Use the serial output from RFLink and parse the results as you would with the ESP.

    I do this with an RS485 converter, into a python script, then distribute to MQTT Server on my PI.

    Not only that, RFLink works, and there is a lot of support out there.

    Even though, the ESP’s are the way to go, I have loads of ’em somewhere, Even an ESP32 lying about that I have not even wired up yet.

    1. I am using Node-Red Nick – the output from the Mega goes into Node-Red and is processed… sending commands via MQTT to Debian on the phone – which then sends commands via MQTT to Android on the phone and plays doorbells or speech or whatever I need. As soon as I figure out how to share usb serial between the Android phone and the Debian running underneath it – I’ll cut out the middle man.

    2. Yes Nick I’m the same with the ESP32 – I’m waiting for the price to drop before investing my time in them.

  25. Peter, do you run the receiver off 3.3 or 5V ?

    I just tried my cheapy mk 5v on 3.3v and got nothing.

    I thought the ESP was not 5v tolerant, Where are you powering it from ?

    Maybe this is where I never got a signal when I tried it.!
    Maybe yours just about works to a point but the sensitivity is reduced and can only receive close signals ?

    The RXB6 can go to 3.3V so this should be better for the ESP project.

    I also have another one, a H5V4D, not even sure what that is, but it also works in my system.

    Just a thought.

    1. I got a reply from the author of the ESP project this morning…

      “Yes I understood that your bell works with RFlink seeing you first serial extract nevertheless I can’t integrate it as it is not anymore open source.”

      I don’t understand the logic here but it seems he’s not looking into decoding anything that isn’t open source – which puts some severe limits on the repertoire of devices. I think at this point I’m going to concentrate on the RFLink software even though that means a separate board to get the information into MQTT.

      1. Hello,

        First thanks for talking about the OpenMQTTGateway, I saw some traffic coming from this site and I found these comments.
        Here is the explanation, currently the signals decoding is made by libraries:
        -IRremote for infrared
        -rcswitch for RF

        Both of them are open source libraries that can be integrated easily into another code like the OpenMQTTGateway code.
        If there is a need to add a protocol decoding there is several possibilities:
        -find a library that decoded already this signal and integrate it into the gateway (what we’ve tried to find together without success unfortunately)
        -add the protocol to rcswitch, to do this the best thing is to listen the RF signal and reverse engineer the protocol. Difficult to do and test without the device.

        You could say at this point why not adding RFlink code/library, well RFLink is not anymore opensource, you can only find some old source code of the project on the web. In consequence I’m not able to integrate is to the OpenMQTTGateway, added to that the code has to be ported to ESP8266.
        RFlink is so far the code that support most of the RF protocols.
        I made a comparison about the different gateways:
        https://1technophile.blogspot.fr/2017/01/making-your-rf-433mhz-sensors-and.html
        You can find also on the web projects with ESP8266 connected to arduino mega with rflink, to make RFlink compatible with MQTT through a wifi connection.
        https://github.com/enc-X/mqtt-rflink-bridge

        Where the OpenMQTTGateway project stand is more as a cheap, multi platform and easy to integrate alternative by the MQTT support, the compatible devices are also cheap and enable to setup an home automation system without spending 30€ for each sensor.
        https://docs.google.com/spreadsheets/d/1DdtVtSsN25nwP6BZI5q6C9yDGz37tUWjw2SQ1RGwBxU/edit

        Hope to be clear

  26. Here’s an update for you. I took the cheap Chinese receiver (the ones you see on Ebay for £1) and put it on the Atmega. While I could of course read my Byron handset, proving the thing works – it could not get a signal from my weather station outside – a mere 8ft away – despite very carefully putting the aerial together. So it is possible that’s why the ESP version does not pick up the weather station (though it definitely does not do the Byron. So really what this needs is more work with a decent radio receiver and aerial. I’ll pass comment on this again when I have an RXB6 and a decent aerial so I can compare like for like.

    1. I have a Byron controller for some sockets and I have to put it within 6 inches of the antenna to get a signal from it and then it doesn’t see it every time, I think I’ll get a RXB6 as well.

      1. on the RFLINK version, my Byron can be 30 ft away. The pre-built units you see on the market – this is what started me off – around £85 they are – my friend has one – placed on the middle floor of a large old hour with 4 floors – the Byron works ANYWHERE within the building – that’s what we should be aiming for.

  27. BTW, I am not using an RFLINK Board, you don’t need one. Just connect eveything up to the arduino, about 6 wires and your away, I like to do things on the cheap if I can.

  28. Pete, do you think the Sonoff Basic with RF would be able to handle the decode of 433 for things like a couple of Lacrosse sensors? In addition to everything else?

      1. It appears that the Sonoff-Tasmota has some support for the RF. I’ve already used the software in a presentation I did last Saturday at TCF (Trenton Computer Festival). SO I’ll set that up with the RF I have and see what I get. I already have a SDR decoding the LaCrosse WS so I might be able to figure it out. I might need to get an RF remote to play with (okay I want to get one … 😉 ).

        Thanks

  29. Mine seems to pick up Byron Signals, and others.

    Running on an Arduino Mega and tried two receivers, an RXB6, crystal controlled and a cheap XY-MK-5V chinese coil based with no crystal.

    Transmission via an FS1000A, seems to work flawlessly with temp senders and my two OWL Electric meters.

    Also controls my LightwaveRF and HomeEasy setup as well.

    20;00;Nodo RadioFrequencyLink – RFLink Gateway V1.1 – R46;
    20;01;Byron;ID=0076;SWITCH=01;CMD=ON;CHIME=01;
    20;02;OWL_CM119;ID=00A2;WATT=0314;KWATT=000920c3;
    20;03;AB400D;ID=48;SWITCH=1;CMD=ON;
    20;04;Cresta;ID=8001;RAIN=2307;BAT=OK;
    20;05;Cresta;ID=9701;WINDIR=0003;WINSP=0000;WINGS=0000;WINTMP=0098;WINCHL=0098;BAT=OK;
    20;06;NewKaku;ID=0020c8ba;SWITCH=a;CMD=ON;
    20;07;Xiron;ID=5402;TEMP=00a0;HUM=61;BAT=OK;

    20;1E;Tunex;ID=D402;TEMP=00a0;HUM=61;BAT=OK;
    20;1F;OWL_CM119;ID=00A2;WATT=0324;KWATT=00092105;
    20;20;Cresta;ID=9701;WINDIR=0003;WINSP=0000;WINGS=0000;WINTMP=0098;WINCHL=0098;BAT=OK;
    20;21;OWL_CM119;ID=00EC;WATT=0020;KWATT=000bf170;
    20;22;Xiron;ID=5402;TEMP=00a0;HUM=61;BAT=OK;

    1. Nick – when you say “mine” – are you talking about the little ESP project or the RFLINK project and if the former – do I assume this is not MQTT but via serial? More info please. It has to be said, when I tried, I used the cheap Chinese receiver they say is rubbish – I guess I’d better send off for an RXB6.

    2. Oh this just answered my question – yes, you are talking about the RFLINK – yes, Byron works a treat with that – but nice to know you’ve had success with the RXB6 as I have another Mega2560 board… right – I’ll order one of those receivers.

      1. I actually thought the RXB6 was better as it “seemed” to have a better bandwidth and was more sensitive. However , using both, they seem to be the same.

        I have an RFX433 usb module as the main transmitter in my home automation system but thought I would try the RFLink stuff with the spare bits I have lying about.

        I would like to use the ESP’s I have but not had any luck as yet, for some reason it doesnt receive anything at all so I am doing something wrong.

        Mainly me being impatient.

        1. As you’ll see in the updated write-up – I wasn’t impressed by the ESP version at all – which is a shame as it would be all in one little box. It would only work with ONE of my little keypads and ignored everything else. Anyway I’ll program my other MEGA which I didn’t think I had (does anyone make a smaller 2560 version?) and try that receiver – I have something to compare with, having the RFLINK board. I need to get an RXB6 but as I’m off to Spain on the 13th I have a choice of having it delivered there – or getting the UK version and paying 5 times as much.

          Thanks for the feedback. As you can probably see a bag of goodies has arrived for me and so I have some write-ups to do! Busy installing my script on a NanoPi M1+ which up to now looks to be WAY faster than the previous effort. More on that in the blog soon.

  30. I’ve just updated the blog – in light of new info – and sorry to anyone who got a dead site this morning – the ISP has put the site on a newer, faster machine but this caused an unexpected outage (new IP address).

    All seems well now and it is definitely faster. Note the added comments about GPIO on the RF Link device and I understand that R47 version with added IO should be available in a few days – up to now I am well impressed by the response rates from this designer.

    1. Just to let you know Peter that as of 13:30 on 23/3/17 I am still getting page not available if I try to access your home page. I tried flushing the dns cache but no difference. I can only get to this page via a link in an email and if I hit the Home button from here I still get page not found.

      1. I think there are a lot of people on – checked with Antonio in Spain and here in the UK – working.

  31. As usual, I implement a solution and get it mostly working only to fall at the Node Red hurdle…. I can get my Mega and 433 Xmitter to receive and transmit by using the supplied windows app but in Node red I can receive but not send, did you do something special, I’ve tried a function to send exactly the same command as the windows app.

    msg.payload=”10;Eurodomest;0f2719;00;ON;”
    return msg;

    and a trigger node sending the same but I cannot get to board to send anything, the RX LED flashes so something’s being sent, am I missing something obvious?

      1. Thanks for that, I did try a carriage return but I got the syntax wrong! too many languages to remember and not enough room left in my grey matter.

  32. Well, haven’t I just wasted half the day. Someone came on to say they were having problems with my ESP code. Having had reset issues with that ESP 433Mhz code I thought I’d put that to one side and tackle my own code – well, didn’t it fail miserably – time and time again it too would have reset issues.. I even went back a generation of the code – no difference – which seemed odd.

    I got so frustrated I went back to blowing the ESP 433Mhz code referred to above and… THAT was still resetting… not TWO bits of software. I dug out another FTDI and lo and behold – both packages work perfectly.

    So – now I can say with perfectly working 433-to-MQTT Gateway code – rock solid in terms of resetting etc…. that despite claims elsewhere that it has a massive base… it will neither take any notice of my Acurite weather station NOR the Byron door button units. I have a little cheap Chinese no-brand handset I have with 4 buttons – it works with that, but the results are not consistent at all. The RFLink software on the other hand is ROCK SOLID on all (strangely except my little Chinese no-brand 4-button handset).

    I would be OVERJOYED if I’m doing something wrong – but right now – there does not seem to be any remote comparison between the RFLink and the ESP software.

  33. Thanks for the write-up Peter. I have been going round in circles trying to get the TX to work, you came up with the solution. I have been putting in the ID,SWITCH and CMD in the TX string and it didn’t work.

    No-where was it documented to leave these out, only here.

    Many Thanks, I think your write-ups are brilliant.

    Cheers

    Nick

  34. Right I’m back at my keyboard… thanks for all the feedback yesterday guys – clearly this is a topic of interest as I had over 2,200 visitors to the blog yesterday, somewhat higher than normal. Hoping to get some clarity on that cheap ESP8266 solution – as right now it is ignoring both my Accurite and Byron 433Mhz kit – which you’d think would be fairly standard stuff… be nice if such a cheap solution turned out to be ok!

  35. A bit off topic but since your on the topic of doorbells I have been working on making my bog standard 9V battery powered ding-dong doorbell a simple IOT doorbell using your excellent home control code. With a new baby in the house and a bunch of unsolicited sales calls to the door that wake the baby in the middle of vital nap time it was time for this project to be actioned.

    Doorbell push switch feeds into a wemos relay NC input. Relay can be toggled via GPIO4 to disable bell output via smartphone. Switch state is monitored with a optoisolator on GPIO14 and this allows triggering an alternative and less disturbing sound output to a piezo for a shorter beep-beep as well as sending an email or maybe also feeding into a database (future work). Green/Red LED indicator on front panel shows bell enable/disable state.
    Since GPIO2 is free I hooked up a DS18b20 to measure temperature in the hall (sure why not).
    Thanks a million for the excellent code Pete. I still need to optimise the node-red flows and also figure out how to add in a time delay that automatically re-enables the bell after say a naptime of 2 hours. It has been very educational learning about this and putting it all together.

    1. When you say the only thing not supported…

      Let me relate my first experience. I have attached ONLY the 433 receiver (0, signal, 5v) – I saw somewhere that if you don’t connect the IR it just does radio which is what I want – – did I need to put a pullup for IR if not used?

      The reason I say that is starting up is a bit IFFY – sometimes it reboots or has trouble starting – sometimes I get a lot of info in a big package then it says something about STACK….

      When it DOES connect to my MQTT – I can take the little handset I have with 4 buttons and it picks it up no problem – but it does absolutely NOTHING with the BYRON SX35 doorbell pushes (which I know work as they work with the software which is the subject of my article.

      Nope – not having the Byron at all… Ideas?

      Anyone know what I’m doing wrong here? Clearly transmitters don’t need fitting to test.

      1. What i mean is that that all the stuff i have on 433 except receiving klikaan klikuit new model is working .it is using the rc-switch library and you don’t need a pull up if you are not using the ir.
        I am using the setup for 433 only and don’t have issues with the stability .
        I am using the wemos d1 mini just as peter balwin and that is stable. Maybe you will find some clues in the home assistant forum where all the extra stuff is meantioned that is working.

        1. i read somewhere in some teardown that the wemos d1 mini has a better LDO 3v3 voltage regulator than other boards (which use some kind of LD1117V33), and seen many that takes similar LDO to replace the ones on nodemcu and other boards… seems more stable, if i find the original blog post i’ll put a link…

          1. That might explain why I settled on using them for everything. I’d had loads of power problems with other ESP units before I hit upon the mini. I’m not very good with electronics so I could never sort things out previously.

    1. I just installed the above OpenMQTTGateway software on to a wemos mini board – works well for 433 and for IR. Isn’t reading my 433mhz doorbell however since it appears to have some strange encoding which is a little frustrating. (made by Oneby1)

      1. @PeterBaldwin
        Just some feedback – The RFlink works great with my “oneby1” driveway PIR alarms
        http://www.ebay.co.uk/itm/Wireless-Outdoor-Visitor-Intruder-Driveway-Pathway-Chime-Alarm-Alert-PIR-Motion-/141701490930?var=&hash=item20fe1128f2:m:mxk0AAEwZ_q3xKayBh762ig

        Was also very pleased, it picks up my “IQ” garden light PIR system, similar to this

        and this
        http://www.ebay.co.uk/itm/IQ-Technic-500W-Floodlight-Wirefree-Receiver-PIR-Sensor-Transmitter-Bundle-/252038037485

    2. Totally unaware – I would never again go down the route of using Arduinos and those awful Ethernet boards – however – IF the ESP8266 version works RELIABLY – then I think you may have come across an absolute winner because the 433Mhz boards are dirt cheap. It just so happens that I have the right receiver – the right transmitter AND an ESP8266 handy….

    3. I’m not ignoring you – it has taken me this long to get my Arduino environment working and compiling the code which is now happily sitting on an ESP8266. I have the relevant receiver module – which has all of a HOLE in the corner- any idea what the exact length of wire is for the aerial – and what the next step would be – just take the connector off a normal 433 aerial and solder the lead onto the board? I’m not an aerial whizz…

  36. I’ve been using a cheap DVB tv usb dongle with RTL-SDR and RTL-433 software to receive my La Crosse and Acurite weather station and effergy power usage into node-red. It is receive only but at 15 to 20 USD it’s cheap.

        1. I like these SDR dongles. I have one here exactly like the one you’ve linked to that I used to sniff the 433Mhz signals sent from my RF thermostat to my combi-boiler.

          Armed with this captured waveform I was able to reverse engineer and re-implement this weird proprietary protocol in C++ code to get control of my boiler via an ESP12F and a 433Mhz transmitter. Voila – one node-red internet enabled heating system 😉

        2. Thanks for the rtl_433 link, Paul. You’ve killed two birds with one stone for me.
          I bought one of those black, generic dongles from Fbay a while back, hoping to use it for ADS-B logging (aircraft flight data), but the advertisement was bogus and what was sold as an “R820T” tuner-equipped dongle actually came with a 0012 tuner chip, which doesn’t even cover the 1090Mhz ADS-B band. It got thrown straight into the junk drawer, as I had no other use for it.
          It took me about ten minutes after seeing your post to retrieve it, compile rtl_433 and have it successfully publishing the data from my Oregon Scientific weather station sensors to MQTT.
          Winner! 🙂

        3. Nice! I’m able to see one set of my LaCrosse sensors (the weather station). It doesn’t see the other but I may need to find out if those are 433MHz or something else.

        4. Am I right in thinking, that using the SDR dongle from Walmart and the RTL_433 software, I can make use of the Acurite sensor I found on the roof of my house?

          1. Yes Brent that should work fine. Depending on how long its been on the roof the sensor might need a new set of batteries.

  37. Opportune for me too Pete – You must be psychic!

    A while ago I bought some 433MHz RF mains switches from ALDI that the wife LIKES and USES. I’ve been looking for a way to control them with Node-Red and here’s the answer – cheers.

    1. I just noted an issue whereby Byron doorbell pushes would take some reset time before you could re-press the button. I asked Frank Zirrone (the RF433 software for Arduino) about it and he suggested that an improvement could be made. Within half an our an upgrade was made available which did the trick!

      1. Hello Peter, I have the same problem to solve, can you send me your modified code? thanks

  38. Hey Pete – Seems your posts are always bang on timing for me. Im awaiting my RFLink board I ordered a month ago to arrive to hopefully control my rollerblind motors.
    Id be interested to see how you progress further with this and especially how you can send commands ( “ring your doorbell” ).

    1. Hah, excellent to hear my intuition is working Greg.

      Commands.. well, I’ve only just touched that… doorbell: once I could see an incoming command from the door push, the solution was little more than changing the incoming 20 to 10..

      So when pressing the REAL doorpush – this was coming in.

      20;78;TriState;ID=828205;SWITCH=10;CMD=OFF;

      Thanks to some feedback from a friend I sent this – change the start and miss off the titles…

      10;TriState;828205;10;OFF;

      Send that out in my case – and the doorbell rings!

Comments are closed.