i only just now read this, but lots off 433 mhz switches can also be used be mysensors.
i have lots of 20 year old 433 mhz switches lying around.
in the last year i started to implement those again.
i have a 433 mhz transmitter on an arduino nano connected with mysensors to HA.
now i can use my old switches again.
i personally have no use for a reciever, because i switch everything with mobile, tablet or PC or automation.
through MQTT will also work, i guess.
but because i already have lots of other mysensos projects i want to keep 1 system.
with youre nodemcu and reciever and transmitter you could do that also (if you would like to)
I also use mysensors with both arduino and ESP8266 nodemcu but only with the nRF24L01. Would you mind @ReneTode to share your MySensors Arduino sketch? I didn’t know that mysenssors support the 433mhz modules…
Thank you!
depend on witch type of switches you use.
i have a general switch for kaku, elro, blokker and action switches.
those are cheap switches from the Netherlands. (elro also in Germany)
recently i helped someone with a set of livolo switches.
i’m sure that there are libs for almost any switchtypes to be found and rewritten.
my setup you find here: General Mysensors 433 mhz switch
but in the time since i have moved my HA automations to appdaemon https://github.com/acockburn/appdaemon
and that is to be found here AppDaemon Q&A
that works with the same sketch.
it is still in 1.5 but i have moved my gateway to 2.0 and it still works (so rewriting can wait )
For sending out messages to 433MHz-switches there is the well supported pilight package (www.pilight.org). Receiving from remotes seems to be in that package, too. Maybe another way would be the rfm69-esp8266-gateway.
I am just looking around how to translate from different sensors (433,868,915) to MQTT with an esp8266.
pilight is nice but it has little flexibility.
you need a raspberry or a PC at the point you want to transmit or recieve.
i use arduino because i can place it every place around my (big) house.
in the near future i will have about 10 transmitters around the house to control my switches. that would be hard to do with pilight.
I’m exactly doing what you are expecting, I have bought cheap RF433mhz sensors and plugs like:
-door sensor
-PIR sensor
-smoke sensor
-wall switch
Added to that I have made some sensors myself based on DHT22.
All these sensors are going through an 433mhz arduino bidirectionnal MQTT gateway, you can do it also with an esp8266 gateway.
You have to be carefull with the antennas and power of the 433mhz components. I’m using fs1000A emitter + XD RF 5V receiver, FS1000A can be powered up to 12V to get more range, I’m using with it a small helicoidal antenna. The receiver is connected to a 3dbi antenna
A subject describe how to interface it with home assistant
2 Likes
Thanks. I’m following your guide now. I notice in your guide for esp8266 gateway, you didn’t link the ESP8266WiFi library and also 2 missing images. May I know where do I find the ESP8266WiFi library for the arduino IDE? Thanks again.
These are the instructions that I use:
1 Like
I have successfully completed the steps for ESP8266 gateway. Now the gateway is connected to my WiFi and my MQTT broker.
So where do I go from here? How do I capture the code from my 433Mhz sensors and switches using the gateway?
If you subscribe to the topic of the gateway :
mosquitto_sub -t home/433toMQTT -v
And press a button of your wall switch remote control close to the receiver you should see the code appears.
After you can publish the code to power on or off your plug:
mosquitto_pub -t home/MQTTto433/ -m 1315156
1 Like
The code will appear in the Serial Monitor?
the commands should be launched on server side where mosquitto is installed, the code should appear on serial monitor and on the command line.
If not, it is possible that your remote control generate code with a protocol that cannot be handled by the rcswitch library.
To validate a problem of protocol you can make an emitter for test purpose with an arduino or an esp8266 and add to them a sample rcswitch emitter sketch. After you can verify if the gateway is able to listen the rf code emitted.
The plugs that are compatible with rcswitch are most of the time the cheaper ones, here is a list of compatibles hardware:
thanks. i was testing a wireless doorbell that i have. i guess it is not a 433mhz doorbell. will get my hand on some of the sensors you shared. really appreciate your help.
Today, I managed to get the same (or look the same) presence sensor and door sensor. The presence sensor works perfectly.
However, I have some issue with then door sensor. When put in the battery, I can see it transmits a code instantly to the gateway around 14 times. If I apply and remove the magnet from the switch, I don’t see any code being transmitted. I assume there is nothing wrong mechanically because I can hear clicking sound when I do that.
Is this normal or is there any other steps that I missed?
@1technophile, by the way, how do you power your NodeMCU? If I unplug it from my PC and plug it to a USB phone charger, it doesn’t seem to work.
depends on the phonecharger.
some off them control which device is on the other end (some apple phonechargers only charge apple for instance)
i power my arduino’s and nodeMCU’s almost all with small phonechargers.
Is the nodemcu not powering on or the signal that is not sent to mqtt broker?.
If it is the nodemcu, it is more an issue with your phone charger. If it is a question of signal I can advise you to power directly the receiver directly with the power supply and not with the Vin
No it is not normal to don’t have code sent when you remove the magnet from the switch, it should send code three or four times when you remove the magnet from the base (the little red led should switch on at this time)
I have tried multiple chargers but still the same.
Weird thing is I can see the NodeMCU is connected to the Wifi in my router.
@1technophile, how do I find out whether it is the nodemcu not powering up? I can see the blue LED blink once immediately i plug in the USB charger.
Another weird thing is if I plug it into my PC and waited for few minutes, it doesn’t work too. I have to open up the Arduino IDE and then serial monitor to have it working properly. It continues to work after i close down the IDE. It seems like it needs the serial monitor to start the program.
I’m not sure it helps or not but this is what I selected in the IDE…