GithubHelp home page GithubHelp logo

Comments (2)

depuits avatar depuits commented on June 15, 2024

In the code you can find these sample payloads to adjust the state of the device.

SAMPLE PAYLOAD (BRIGHTNESS):
{
  "brightness": 120,
  "flash": 2,
  "transition": 5,
  "state": "ON"
}
SAMPLE PAYLOAD (RGBW):
{
  "brightness": 120,
  "color": {
    "r": 255,
    "g": 100,
    "b": 100
  },
  "white_value": 255,
  "flash": 2,
  "transition": 5,
  "state": "ON",
  "effect": "colorfade_fast"
}

This example can be found here and the actual parsing of the json currently happens here.

from esp-mqtt-rgb-led.

corbanmailloux avatar corbanmailloux commented on June 15, 2024

Thanks for responding, @depuits. The other place I would suggest taking a look at is the Home Assistant docs for the JSON light. Even if you aren't using Home Assistant, it does document the payload format.

And to answer the overall question: Yes, I built this initially with Home Assistant in mind, but it should be perfectly usable with anything else that can speak MQTT.

from esp-mqtt-rgb-led.

Related Issues (20)

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.