Code Monkey home page Code Monkey logo

esp-mqtt-light's Introduction

Home Assistant ESP32 MQTT Light Adapter

This will help you to build Home Assistant MQTT adapter to control any kind of light

Has build with esp-idf commit 93a8603c545fb8e54741d6685146e2f3b874378d

Hardware Required

This firmware can be executed on any ESP32 board, the only required interface is WiFi and connection to internet.

Configure the project

You have to config wifi SSID / PASSWORD and MQTT broker URI:

idf.py menuconfig

Example of config:

WIFI_SSID: Xiaomi
WIFI_SSID: password
MQTT_URI: mqtts://192.168.31.116:8883

Security

You have to provide server CA certificate in the security folder in PEM format

cat /mosquitto/security/ca.crt > security/ca.crt

Build and Flash

Build the project and flash it to the board, then run monitor tool to view serial output:

idf.py -p PORT flash monitor

(To exit the serial monitor, type Ctrl-].)

See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.

Using

Now it's just read data from one MQTT topic update current state and write to another

Read topic: discovery/light/esp32_yellow_garland/set
Write topic: discovery/light/esp32_yellow_garland/state

I know that I have to move it in the config system and provide defaults

esp-mqtt-light's People

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.