Giter VIP home page Giter VIP logo

homie-rgb-hsi-led-controller's Introduction

Homie RGB LED controller sketch (HSI)

Required Libraries

Homie For ESP8266

ArduinJSON Library

What is this for

It is for use with RGB LEDs, allowing you to send standard MQTT, or MQTT JSON commands. It works with Home Assistant natively, and will work with HomeKit using MQTTTHING for HomeBridge. It uses HSI colors, so you can adjust brightness with minimal color change. And it supports transition( in seconds) when sending commands in JSON

How To Use

  • Set LED pins, and preferences in "config.h"
  • Upload the sketch to the board
  • Open the Homie Config site in your browser
  • Boot up, look for (and connect) to a WiFi network that looks something like lh-#########
  • It will take a few minutes for the config site to see the device, but when it does, enter your WiFi/MQTT settings
  • Now the device is on the network, all that's left is to setup HomeBridge, and Home Assistant

Commands

To send a state to any topic just add "/set" to the end. So, to get JSON state "/light/JSON", and to set that topic "/light/JSON/set"

JSON:

Topic: **/light/JSON

{
    "state": "ON",
    "brightness": 255,
    "color": {
        "h": 360,
        "s": 100
    },
    "transition": 5
}

MQTT Topics:

State: **/light/on ( true/false )

Brightness: **/light/brightness ( 0-255 )

Brightness Percent: **/light/brightnesspct ( 0-100 )

Hue/Saturation: **/light/hs ( hue (0-360),sat (0-100) )

Hue/Saturation/Brightness Percent: **/light/hsb ( h (0-360),s (0-100),b (0-100) )

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.