All Projects → timmo001 → ESP8266-MQTT-JSON-Lights

timmo001 / ESP8266-MQTT-JSON-Lights

Licence: MIT license
ESP8266 MQTT JSON Lights. Supports brightness, effects, speed and OTA uploads. Works with MQTT JSON and Home Assistant

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to ESP8266-MQTT-JSON-Lights

Esp Mqtt Json Multisensor
(OBSOLETE) ESP MQTT JSON Multisensor for Home Assistant. Supported sensors include the TEMT6000 light, AM312 PIR, DHT22 temperature/humidity sensors. RGB led supports flash, fade, and transition. Over-The-Air (OTA) uploading, too!
Stars: ✭ 323 (+1096.3%)
Mutual labels:  light, nodemcu, led
awesome-ha-blueprints
A curated collection of automation blueprints for Home Assistant.
Stars: ✭ 258 (+855.56%)
Mutual labels:  light, hassio
Esp Mqtt Json Digital Leds
(OBSOLETE) ESP8266 MQTT JSON Digital LEDs for Home Assistant
Stars: ✭ 503 (+1762.96%)
Mutual labels:  nodemcu, led
Msirgb
Alternative to MSI Mystic Light for controlling motherboard LEDs, without the fixed 7 colour limitation.
Stars: ✭ 276 (+922.22%)
Mutual labels:  light, led
Wled
Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
Stars: ✭ 7,626 (+28144.44%)
Mutual labels:  light, led
Ailight
AiLight is a custom firmware for the esp8266 based Ai-Thinker (or equivalent) RGBW WiFi light bulbs
Stars: ✭ 248 (+818.52%)
Mutual labels:  light, led
ledcat
Control lots of LED's over lots of protocols
Stars: ✭ 89 (+229.63%)
Mutual labels:  led
Cayenne-MQTT-ESP
Cayenne MQTT ESP8266, ESP32 & NodeMCU Library
Stars: ✭ 87 (+222.22%)
Mutual labels:  nodemcu
vscode-theme-gruvbox-minor
Gruvbox theme for Visual Studio Code
Stars: ✭ 17 (-37.04%)
Mutual labels:  light
wifi-tally
An affordable and reliable Tally Light that works via WiFi based on NodeMCU / ESP8266. Supports multiple video mixers.
Stars: ✭ 66 (+144.44%)
Mutual labels:  nodemcu
RGB-Fusion-Tool-PS
Powershell that use RGB Fusion CLI to associate profiles with Windows Processes
Stars: ✭ 30 (+11.11%)
Mutual labels:  led
esp8266 p1meter
dsmr 4.2 P1 meter to mqtt using esp8266 nodemcu
Stars: ✭ 69 (+155.56%)
Mutual labels:  nodemcu
EnvelopLX
Interactive LED lighting control for Envelop
Stars: ✭ 39 (+44.44%)
Mutual labels:  led
hassio-vagrant
Vagrant box running Hass.io / Home Assistant
Stars: ✭ 42 (+55.56%)
Mutual labels:  hassio
mini-humidifier
Minimalistic humidifier card for Home Assistant Lovelace UI
Stars: ✭ 129 (+377.78%)
Mutual labels:  hassio
stm8s-sdcc-examples
Example codes using sdcc to target STM8S MCUs.
Stars: ✭ 31 (+14.81%)
Mutual labels:  led
esp8266
esp8266 resources.
Stars: ✭ 17 (-37.04%)
Mutual labels:  nodemcu
cyclops
Precision current source, with optional optical feedback, for driving LEDs and laser diodes
Stars: ✭ 38 (+40.74%)
Mutual labels:  led
LIFX-Control-Panel
As LIFX no longer supports their Windows 10 app, I created an open-source alternative for controlling LIFX-brand smart lights.
Stars: ✭ 137 (+407.41%)
Mutual labels:  light
minidenticons
Super lightweight SVG identicon (icon avatar) generator
Stars: ✭ 89 (+229.63%)
Mutual labels:  light

ESP8266 MQTT JSON Lights Build Status

ESP8266 MQTT JSON Lights. Supports brightness, effects, speed and OTA uploads. Based on https://github.com/bruhautomation/ESP-MQTT-JSON-Digital-LEDs

