Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

Control WS2812 LEDs with ESP8266 and Homebridge MQTT-Thing via MQTT

License

Notifications You must be signed in to change notification settings

deg0nz/homebridge-mqttthing-esp8266-ws2812

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ Note: This is obsolete for me and will be archived soon™️. One can achieve the same thing with WLED and the Homebridge Plugin homebridge-wled-simple, which is super easy to configure and brings a lot more features. This setup seems to be extremely reliable as well.

Homebridge MQTT-Thing ESP8266 WS2812 Controller

This program lets you control WS2812 LED stripes connected to an ESP8266 via Homebridge and the Homebridge MQTT-Thing plugin. This way you can control a WS2812 LED stripe via the iOS Home.app or Siri.

Why this?

I was following Studio Pieter's HOWTO for controlling a WS2812 LED stripes, which uses the homekit2mqtt Homekit bridge. But I didn't want another Homekit bridge since I already had Homebridge installed and in use. So I adjusted the code from Studio Pieter's NeoPixel-MQTT HOWTO to use the direct HSV values from Homebridge MQTT-Thing plugin and set the LEDs.

Preconditions

  • Platform.io installation
  • Homebridge installation
  • MQTT Broker installation running in your network
  • Homebridge MQTT-Thing plugin installes in Homebridge

For installing Homebridge and MQTT Broker, follow the corresponding parts in https://www.studiopieters.nl/homebridge-homekit-2-mqtt-revised-installation/. Install Homebridge MQTT-Thing via the Homebridge UI.

Configuration

ESP8266 Code

  • Adjust the variables at the top of main.ino to your needs
  • Install the NeoPixel library to the project: platformio lib install --save "Adafruit NeoPixel"
  • Compile the project: platformio run
  • Upload the build to your ESP8266

Homebridge

  • You need to configure a Lightbulb - HSV item in the Homebridge MQTT-Thing plugin.

Add this to the accessories array on your Homebridge config:

{
    "type": "lightbulb-HSV",
    "name": "LED Stripe",
    "topics": {
        "getOnline": "led-nodemcu/online",
        "setHSV": "led-nodemcu/hsvcolor",
        "getHSV": "led-nodemcu/hsvcolor",
        "getOn": "led-nodemcu",
        "setOn": "led-nodemcu"
    },
    "confirmationIndicateOffline": true,
    "integerValue": false,
    "accessory": "mqttthing"
}

Adjust led-nodemcu above if you changed the host variable in main.ino. Also adjust the name to your needs.

Acknowledgements and sources

Releases

No releases published

Packages

No packages published

Languages