All Projects → patrickeasters → nodemcu-sensor-mqtt

patrickeasters / nodemcu-sensor-mqtt

Licence: MIT license
NodeMCU code to report home alarm sensor status to MQTT

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to nodemcu-sensor-mqtt

Esp Mqtt Json Digital Leds
(OBSOLETE) ESP8266 MQTT JSON Digital LEDs for Home Assistant
Stars: ✭ 503 (+2547.37%)
Mutual labels:  nodemcu
Docker Nodemcu Build
Docker image to build NodeMCU firmware for the ESP8266 on your machine
Stars: ✭ 106 (+457.89%)
Mutual labels:  nodemcu
Lorawangateway
A LoRaWan Gateway in LUA
Stars: ✭ 197 (+936.84%)
Mutual labels:  nodemcu
Openwifidetectoresp8266
MASLOW: an Open WiFi Detector with ESP8266
Stars: ✭ 15 (-21.05%)
Mutual labels:  nodemcu
Nodemcu Arduino Pixel Driver
Streaming Led pixel control
Stars: ✭ 81 (+326.32%)
Mutual labels:  nodemcu
Swifitch
Swifitch is ESP8266 based relay board that could be used to turn any light or any wall socket into smart one!
Stars: ✭ 117 (+515.79%)
Mutual labels:  nodemcu
Openiothub
💖A free IoT (Internet of Things) platform and private cloud. [一个免费的物联网和私有云平台,支持内网穿透]
Stars: ✭ 371 (+1852.63%)
Mutual labels:  nodemcu
Nodemcu Tool
🔧 Upload + Manage Lua files on NodeMCU
Stars: ✭ 248 (+1205.26%)
Mutual labels:  nodemcu
Esp8266scheduler
ESP8266 Co-operative Multitasking
Stars: ✭ 93 (+389.47%)
Mutual labels:  nodemcu
Openmqttgateway
MQTT gateway for ESP8266, ESP32, Sonoff RF Bridge or Arduino with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility, SMS & LORA.
Stars: ✭ 2,413 (+12600%)
Mutual labels:  nodemcu
Easyntpclient
Library to read time from Network Time Protocol (NTP) servers.
Stars: ✭ 20 (+5.26%)
Mutual labels:  nodemcu
Nodemcu Espress
Ultra-Lightweight and modular Node.js express like http server for NodeMCU. web - ESP8266
Stars: ✭ 39 (+105.26%)
Mutual labels:  nodemcu
Configmanager
ESP8266 Wifi connection and configuration manager.
Stars: ✭ 149 (+684.21%)
Mutual labels:  nodemcu
Nodemcu Firmware
Lua based interactive firmware for ESP8266, ESP8285 and ESP32
Stars: ✭ 6,884 (+36131.58%)
Mutual labels:  nodemcu
Awesome Esp
📶 A curated list of awesome ESP8266/32 projects and code
Stars: ✭ 212 (+1015.79%)
Mutual labels:  nodemcu
Automated Irrigation System
This is the software of an open source automated irrigation system. The complete setup including hardware can be found in the README.
Stars: ✭ 442 (+2226.32%)
Mutual labels:  nodemcu
Esp8266
ESP8266 NodeMCU Workshop
Stars: ✭ 109 (+473.68%)
Mutual labels:  nodemcu
McuNode-server
McuNode 私有服务器
Stars: ✭ 32 (+68.42%)
Mutual labels:  nodemcu
Esp Lisp
Beta: A small fast lisp interpeter for a ESP8266 as alternative to lua on the nodemcu.
Stars: ✭ 236 (+1142.11%)
Mutual labels:  nodemcu
Esp8266 wifi captive portal
🔑 WiFi captive portal for ESP8266 for phishing WiFi passwords
Stars: ✭ 165 (+768.42%)
Mutual labels:  nodemcu

nodemcu-sensor-mqtt

A project to report home alarm sensor status via MQTT using a NodeMCU development board.

Note: This is archived!

Heads up! I am no longer maintaining this project or really recommend anyone use it. The ecosystem has evolved enormously since 2017 and there are infinitely better solutions than this. I've since migrated to ESPHome, which is a fantastic way to use ESP8266 and ESP32 boards for home automation alongside an active community.

Hardware

This was a pretty simple build, using only a few components

  • NodeMCU Development Board (can easily be found on Amazon or AliExpress)

  • Door sensors (any kind of switch will do)

Firmware Requirements

This project runs using a customized NodeMCU firmware package from the Cloud Build Service. The following modules are needed:

  • file
  • gpio
  • mqtt
  • net
  • node
  • tmr
  • uart
  • wifi

Configuration

secrets.yaml contains the WiFi SSID/PSK and the MQTT broker credentials. Use the secrets.yaml.example file as a base.

config.yaml contains GPIO pin/device mappings as well as some basic MQTT topic/payload configuration.

Circuit Digram

The GPIO pins are configured with the weak internal pull-up resistor enabled. The switches are then connected to ground. When a switch is closed, the GPIO pin reads low.

Circuit Diagram

MQTT

This code publishes a payload of open or closed to an individual topic for each sensor. The topic prefix, topic names, and payload are defined in config.yaml.

Other Links

Blog post

My full Home Assistant Configuration

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].