Digoo DG-R8H Temperature Sensor + Raspberry Pi + OpenHAB

Why this sensor? Digoo DG-R8H is a cheap (3-4$) temperature and humidity sensor sending data over 433MHz wireless, measurements quite accurate, already in the case.

Idea was to stick it somewhere to the window frame outside. If you do not have OpenHAB and entire own smarthome infastructure it’s used together with Weather Stations like Digoo DG-TH1981.

As I have already Sonoff RF Bridge first thought was it should recognize 433MHz signals and send appropriate MQTT message but not. As we can read more here it requires additional Portisch firmware in addition to Tasmota which allows get raw signals and then build mqtt message based on it. Sounds good however after further research decoding Nexus protocol (some other Weather Stations also use it) is ready yet and people struggle to get final results.

Another interesting project I found and tried was OpenMQTTGateway – OMG. It allows utilize ESP based microcontrollers such as NodeMCU or WemosMini with some 433MHz RF receiver to intercept signals and convert them to MQTT messages on the fly. As it works great as replacement to Sonoff RF Bridge it is not great for DG-R8H and Nexus protocol. Author is working on that and in some day we could get right code.

Third option that I read about was another project called nexus433. The idea behind is little bit different. This application needs to be build on Raspberry Pi and works as daemon intercept 433MHz signals just natively supporting nexus protocol. It requires receiver but I have used the one for 2$ and works quite fine.

Hardware

Software

On the Raspberry Pi I have installed OpenHABian but I guess native Raspbian can be useful as well. The only thing you have to do is follow instructions on the github page of the project: https://github.com/aquaticus/nexus433

In practice I ran into issue on the step:

It seems to depends on you kernel version latest version can cause some compilation issues. I just tried other stable version and works fine as well.

When you connect 433MHz module to the GPIOs remember that Raspberry has them more than one so you may be flexible. The only thing is update you /etc/nexus433.ini file and define proper one.

Once you set it up you may execute it in verbose mode to check results. In order to speed up process you have to remove and put battery to enforce generating RF signal. Output should be similar to the one here:

OpenHAB

As we have MQTT messages already in our Mosquito broker it is just matter of define new thing and items for collecting temperature and humidity values.

mqtt.things could be like this:

default.items

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *