MQTT RGBW Sunrise animation with brightness and color control via MQTT'
This repository is to accompany my LED Sunrise Video:
- Download the .ino file
- Ensure you have the correct libraries download and installed (links at top of the ino file)
- Update information in the user configuration section and upload to the NodeMCU
- Hook up your NodeMCU, to your RGBW LED strip (default pin is D1 which is GPIO-5)
- Send the number of minutes you'd like the sunrise to be spread over to the MQTT topic:
[USER_MQTT_CLIENT_NAME]/wakeAlarm
NodeMCU https://amzn.to/2MkBcka
RGBW WS2812B LED Strip http://bit.ly/2QaujCG
Power Supply https://amzn.to/2TAwrG2
light:
- platform: mqtt
name: "Bedroom Valance"
command_topic: "SunriseMCU/command"
payload_on: "mqttRGB"
payload_off: "off"
state_topic: "SunriseMCU/state"
rgb_command_topic: "SunriseMCU/color"
rgb_state_topic: "SunriseMCU/colorState"
white_value_command_topic: "SunriseMCU/white"
white_value_state_topic: "SunriseMCU/whiteState"
availability_topic: "LWT/SunriseMCU"
payload_available: "Online"
payload_not_available: "Offline"
white_value_scale: 255
retain: true
- Install PlatformIO Core http://docs.platformio.org/page/core.html
- Clone the repo with git or download the sources as .zip and extract it
- Change into the folder where the platformio.ini is
- Run these commands:
# Download/Install project libraries
> platformio lib install
# Build project
> platformio run
# Upload firmware to NodeMCU 1.0
> platformio run -e nodemcuv2 --target upload
# Upload firmware to DOIT ESP32 DEVKIT V1
> platformio run -e esp32doit-devkit-v1 --target upload
# Clean build files
> platformio run --target clean