All Projects â†’ Zepheus â†’ Esp8266 Rf Mqtt Bridge

Zepheus / Esp8266 Rf Mqtt Bridge

Licence: mit
A MQTT to 433/315Mhz RF bridge build on the ESP8266 for home automation

Labels

Projects that are alternatives of or similar to Esp8266 Rf Mqtt Bridge

Sslclient
🔒Add SSL/TLS functionality to any Arduino library
Stars: ✭ 45 (-18.18%)
Mutual labels:  arduino
Cayennelpp
Library for Arduino compatible with Cayenne Low Power Payload
Stars: ✭ 51 (-7.27%)
Mutual labels:  arduino
Bleeper
Library to manage your firmware configurations written in C++
Stars: ✭ 54 (-1.82%)
Mutual labels:  arduino
Homeduino
Arduino library for home control
Stars: ✭ 47 (-14.55%)
Mutual labels:  arduino
Microblu mqtt
Microblu OS (firmware for Arduino-compatible devices) using MQTT
Stars: ✭ 50 (-9.09%)
Mutual labels:  arduino
Pedalshield
pedalSHIELD Arduino Guitar Pedal.
Stars: ✭ 52 (-5.45%)
Mutual labels:  arduino
Tracer Rs485 Modbus Blynk
An arduino sketch to connect the EPSolar/EPEver Tracer A/B Series (RS-485 Modbus) to an ESP8266 and monitor using the Blynk mobile app.
Stars: ✭ 46 (-16.36%)
Mutual labels:  arduino
Neocandle
Candle for Adafruit NeoPixel
Stars: ✭ 54 (-1.82%)
Mutual labels:  arduino
Esp32modbustcp
Modbus client for ESP32
Stars: ✭ 51 (-7.27%)
Mutual labels:  arduino
Desk Lamp Alternative Firmware
An alternative firmware for the Mijia Xiaomi Desk Lamp
Stars: ✭ 54 (-1.82%)
Mutual labels:  arduino
Ppm encoder
Generate PPM signal using Arduino
Stars: ✭ 49 (-10.91%)
Mutual labels:  arduino
Libraryepd
Library Arduino for 4.3 inch e-Paper by Waveshare
Stars: ✭ 50 (-9.09%)
Mutual labels:  arduino
Digitrack
Attacks for $5 or less using Arduino
Stars: ✭ 53 (-3.64%)
Mutual labels:  arduino
Gy521 Dev Kit
Some tools that aid projects utilising the GY521 breakout board (MPU5060 chip)
Stars: ✭ 47 (-14.55%)
Mutual labels:  arduino
Gem
Good Enough Menu for Arduino
Stars: ✭ 54 (-1.82%)
Mutual labels:  arduino
Mifare Classic Toolkit
RFID / NFC :: Mifare Classic 1k info and tools
Stars: ✭ 46 (-16.36%)
Mutual labels:  arduino
Jarvis Ai
It is an AI assistant which will automate your task like it can send emails also it can control lights using raspberry pi it can inform about weather and many more features
Stars: ✭ 52 (-5.45%)
Mutual labels:  arduino
Segacontroller
Arduino library to read Sega Genesis (Mega Drive) and Master System (Mark III) controllers.
Stars: ✭ 55 (+0%)
Mutual labels:  arduino
Victron.arduino Esp8266
Code to read the VE.Direct-Protocol from serial into a value array. Uses a non-blocking read loop and does checksum verification before adding the data.
Stars: ✭ 54 (-1.82%)
Mutual labels:  arduino
Wifisatellite
WiFi Satellite Project - as seen on the Chaos Communication Congress
Stars: ✭ 52 (-5.45%)
Mutual labels:  arduino

ESP8266 433/315Mhz MQTT over WiFi bridge

This MQTT bridge allows you to control cheap home-automation RF power outlets using a common MQTT interface. With e.g. Home-assistant, these power outlets can then be switched on/off remotely over the internet and integrate seamlessly with IFTT.

MQTT auto-discovery

The MQTT broker is automatically discovered through mDNS. When you do not want to use this, simply put the static IP or hostname of your MQTT broker in the hostString variable.

To enable MQTT discovery on the broker, simply install avahi-daemon. For a Raspberry Pi, use the following command:

sudo apt-get install avahi-daemon

Next, create the following service declaration in /etc/avahi/services/mqtt.service:

<service-group>
  <name replace-wildcards="yes">MQTT on %h</name>
  <service>
    <type>_mqtt._tcp</type>
    <port>1883</port>
  </service>
</service-group>

Restart your avahi-daemon service: sudo service avahi-daemon restart.

Please note that discovery over mDNS only works within the same multicast/broadcast domain and cannot cross network interfaces, unless a mDNS-repeater or igmp-proxy is used.

MQTT protocol

The following MQTT payload should be sent:

  • Topic: /switch/rf/[ID]
    • e.g. /switch/rf/5
  • Payload: [protocol]|[pulselength]|[binary code]
    • e.g. 4|101|101010100100101100101100

These protocol, pulselength and binary variables can be sniffed as described in Obtaining RF codes.

For persistency, the retain-flag can be set such that the codes are re-sent when the ESP8266 is rebooted.

Code setup

  • Get the Arduino ESP8266 firmware. For install instructions please check here.
  • Install the Arduino RC-switch library
  • Install the Arduino PubSubClient library
  • Configure your wireless password in the WIFI_SSID and WIFI_PASSWORD variables

Wiring

The firmware was tested on a NodeMCU development board. The 433/315 transmitter data pin was connected to D2 pin (GPIO4), but any other gpio can be used. Most transmitters can be powered using 3.3V directly.

Obtaining RF codes

The RF codes can be sniffed using the RC-switch examples using an Arduino or ESP8266 as well. Keep in mind that there might be a difference measured in pulselength depending on the device, since rc-switch (currently) does not adjust for clock speed. It is therefore advisable to also use an ESP8266 when sniffing the codes.

Home Assistant example

Example configuration in Home Assistant

# Broker config
mqtt:
  broker: 127.0.0.1
  port: 1883
  client_id: home-assistant-1
  keepalive: 60

# RF switch
switch:
  - platform: mqtt
    name: "Bedroom light"
    command_topic: "switch/rf/1"
    payload_on: "4|101|101000110001100001101100"
    payload_off: "4|101|101010100100101100101100"
    optimistic: false
    qos: 0
    retain: true

License

The code falls under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].