Skip to content

geripgeri/ESP-MQTT-JSON-ReedSwitch-Sensor

 
 

Repository files navigation

ESP MQTT JSON Multisensor

Based on https://github.com/bruhautomation/ESP-MQTT-JSON-Multisensor

This project shows a super easy way to get started with your own DIY Reed switch to use with Home Assistant, a sick, open-source Home Automation platform that can do just about anything.

Bonus, this project requires no soldering and no breadboards - just header wires and the development board!

Video Tutorial - https://youtu.be/jpjfVc-9IrQ

The code covered in this repository utilizies Home Assistant's MQTT Binary Sensor Component and a NodeMCU ESP8266 development board.

Supported Features Include

  • Reed switch Door/Windows sensor
  • Over-the-Air (OTA) upload from the ArduinoIDE

OTA Uploading

This code also supports remote uploading to the ESP8266 using Arduino's OTA library. To utilize this, you'll need to first upload the sketch using the traditional USB method. However, if you need to update your code after that, your WIFI-connected ESP chip should show up as an option under Tools -> Port -> Porch at your.ip.address.xxx. More information on OTA uploading can be found here. Note: You cannot access the serial monitor over WIFI at this point.

Parts List

Amazon Prime (fast shipping)

Wiring Diagram

wiring diagram

Home Assistant Service Examples

Besides using the card in Home Assistant's user interface, you can also use the Services tool to control the light using the light.turn_on and light.turn_off services. This will let you play with the parameters you can call later in automations or scripts.

Door status

{
"door": true
}

Releases

No releases published

Packages

No packages published

Languages

  • Other 100.0%