Coder Social home page Coder Social logo

vpcola / mqtthomeauto Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 3.0 66 KB

ESP32 Home Automation Example using secure MQTT

Home Page: http://www.iotcebu.com

Makefile 0.22% C 97.98% C++ 1.80%
esp32 homeautomationsystem rmt remotecontrol mqtt securemqtt

mqtthomeauto's Introduction

ESP32 MQTT Home Automation Example

  • This example will show you how to use I2C module by running tasks on i2c bus:

    • read external i2c sensor, here we use a HTU21D humidity and temperature sensor.
    • write to an I2C port expander IC (MCP23017) to interfacing with relays
    • Use I2C port (master mode) in ESP32.
  • Pin assignment:

    • I2C master :

      • GPIO22 is assigned as the SCL (clock) signal of i2c master port
      • GPIO21 is assigned as the SDA (data) signal of i2c master port
    • LED PWM Dimmer

      • GPIO16 is assigned as a PWM output using the ledc peripheral of the ESP32
      • GPIO17 is assigned as a PWM output using the ledc peripheral of the ESP32
  • Test items:

    • Connect to Wifi.
    • Conned to MQTT Broker securely (using secure web sockets)
    • Subscribe to topics for the dimmer and the relays/switch connected to the port expander
    • Periodically read temperature and humidity data (as soon as connected to MQTT), and publish to MQTT
    • Set port expander data (MCP23017) if data from subscribed topic arrives
    • Set led pwm data if subscribed topic arrives.

TODO: * Connect an IR Transmitter to control HVAC (air conditioner) and Fan

mqtthomeauto's People

Contributors

dusnoki avatar vpcola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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