Tasmota recently supported the RF bridge by iTead which allowed for RF 433 remote devices to be controlled/controlling using Sonoff products. e.g A handphone can be used to control a remote RF device or an RF remote control can use to control a WIFI enabled device.
By using Tasmota, I can control the device using MQTT. This idea fits exactly to my smart home plan. Here is the schematic:
I cheated a bit by having ESP01 mounted on a breakout board. This breakout board converts all the external pins to 5v which simplified the wiring and I do not need to use a voltage level shifter. Moreover, the Arduino 3.3v power does not have enough current to power the ESP reliably and I have to power it via the 5V from Arduino Uno. Next, I used an Arduino Uno prototype shield with a tiny breadboard to hold all the components together. For the RF 433 transmitter/receiver, I am using the development kits when I purchased the all-in-one Arduino development kits. An antenna is added for more sensitivity.
Here is the final prototype.
By using Tasmota, I can control the device using MQTT. This idea fits exactly to my smart home plan. Here is the schematic:
I cheated a bit by having ESP01 mounted on a breakout board. This breakout board converts all the external pins to 5v which simplified the wiring and I do not need to use a voltage level shifter. Moreover, the Arduino 3.3v power does not have enough current to power the ESP reliably and I have to power it via the 5V from Arduino Uno. Next, I used an Arduino Uno prototype shield with a tiny breadboard to hold all the components together. For the RF 433 transmitter/receiver, I am using the development kits when I purchased the all-in-one Arduino development kits. An antenna is added for more sensitivity.
Here is the final prototype.
For testing purpose, I am using a pair of 433 mini wireless receiver and transmitter with preset code. The preset codes are used for testing of the "code learning" process which triggers the LED.
The same idea can be further expanded to various protocols such as Bluetooth and nrf24l01 wireless.
Update 1: I have managed to control Sonoff RF using the bridge. Please refer to this blog post.
Update 2: I have moved the setup to use an Arduino Nano and sensor shield. This has simplified the wiring. The next thing I will do is to put this in a nice casing.
Update 3: In order not to have a buffer overrun, it is best to set "SerialLog 0" at Tasmota console, so that the serial buffer is not overrun. It has been observed that there is some erratic behaviour whereby the serial port stop responding even the code is still running.
Update 1: I have managed to control Sonoff RF using the bridge. Please refer to this blog post.
Update 2: I have moved the setup to use an Arduino Nano and sensor shield. This has simplified the wiring. The next thing I will do is to put this in a nice casing.
Update 3: In order not to have a buffer overrun, it is best to set "SerialLog 0" at Tasmota console, so that the serial buffer is not overrun. It has been observed that there is some erratic behaviour whereby the serial port stop responding even the code is still running.
This comment has been removed by a blog administrator.
ReplyDeleteJust managed to run your code. Little change in sendRFSwitch(), to initialize sendData:
ReplyDeleteunsigned long sendData = 0UL;
sendData |= (byte)(stack[8]);
sendData <<= 8;
sendData |= (byte)(stack[9]);
sendData <<= 8;
and works like charm :-)
Thanks for sharing.
sendData |= (byte)(stack[10]);
Thank You and I have a nifty proposal: Whole Home Renovation Cost house renovation grants
ReplyDelete