Showcase Video

Showcase Video

Known working devices

  • WS2812 5v LED Ring
  • WS2811 5v LED String (Required NEO_GRB to be changed to NEO_RGB on line 56 in main.cpp for my set of lights)

This is not a comprehensive list by any means. Just devices that I or others have tested are working. Feel free to try uploading to your own device and add a pull request if your device works also.

Hardware Setup

Hardware is your choice of course. My examples however only requires a 5v power supply (which could just be USB) with high enough amperage to drive the LEDs.

USB Neopixel WS2812 Ring/Strip Version

USB Neopixel WS2812 Ring Version

A 5V power supply may be required if your lights draw too much current. If this happens or you are planning to use more than 30 leds or so, use the below method.

5v PSU Neopixel WS2811 String/Strip Version

5v PSU Neopixel WS2811 String/Strip Version

The diode / zenner diode isn't required, but I added it to avoid any reverse current issues.

You can drive over 100 LEDs without issues on this method. You may however have to add a wire from the PSU +5v to sections of the wire if you experience dimming along the string/strip.

Software Setup

  • Using Atom or VS Code, install Platform IO

  • Once setup, install the esp8266 embedded platform

  • Rename src/setup-template.h to src/setup.h and add your network, MQTT and lighting setup information. Take note of the deviceName you set. You will need this later to send MQTT messages.

  • Build the project (Ctrl+Alt+B) and check for any errors

    If the build produces an error referencing dependencies, You will need to manually install these libraries:

    • Adafruit NeoPixel
    • ArduinoJson
    • PubSubClient
    • WS2812FX
  • Upload to your board of choice (Ctrl+Alt+U). This project was created specifically for the NodeMCU but can be configured to work with another WiFi board with some tinkering.

Example Home Assistant Configuration

light:
  platform: mqtt_json
  name: 'LED Lights'
  state_topic: 'light/led'
  command_topic: 'light/led/set'
  availability_topic: 'light/led/LWT'
  payload_available: 'Online'
  payload_not_available: 'Offline'
  effect: true
  effect_list:
    - static
    - blink
    - breath
    - color wipe
    - color wipe inverted
    - color wipe reverse
    - color wipe reverse inverted
    - color wipe random
    - random color
    - single dynamic
    - multi dynamic
    - rainbow
    - rainbow cycle
    - scan
    - dual scan
    - fade
    - theater chase
    - theater chase rainbow
    - running lights
    - twinkle
    - twinkle random
    - twinkle fade
    - twinkle fade random
    - sparkle
    - flash sparkle
    - hyper sparkle
    - strobe
    - strobe rainbow
    - multi strobe
    - blink rainbow
    - chase white
    - chase color
    - chase random
    - chase rainbow
    - chase flash
    - chase random
    - chase rainbow white
    - chase blackout
    - chase blackout rainbow
    - color sweep random
    - running color
    - running red blue
    - running random
    - larson scanner
    - comet
    - fireworks
    - fireworks random
    - merry christmas
    - fire flicker
    - fire flicker soft
    - fire flicker intense
    - circus combustus
    - halloween
    - bicolor chase
    - tricolor chase
    - icu
  brightness: true
  rgb: true
  optimistic: false
  qos: 0

input_number:
  led_effect_speed:
    name: 'LED Effect Speed'
    initial: 50 # This is the default speed
    mode: slider
    min: 10  # ######################################
    max: 1000 # Feel Free to adjust these as you like
    step: 10 # ######################################

automation:
  - action:
      - alias: Set LED Lights Effect Speed
        service: mqtt.publish
        data_template:
          topic: light/led/set
          payload: '{"speed":{{ trigger.to_state.state | int }}}'
    alias: LED Light Effect Speed
    trigger:
      - platform: state
        entity_id: input_number.led_effect_speed

The speed of the lights will be slower the higher the slider value and faster the lower the value. Treat this more as a delay slider than a speed slider.

Sample MQTT Payload

{
  "brightness": 120,
  "color": {
    "r": 255,
    "g": 255,
    "b": 255
  },
  "effect": "rainbow cycle",
  "speed": 60,
  "state": "ON"
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].