Giter Site home page Giter Site logo

esp8266mqttpirsetup's Introduction

This is an example sketch for the esp8266 with a PIR motion sensor that sends an MQTT message when motion occurs to the configured MQTT broker.

It also uses the tzapu WiFiManager package to allow the user to setup wifi.

It is a fork of my basic esp8266 MQTT example sketch.

Hardware

For this project I'm using a NodeMCU esp8266 board. The HiLetgo board. There's a good pinout diagram for the ESP8266 here

I'm using the HC-SR501

Settings in Header

Variable Use
ssid WiFi SSID
password WiFi Password
MQTT_SERVER MQTT server IP address or name
MQTT_PORT MQTT server port
MQTT_TOPICBASE String pre-pended to the topic of all MQTT messages
delayMS default main loop delay in milleseconds
ipInterval default number of intervals between sending IP address, zero to never send

MQTT Configurable Parameters

The following parameters can be configured via MQTT.

Topic Use
esp8266/config/delay main loop delay in milleseconds
esp8266/config/ipinterval number of intervals between sending IP address, zero to never send

Wiring photos

esp8266 hc-sr501 Photo of Wiring

esp8266mqttpirsetup's People

Contributors

rgstephens avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.