Skip to content

Repository files navigation

ModelRocketLed

A nodemcu powering a WS2812B 144 LED strip to create lighting effects under a model rocket powered by Home Assistant

Parts

Wiring Diagram

Getting Started

Create a secrets.h file in the same directory as rocket_led.ino and define the following secrets.

/************ WIFI and MQTT Information (CHANGE THESE FOR YOUR SETUP) *************/#defineSTASSID "" // Wifi SSID
#defineSTAPSK "" // Wifi Password
constchar*ssid=STASSID;
constchar*password=STAPSK;
#definemqtt_server ""
#definemqtt_username ""
#definemqtt_password ""
constintmqtt_port=1883;
/**************************** FOR OTA **************************************************/#defineSENSORNAME "led" //change this to whatever you want to call your device
#defineOTApassword "password" //the password you will need to enter to upload remotely via the ArduinoIDE
intOTAport=8266;

Home Assistant

The LED effects and power is controlled by Home Assistant.

Light MQTT configuration

light:
- platform: mqttschema: jsonname: model_rocket_ledstate_topic: "rocket/led"command_topic: "rocket/led/set"rgb: trueeffect: trueeffect_list:
[rocket_take_off,rocket_flight,bpm,candy cane,confetti,cyclon rainbow,dots,fire,glitter,juggle,lightning,noise,police all,police one,rainbow,rainbow with glitter,ripple,sinelon,solid,twinkle,]optimistic: falseqos: 0input_number:
rocket_animation_speed:
name: Rocket Animation Speedinitial: 150min: 1max: 150step: 10

Automation for animation speed

For changing the speed of the light effect.

- alias: "Rocket Animation Speed"initial_state: Truehide_entity: Falsetrigger:
- platform: stateentity_id: input_number.rocket_animation_speedaction:
- service: mqtt.publishdata_template:
topic: "rocket/led/set"payload: '{"transition":{{ trigger.to_state.state | int }}}'

Based on ESP-MQTT-JSON-Digital-LEDs

About

A nodemcu powering a WS2812B 144 LED strip to create lighting effects under a model rocket powered by Home Assistant.

Topics

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages