Skip to content

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

License

Notifications You must be signed in to change notification settings

SeanoNET/ModelRocketLed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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) *************/
#define STASSID "" // Wifi SSID
#define STAPSK "" // Wifi Password
const char *ssid = STASSID;
const char *password = STAPSK;
#define mqtt_server ""
#define mqtt_username ""
#define mqtt_password ""
const int mqtt_port = 1883;

/**************************** FOR OTA **************************************************/
#define SENSORNAME "led"    //change this to whatever you want to call your device
#define OTApassword "password" //the password you will need to enter to upload remotely via the ArduinoIDE
int OTAport = 8266;

Home Assistant

The LED effects and power is controlled by Home Assistant.

Light MQTT configuration

light:
  - platform: mqtt
    schema: json
    name: model_rocket_led
    state_topic: "rocket/led"
    command_topic: "rocket/led/set"
    rgb: true
    effect: true
    effect_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: false
    qos: 0

input_number:
  rocket_animation_speed:
    name: Rocket Animation Speed
    initial: 150
    min: 1
    max: 150
    step: 10

Automation for animation speed

For changing the speed of the light effect.

- alias: "Rocket Animation Speed"
  initial_state: True
  hide_entity: False
  trigger:
    - platform: state
      entity_id: input_number.rocket_animation_speed
  action:
    - service: mqtt.publish
      data_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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages