how to integrate 433MHz temperature & humidity sensors with Home Assistant

A home automation platform, such as Home Assistant, allows you to make temperature v time graphs using sensors that you might place around the home. Monitoring temperatures allowed me to get my heating devices to turn on/off at optimal times. In a future post I’ll discuss how we might use data to be economical.

You’ll have your own reasons to measure temperature or humidity…. so on this page explains how to use an RFlink receiver (under £20) to ‘listen’ to 433MHz temperature sensors sending their data. And at <£10 each, 433MHz sensors are inexpensive so I suggest there’s a lot to gain. My 433MHz project happened because I already had RF temperature sensors from an Oregon Scientific weather station. I then bought Digoo R8H outdoor sensors (which connect with RFlink) and a few Digoo R8S indoor sensors (which I failed to connect to RFlink).

One caveat is that the easiest way to integrate lots of sensors is to use Xiaomi bluetooth sensors linked to an ESP32. Do consider that.

As well as respond to temperature sensors the RFlink device can also control light and plug sockets. The setup is similar and explained here.

You first need a device that can listen to 433MHz RF signals

As well as some sensors, you need a device capable of ‘hearing’ and decoding RF signals. Not just any RF receiver can do that. I chose to make a RFlink device with an Arduino Mega for £15 – £20. (You can instead buy this ready made for twice that price). You copy RFlink software to the Arduino and add some text to Home Assistant’s configuration.yaml. To make that RFLINK device see my illustrated project.

rflink:
  port: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
# EXAMPLE DATA ABOVE - do see the project page  
sensor:
# adds new devices automatically
  - platform: rflink
    automatic_add: true

You now need the device to listen for your sensor transmissions, one by one

At this point it is prudent to turn off any RF sensors to get some radio silence. The RFLink device can ‘hear’ the neighbour’s weather station which sends its readings every few minutes and slightly confuses you. Or not.

In essence you power up one sensor and see if the RFlink picks up its signal. (If you look at the Home Assistant log you’ll see that the sensor sends a string of text as shown below).

20;1E;Xiron;ID=6501;TEMP=006f;HUM=50;HSTATUS=0;BAT=OK; 

THIS DATA OFTEN CONSISTS OF the protocol used eg Xiron; a sensor identifier; the temperature coded as hexadecimal; the humidity as % and the battery state as OK or LOW. Hstatus is short for Humidity status (whatever).  

Important: WAIT to listen out for alternative sensor identities.

Usefully, when Home Assistant is configured with automatically_add (above), Home Assistant will create entities to record your sensor’s field names. Go to Configuration > Entities to find them.

But wait! My Digoo R8H sensor appears to transmit two sets of signals alternately with the result that Home Assistant will treat them as separate measurements. (Easily tested if I move the sensor from hot to cold or vice versa). If this happens to you the fix is easy. Others have even found sensors that “can change their identity when the batteries are low / are changed”.

For example, my Digoo R8H sensor led to 10 entities appearing in Home Assistant. Five of them were labelled tunex_e501_ and five of them were labelled xiron_6501_ So I added the details below to rename them as five entities (named aR8h_).

# Edit configuration.yaml and rename the automatically-added sensors. At the #same time you can remove any duplicate signals by entering an alias.  

sensor:
# adds new devices automatically
  - platform: rflink
    automatic_add: false
# DIGOO BLACK OUTDOOR SENSOR DG-R8H a
  devices: 
    tunex_e501_temp:
      sensor_type: temperature
      name: aR8h_temperature
      aliases:
      - xiron_6501_temp
    tunex_e501_bat:
      sensor_type: battery
      name: aR8h_battery
      aliases:
      - xiron_6501_bat
    tunex_e501_hum:
      name: aR8h_humidity
      sensor_type: humidity
      aliases:
      - xiron_6501_hum
    tunex_e501_update_time:
      sensor_type: timestamp
      name: aR8h_timesent
      aliases:
      - xiron_6501_update_time
    tunex_e501_hstatus:
      sensor_type: humidity_status
      name: aR8h_hstatus
      aliases:
      - xiron_6501_hstatus

Go to Overview > Edit dashboard > add your sensors to a history graph

GRAPH TO ADD

Footnote: don’t have too many sensors

Presently it’s not clear if sensors are interfering with each other (by sending at the same time). It’s not clear whether some or one of my sensors has developed a new alias.

Leave a Reply

Your email address will not be published.