Posts Tagged ‘rf433’

Review of Sonoff RF Bridge, Sonoff 4ch Pro, and Sonoff POW with Sonoff-Tasmota Firmware

September 12th, 2017 No comments

Karl here. Today we are going to look at 2 new and one older Sonoff devices.

I spent very little time with the stock firmware on the device. I don’t like the fact that an Internet connection is needed, and I am not in control. As of the time of this writing I found the Ewelink was not configurable enough to meet my needs. There is one feature that is really nice that I could easily see keeping stock firmware. It is the Alexa Skill. It worked. I am also currently reviewing Vobot Smart Alarm Clock with Alexa integration and had no trouble controlling the Sonoff devices with Alexa. But unfortunately I am lazy and want everything automatic so I can’t keep it. With the RF bridge I was unable to trigger a light from a motion sensor. In comes Arendst ‘s Sonoff-Tasmota firmware  to the rescue. It gets better all the time. It is dead simple, and so configurable now. He continues to add features and devices.

RF Bridge

You may have seen my previous article building a 433toMQTTto433 bridge to use cheap 433mhz devices. I never did build a case for it, and it’s a little bit of an eyesore. When I found out about a nicely packaged one, I was excited to check it out. Like I stated previously, it didn’t work as I anticipated and was glad when I found out Arendst got one as well. He has a good wiki with on the github page and all the needed information to flash and configure so I won’t go into it. It flashed uneventfully. I was a little scared by the design that it was only going to be able to receive 16 individual codes and pass onto MQTT but that is not the case. It passes everything it receives. You can only send 16 different codes right now which need to be saved ahead of time. So after monitoring the MQTT server I ran into first hurdle. I was getting this example json value.

And actually I found after much frustration that “Data” is a nested json value. This took a while for me to figure out. After that it was relatively easy to parse in Home Assistant and move my automations over from the previous bridge.


From the previous article payload off is a made up value and is only used internally to turn the sensor off after a minute.

Just a couple gripes about the rf bridge which are superficial. There is a noticeable increased delay over the homemade bridge from the time it senses a trigger until the light comes on. It is only about half a second but a noticeable difference. And my wife pointed quickly that the led indicating it is on is very bright. I might remove it or install a varistor to tone it down. The receiver does not appear to be as good or might just be that it is in a case or my positioning. I am still able to cover my house but the trigger on my mailbox across the street doesn’t trigger. It was hit or miss on the old one but never triggers now.

FYI I am still running off the same batteries I initially installed in the 433mhz motion sensors over 6 months ago.

Sonoff 4ch Pro

Click to Enlarge

Click to Enlarge

Click to Enlarge

I also received the Sonoff 4ch Pro with 433mhz transmitter remote.

I tested it with stock Ewelink software and all tests done before worked. I quickly installed the alternative firmware from above, and again no loss in functionality. I was still able to pair and clear the 433 MHz remotes. It is weird that it does not indicate with a light that it is in pairing mode as of right now but when you press the button the light blinks when it is learned. The inching, self locking and interlock continued to work as well via switches. I can definitely see this being used for lighting, or if you needed to control multiple items in close proximity. Maybe simple access control. Possibilities are endless. On the product page, it shows wiring with motors as well which looks cool. If I find a unique or interesting project I will share.

The 4 button transmitter is very powerful. It transmits further than any of my other 433mhz devices.

Sonoff POW

Click to Enlarge

A buddy of mine gave me a Sonoff POW to play with. The Sonoff POW is very similar to the Sonoff Basic, but has the ability to measure power usage. I didn’t bother testing the stock software. I went straight to Arendst software. I didn’t have anything to measure power before and this is a welcome addition to my tools arsenal. I don’t need super accurate readings just a good idea what the draw is. I installed a light rated at 75w to test and got the results below. If a more accurate load is available you can calibrate the POW and instructions are in the Wiki.

OTA Firmware

Who wants to drag all their devices back to the PC and flash new firmware? I finally checked it out. It is really simple to do.

First uncomment BE_MINIMAL then export compiled Binary. After a while you will have a bin file in your sketch folder.

Click to Enlarge

After uploading comment BE_MINIMAL, upload again. The 2 steps procedure is because he is running out of space with all the features. He is trying to reduce the code down, and hopefully make this a single step in the future. If you have a web server there are instructions to automate this.


I would like to thank Itead Studio for sending the Sonoff RF Bridge, 4ch Pro and 4 button 433 MHz transmitter. They keep expanding their Sonoff line and make them hacker friendly. I would also like to thank Arendst for his tireless work on Sonoff-Tasmota firmware. If you are just looking to control your lights via Alexa, and don’t mind requiring the Internet to be available the stock firmware might work for you.

$23 Sonoff 4CH Pro 4-Channels WiFi & RF Switch Ships in a DIN Rail Enclosure

June 14th, 2017 10 comments

ITEAD Studio’s Sonoff family is a collection of really useful and inexpensive home automation devices which have been featured multiple times on CNX Software with either to stock firmware and eWelink app, or open source firmware developed by the community. I’m using a Sonoff TH16 to control a water pump, a Sonoff Pow to monitor my office’s power consumption, and Karl used some Sonoff switches to control his lights at home. The company has now launched Sonoff 4CH Pro with 4 relays that can be controlled with buttons on the unit, WiFi, or RF remote controls, and comes in a DIN Rail enclosure.

Sonoff 4CH Pro switch specifications:

  • Connectivity – ESP8266 WiFi module and 433 MHz receiver
  • Relays – 4x HUIKE 230V/10A relays (max 2200W per relays) with NC and NO connection
  • Configuration –  K5 & S6 switch for mode selection; K6 switch for time selection (0.5 to 4s)
  • Misc – 4x user button to turn on/off the relays, 4x LED for relay status, 1x WiFi LED; unpopulated header to program ESP8266 module
  • Power Supply – 5 to 24VDC via power barrel or 90 to 250VAC via “push buttons” terminal block

The board comes pre-loaded with a default firmware working with eWelink app for Android and iOS. The company explain there are three modes of operation which can be controlled with K5, K6 and S6 switches for each relay:

  • Self-locking mode – Each relay can be turn on and off independently.
  • Interlock mode – Only one of the relay can be turned on at a given time. For example if R1 is on, and your press R2 to turn it on, R1 will automatically turn off
  • Inching mode – A button press on the unit, mobile app, or RF/WiFi remote control will turn on the relay for X seconds as defined by K6 “delay” switch. This could be useful for locking mechanisms.

You can select modes per relay, for example R1 and R2 set to self-locking mode, and R3 and R4 to interlock mode. The company also explains you can connect two AC or DC motors using two relays per motor with only one motor controllable at a given time.

The device also supports on/off timer, and works with Alexa and Nest. Eventually, there could be open source firmware for Sonoff 4CH Pro with projects like ESPurna or Sonoff-Tasmota, since the company included the header to update the firmware as the did in their previous models.

Sonoff 4CH Pro is not available right now, but is still listed for $22.90 on ITEAD Studio website, and you can register your email to get informed when the product launched. Note that the RF remote is not included, and if you need it you can purchase it for $4.50 plus shipping.

This $8 USB Transceiver Can Add 433 MHz Device Support to your Home Automation Gateway

May 23rd, 2017 5 comments

With the advent of WiFi and Bluetooth IoT, 433 MHz devices are becoming less popular but are still used for doorbells, motions sensors, windows/door sensors, etc… If you have such devices at home, one way to integrate those into your home automation system is to use an ESP8266 WiFi to 433 Mhz bridge between your gateway and 433 MHz capable products. However, you don’t even need the middleman if you use a USB 433 MHz transceiver connected directly to the gateway. Nathan Chantrell found such USB dongle on Banggood for about $8, and managed to make it work with his Debian Gateway using Node-RED.

433 MHz USB dongle and features:

  • Connectivity
    • 433 MHz transceiver
    • Range – up to 30 to 100 meters (Line of Sight)
    • Tx and Rx for PT2262, PT2260, PT2264, PT2240, EV1527, HS2303-PT codes
    • Can transmit multiple signals independently
  • Control interface – Serial over USB @ 9600 bps
  • Power Supply – 5V via USB port
  • Power Consumption – 15 mA @ 5V in standby mode; 35 mA @ 5V during Tx
  • Dimensions – 8.1 x 2.5cm (excluding antenna); antenna length: 3cm

