Navigate back to the homepage

433Mhz <-> MQTT gateway with some extras

Markus
January 22nd, 2017 · 1 min read

Smart Home 433Mhz RF <-> MQTT Gateway with Some Extras

The MQTT-433mhz-gateway-homie project is a simple bidirectional gateway to transmit and receive 433Mhz RF signals connected to MQTT. The gateway is built with a cost-effective ESP8266 WiFi chip (I used a Wemos D1 mini, NodeMCU will do as well), simple 433Mhz RF modules and an additional BMP085 sensor.

It enables you to:

  • receive MQTT data from a topic and send the 433Mhz signal.
  • receive 433Mhz signal from a traditional remote, optional map it to a channel and publish the data to a MQTT topic.
  • additionally, a simple temperature sensor can record the room temperature of the room where the gateway is installed.

The software is based on Homie to enable easy integration with home automation systems like OpenHab.

The final assembly looks like this:

final assembly

Hardware

  • ESP8266 (Wemos D1 mini, Nodemcu)
  • RF Receiver 433Mhz
  • RF Transmitter 433MHz
  • BMP085 or BMP180 sensor breakout

I got the RF modules from https://www.sparkfun.com, others will do as well. Additional I got some Wemos Protoboards, a USB power supply with a very short cable and an enclosure to keep all together.

The circuit inside the enclosure box:

final assembly in box

Building the circuit

The wireing of the gateway project is very easy. The sensor, the transmitter and the receiver must be connected to VIN & GND and the GPIO pins of the ESP8266 board as shown in the table below.

Fritzing Diagram

Wemos D1 miniBMP085RF ReceiverRF Transmitter
5VVINVINVIN
GNDGNDGNDGND
D0DATA
D1SCL
D2SDA
D5DATA

Software

The following software libraries are used. When using PlatformIO all dependencies are resolved automatically.

MQTT

For detailed documentation of the MQTT topics and commands used see Homie documentation.

Sample gateway messages:

1# sensor temperature reading
2homie/mqtt-gateway-livingroom/temperature/degrees 23.70

Temperature value send from device.

1# send RF command via MQTT & response
2homie/mqtt-gateway-livingroom/MQTTto433/on/set 1394001
3homie/mqtt-gateway-livingroom/MQTTto433/on 1394001

First line: MQTT command send from MQTT client or smart home solution. Translates into the code send by the RF transmitter. Second line: Response from a device after the RF signal was transmitted.

Config

The following config parameters are available via MQTT message (see Homie documentation how to use):

ParameterTypeUsage
temperatureIntervallongtemperature reading interval in seconds
temperatureOffsetdoubletemperature offset (-/+) to correct the sensor reading, for example if used in enclosure box
channelsconst char*mapping of 433MHz signals to mqtt channels, useful if used with OpenHab

All configs can be set during the init procedure of the module or via MQTT messages (see Homie specification).

Sample config:

1{
2 "settings": {
3 "channels": "o-1:[139400];o-2:[139707];o-3:[1398097,1398100];o-4:[139803];i-1:[44618];i-2:[44620];i-3:[44623];i-4:[44638];i-5:[44700];“,
4 "temperatureOffset“: -2.4,
5 "temperatureInterval": 300
6 }
7}

Credits

This project is was inspired by 1 Technophile’s 433toMQTTto433 solution.

Read More

Homie Sensor project with BME280

The mqtt-bme280-homie project is a small and easy to integrate temperature, air pressure and humidity monitoring solution with an extra SSD1306 OLED display. Sensor data is send via MQTT and displayed on the small screen.

January 11th, 2017 · 1 min read

Building Experiences - AEM & Magento Commerce Integration

On July 28th I was a guest on Mark Szulc's Building Experiences using Adobe Experience Cloud show. We discussed how Adobe Experience Manager works together with Magento, using the latest release of the Commerce Integration Framework.

July 31st, 2020 · 1 min read
© 2017–2020 | Made with ❤ by Markus Haack | Built with: Gatsby.js & Novela theme
Link to $https://twitter.com/mhaackLink to $https://instagram.com/mhaackLink to $https://github.com/mhaackLink to $https://de.linkedin.com/in/markushaack