How To: Node Red – Integrate 433Mhz SOS Push Button

In the article about the 433Mhz mini push-button, I had already reported on my wanderings through the wonders of the electronic product world. On this trip I also noticed a 433Mhz SOS button, which actually belongs to a radio alarm system. Conveniently, its radio messages can also be read out with the RF bridge and thus used to control our SmartHome.

How to do this and what you have to pay attention to is explained in the following article.

Hints for our lovely english readers: Basically, many of the articles on Nerdiy.de are translations from the original german articles. Therefore, it may happen here and there that some illustrations are not available in english and that some translations are weird/strange/full of mistakes or generally totaly wrong. So if you find some obvious (or also not obvious) mistakes don't hesitate to leave us a hint about that in the comment section. 
Also please don't get confused, that instead of a "dot" often a "comma" is used as decimal separator. 🙂


Safety instructions

I know the following hints are always a bit annoying and seem unnecessary. But unfortunately, many people who knew it "better" from carelessness lost their eyes, fingers or other things or hurt themselves. In comparison, a loss of data is almost not worth mentioning, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Even the coolest project is worth no injury or other annoyance. https://www.nerdiy.de/sicherheitshinweise/


Requirements

Helpful Articles:
Of course NodeRed should already be installed so that you can take over this configuration. In addition, the Sonoff RF Bridge should already be prepared.
How to prepare this and a RaspberryPi and then install NodeRed on it is described in the following articles.

RaspberryPi – Setting up for Nerdiys!
RaspberryPi – The first configuration
RaspberryPi – Controlling the RaspberryPi via SSH
NodeRed – Installing NodeRed on the RaspberryPi
NodeRed – Install New Nodes
NodeRed – Import and Export Node Code

Sonoff – 433Mhz RF Bridge flashing Tasmota firmware

Required tools:
-none-

Required material:

In the following list you will find all the parts you need to implement this article.


Log in to the NodeRed configuration interface

Before you can edit your NodeRed configuration you must - if activated - first log in to the NodeRed configuration interface.

View of the login screen. Here you have to enter the login details that you entered during the configuration of the login. Information about this can be found in the article NodeRed - User Login Setup.

The SOS button

The SOS button basically looks like a little donut. He comes with a band which makes him perfect to wear around the neck to be always ready to grip. The button is pressed via two blue buttons on the outside of the “donut”. Each press lights up these buttons three times.

The SOS button in donut form including carrying strap.

Import Node Code

The following NodeCode resembles the code that is also used for the window contact, wall push button or mini push button. It triggers an action as soon as a Sonoff RF Bridge flashed with the Tasmota firmware receives a radio message with the appropriate data field. You can take over the code but still have to set the RF code of your radio button. This is described in the next step.

Of course, you also need to update the configuration for your MQTT server and possibly the topic under which you receive the RESULTS of your RF bridge.

Overview of the Node Code
[{"id":"7efc90e1.9792e","type":"function","z":"169c0bb.fea38f4","name":"Button-Press detected","func":"if (msg.payload.RfReceived!==undefined)\n{\n    if (msg.payload.RfReceived.Data===\"RfCode\")\n    {\n        msg.payload=1;\n        return msg;\n    } \n}","outputs":1,"noerr":0,"x":840,"y":3860,"wires":[["459f01f5.ea95e"]]},{"id":"459f01f5.ea95e","type":"debug","z":"169c0bb.fea38f4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":1070,"y":3860,"wires":[]},{"id":"952dc65.594ec38","type":"comment","z":"169c0bb.fea38f4","name":"433Mhz-SOS-Button","info":"","x":430,"y":3780,"wires":[]},{"id":"9c8b57a0.f0cd48","type":"mqtt in","z":"169c0bb.fea38f4","name":"","topic":"tele/RfBridge/RESULT","qos":"2","broker":"c94e86db.dfcde8","x":440,"y":3860,"wires":[["cf3b14b5.f67058"]]},{"id":"cf3b14b5.f67058","type":"json","z":"169c0bb.fea38f4","name":"","property":"payload","action":"","pretty":false,"x":640,"y":3860,"wires":[["7efc90e1.9792e"]]},{"id":"c94e86db.dfcde8","type":"mqtt-broker","z":"","name":"Server-Mqtt","broker":"server.fritz.box","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

Reading and setting the correct RF code

In order for the above-mentioned Node code to work, you still need to set the RF code of your radio button in it. This RF code is a unique ID for each button and also different for each button.

Open the console of your RF-Bridge. In this you will be informed about current events on your RF-Bridge. Among other things, received RF codes are also displayed there.
As soon as you press your SOS button, the radio message sent by this, including the RF code, will be displayed in the console of your RF bridge. Now you have to copy/remember this RF code (indicated by the blue dot in the screenshot), because you have to enter it into one of the imported nodes.
Switch to the NodeRed configuration view and open the menu of the function node “Button-Press detected”. There you replace the part “RfCode” with your previously noted RF-Code.

Then you click on Done, send the changes to the NodeRed server and from now on you should receive a notification via the debug node each time you press the button.

If you do not receive it please check if you have to update the topic under which you receive the RESULTS of your RF-Bridge.


I hope everything worked as described. If not or you have any other questions or suggestions, please let me know in the comments. Also, ideas for new projects are always welcome. 🙂

Fab

P.S. Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you appreciate it that I share these information with you, I would be happy about a small donation to the coffee box. 🙂

Buy Me a Coffee at ko-fi.com

Leave a Reply

Your email address will not be published. Required fields are marked *