There’s very little information about the stick on the web, and most information below is from Nathan who focused his work on PT2262 “very basic, low security encoding chip for RF or IR transmission” and found in ultra cheap Chinese security devices, older alarms, and garage door controllers. He found out the dongle has an 8-bit limitations instead of 12-bit for the original PT2262 chip, which limits the total number of codes to 6,561.

He also opened it up to find a CH340 USB-TTL chip, an internal black wire coil. The PCB label is YS-UTR2 for reference. A search for the latter does not bring anything interesting, except a 315 MHz version is also sold on Taobao.

You can send and receiver hex code over serial using a 9600 8N1 connection. Nathan described the receive and transmit bitstream in this blog post, and tested with various devices including Energenie ENER002 plug in sockets  / ENER010 power strip, VStarcam AF117 magnetic door/window contacts with a button, some PIR movement sensors, Semic CS5211DGO smoke alarm, and more. Most device based on the PT chips mentioned in the specifications should work.

He added support in Node-RED with a serial in and out as follows:

The input node will then give me a payload of [ 253, 81, 53, 213, 112, 223 ] which is a decimal representation of our orginal hex fd 51 35 d5 70 df (confused yet?). I just use a function node to concatenate the two parts of the address with the data (all in decimal) eg. 8153213 and use that as the unique code to identify the device.

For transmission just create a buffer with the hex required and send it to the serial out node.

Solar Powered CAREUD U800WF Monitoring System Checks Your Car’s Tires Pressure

April 4th, 2017 1 comment

Every few months, we inflate (or deflate) our car tires at the gas station to match the pressures for front and rear tires given by the manufacturer. But if you want to make sure the pressures are always at their optimal levels, or close to it CAREUD U800WF pressure monitoring system might be a useful little gadget.

The monitor that you can place on your dashboard comes with the following specifications:

  • Display showing pressure with +/- 1.5 PSI accuracy and temperature with +/- 3 °C accuracy for all four tires; data updated every 3 seconds.
  • Connectivity – 433.92 MHz RF
  • Power Supply
    • Solar Panel
    • 5V via micro USB port
    • 900 mAh Li-ion Battery
  • Temperature Range – Storage: -30 to 85 °C; operating: -20 to 80 °C
  • IP Rating – IP5K4K (The “K” in the ingress protection rating means it complies with ISO 20653:2013 Road Vehicles-Degrees of protection)
  • Dimensions – 76 x 50 x 62 (depth) mm
  • Weight – 72 grams

The monitor is only part of the solution as the kit comes with four sensors to connect to your tires, four anti-theft screws, a sensor wrench, a spanner, a charging cable, as well as a user guide, an installation manual, and a warranty card.

The system will alert you by flashing icon and emitting a beep when the pressure is too high or too low, or when the temperature is too high (> 70 °C). It’s also capable of detecting air leakage, and report is the sensors’ battery level is low.

I first found CAREUD U800WF on GeekBuying where it is sold for $79.99 shipped, but you’ll also find it on eBay and Amazon US. I could not find that exact model on Aliexpress, but if you look for CAREUD, you’ll find other models, including some specifically designed for trucks with 6 wheels.

Categories: Hardware Tags: automotive, rf433, security

Karl’s Home Automation Project – Part 2: 433 MHz / WiFi MQTT Bridge, Door & PIR Motion Sensors

March 2nd, 2017 11 comments

Karl here again for part 2 of my home automation project. We will be looking at how to automate your lights based on time of day and motion. In the first part we setup Home Assistant and uploaded firmware to basic Sonoff Wifi switches. Today we will setup a 433 MHz to MQTT bridge and some sensors.

433 MHz

Depending on your country 433 MHz is an open frequency to use to communicate with. There are hundreds of different types of devices that use 433 MHz to communicate information. We will be focusing on 2 today from Gearbest: WMS07 motion sensor (left) and WDS07 door/window sensor (2 parts, right).

I am not taking the door/window sensor apart, since it is super basic, but I’ve included some photos of the PIR motion detector.

Click to Enlarge

Click to Enlarge

433 MHz Bridge

While contemplating how to get presence on a per room basis I ran across this project. It monitors 433 MHz signals and publishes it to the MQTT server. It is a really an easy project. It also has an IR to MQTT feature. I did have an IR receiver and tested it but have not implemented it. He has some good instructions on his page so I won’t go over too much. You can do the bare bones version and just leave off the unused sensors. I also went an extra step and added a light intensity sensor and DHT sensor to the project. It can be found here. I am not going to add those to this write up because trying to keep costs down.

What you will need is

  1. NodeMCU $5.69
  2. H3V4F Receiver Module $1.21
  3. Prototyping board $2.88

That is all that is needed. For about $10 you have an inexpensive 433 MHz bridge. You can put in a box if you want and hide it in a central location away from interference. I would suggest soldering headers to your board just in case something goes bad. I didn’t at first and made my life a pain. There are a ton of 433 MHz receivers. I purchased all the ones on Gearbest and this is by far the best. I did upgrade to a superheterodyne but I am not sure it is any better. I upgraded because I wanted to put the door sensor on my mailbox and get a notification when the mail was delivered. It is about 200’ away and is a little spotty even with a new 433 MHz receiver. I used this antenna design (see picture on right), as it seemed to work the best

Coverage is the biggest concern.  I have a brick single story ranch style home about 2000 square feet and it covers the inside with ease and a lot of the area around the house. If you have a multi-story house or would need multiple receivers you would need to change the MQTT topics to avoid getting duplicates. Below is the final project. To be honest temperature is really the only thing that is useful to me, but wanted to see what could be done. I purchase the DHT11 and the readings are not good. If you want to do this go with the DHT22. Below is a mostly loaded bridge. I don’t have an infrared transmitter yet. I have a different one coming that does the encoding/decoding on a chip and will follow up when I receive it. I am hoping it will be easier/better than using the Arduino library.

Motion Sensor

The motion sensor itself is really easy to setup with jumpers. I suggest turning the LED off, and the time to 5 min after finished setting up with the jumpers. If you notice there is a micro switch in the top left of this picture. It is meant to be a tamper switch but I use it as a toggle switch to quickly turn off the lights. The motion sensor is meant to be used for a security system but I just have them sitting on night stands and corner tables. It works really well to override or turn a light on when Home Assistant ignores the motion. A little squeeze of the box and the light will toggle states on or off.

After your bridge is set up and connected take the motion sensor out and put some batteries in it. Run your batch file to see what code is being sent. For this one we need 2: motion and tamper. Write these codes down.

Home Assistant

Below is the YAML code that I am using with Home Assistant. I made it find and replace friendly. If you copy and find the 4 items below it should work. I think it is relatively easy to follow. It is the typical timed lamp on motion that is on Home Assistant website with some slight modifications. I had to add the turn off motion script because the motion sensors only sends when it senses motion. I also had to add the tamper toggle switch. When you are adding multiple sensors you can only have one “binary_sensor:” group and one “automation:” group etc.

Find/Replace Explanation
generic use livingroom or masterbedroom etc no spaces
5555555 use the motion number you found earlier
8888888 make up a number around your tamper/motion number
9999999 use the tamper number you found earlier.


Door Sensor

For the mailbox sensor here is an example. Same thing on this one run the batch file and find the open and closed codes. I have it send me a notification via pushbullet.

Almost there

We are almost there. Lights are turning on and off magically. Life is good. But there is one situation where it’s not so good. The gloomy day. With the automations above we cannot determine if the blinds are pulled or it is gloomy. We still need the lights to come on under those circumstances to make it really cool. In the next installment we are going to take the motion sensors above and add a light intensity sensor to them. We will be able to do this cheap. We still have a pretty good budget. With the bridge above you open yourself to a bunch of battery operated sensors. You can also control devices, as well, with a transmitter. Any of the transmitters should work on GearBest. You can get the one linked and throw away the receiver. It’s only $1.25.  If you have any questions or concerns feel free to leave a comment.

Item Qty Price Total
Initial Setup Sonoff Basic 5 $4.85 $24.25
Headers 1 $1.50 $1.50
USB to TTL 1 $2.54 $2.54
Motion Sensors NodeMCU 1 $5.69 $5.69
H3V4F Receiver 1 $1.21 $1.21
Prototyping board 1 $2.88 $2.88
Motion Sensor 4 $7.03 $28.12
Grand Total $66.19

Continue reading “Part 3: Adding Light Detection to a Motion Sensor“.