You have a MySensors network up and running (or plan) and are looking for cheap devices to add? But you can't/won't build them yourself? Well just add all the things (and by things I mean cheap 433Mhz devices) to your network by building a bridge to your existing mysensors setup!
There are plenty potential devices for this on the market like
What you need to control them are two things: hardware and software. You can buy bridges like these premade but everything I found was really expensive (>50€, sometimes even more than a hundred), so I decided to build one myself. What did I do you ask?
The core of my build is my standard for cheap DIY mysensor nodes: and normal NRF24L01+ (it might be a good idea to add a capacitor) and an arduino pro mini.
To interface with the 433Mhz devices I added a cheap receiver (and plan to add an equally cheap sender too). The receiver is connected to Gnd and 5V (3.3V isn't enough for the receiver I used). It has a pin to add an external antenna but reception was good enough for (need this in only 2 rooms) with a good power supply. There are also (newer?) version out there that have only 4 pins and no antenna pin. The data output pin is connected to interrupt 1 (pin 2) on the pro mini. The pro mini is connected to 5V through the raw pin, the NRF to the 3.3V regulated part of the pro mini. A sender will be added later.
I simply soldered this all together with some wires as I only need one of those. If someone is interested in a real pcb for that just tell me. I might design one.
I stuffed everything into a cheap case I bought from aliexpress or ebay (can't remember). As I didn't have any connectors around (can someone recommend some cheap ones?) I soldered some female headers to the end of the power connections that stick out of the box. These are connected to my serial mysensor gateway via male-to-female connectors. Powering both devices via USB from the raspberry pi seems to work but isn't ideal (it worked more reliably I think on my bench power supply). I plan to add a separate power supply later.
Once you can receive signals you also need to interpret them. So you need to reverse engineer the protocols, filter out the noise, calculate the meaning of life, ... Just kidding, I simply used the awesome rc-switch library that automatically detects most devices. The button I used (more on this later) showed up as this with "advanced receive" demo sketch:
Decimal: 12587345 (24Bit) Binary: 110000000001000101010001 Tri-State: 10000F0FFF0FÖ PulseLength: 409 microseconds Protocol: 1
Raw data: 12680,1304,360,1300,340,388,1288,388,1200,452,1220,400,1212,472,1156,452,1216,512,1120,456,1212,444,1160,1276,412,412,1200,464,1224,348,1268,1284,324,504,1152,1296,332,508,1128,1284,384,444,1180,468,1204,396,1196,1304,380,
So I created a basic mysensors sketch that constantly listens for 433Mhz devices. Once it receives signals from the right id (I used the decimal one) it sends and update to the controller.
I bought one of these very cool looking touch switches from aliexpress. They run on a coincell and contain 1 to 3 touchpads. I got the 3 pad kind and every pad sends its own id (like the one posted above). My sketch translates that to "on" commands of mysensors switches. These then trigger a script in my controller (domoticz and dzVents) that control my led strips on 3 walls of the room.
return {
active = true,
on = {
'Ledcontrol button*'
},
execute = function(domoticz, sensor)
if (sensor.name == "Ledcontrol button left") then
domoticz.devices['RGBW 1'].toggleSwitch()
end
if (sensor.name == "Ledcontrol button center") then
domoticz.devices['RGBW 2'].toggleSwitch()
end
if (sensor.name == "Ledcontrol button right") then
domoticz.devices['RGBW 3'].toggleSwitch()
end
end
}
I plan to also add cheap wireless power plugs to the setup (most of them are controlled via 433Mhz too). For that I need to add the sender first though.
This is a very cheap project. You need
So overall the bridge costs about 5€.
Qty | Value | Device | Package | Parts | Description | MF | MPN | Aliexpress or Ebay link |
---|---|---|---|---|---|---|---|---|
1 | Arduino Pro Mini | |||||||
1 | NRF24L01+ | |||||||
1 | 433Mhz Receiver | |||||||
1 | 433Mhz Sender | |||||||
1 | 5V Power source |
Name | Size | # Downloads |
---|---|---|
OH433MhzBridgeMYS.pdf | 34.86 kB | 473 |
Name | Size | # Downloads |
---|---|---|
OH433MYSGateway.ino | 2.14 kB | 922 |