Ok everyone I really could use your help. I tested my entire rig for voltage 3.3v, 5v, and 12v. Everything has power and is hooked up correctly. Double checked my voltage for data and it too requires 5v, which it is feeding. The nodemcu is getting the data packets. There is 12v power at the end of the light strip, so it must be in my config with home assistant or Arduino.
Here is RGB lights in RGB.yaml file:
te_topic: “bar/shelves”
command_topic: “bar/shelves/set”
effect: true
effect_list:
- bpm
- candy cane
- confetti
- cyclon rainbow
- dots
- fire
- glitter
- juggle
- lightning
- noise
- police all
- police one
- rainbow
- rainbow with glitter
- ripple
- sinelon
- solid
- twinkle
brightness: true
flash: true
rgb: true
optimistic: false
qos: 0
#slider
input_number:
animation_speed:
name: Animation Speed
initial: 150
min: 1
max: 150
step: 10
Here is the Arduino programming:
/*
.______ .______ __ __ __ __ ___ __ __ .. ______ . . ___ .. __ ______ .__ .
| _ \ | _ \ | | | | | | | | / \ | | | | | | / __ \ | / | / \ | || | / __ \ | \ | |
| |) | | |) | | | | | | || | / ^ \ | | | | ---| |----
| | | | | \ / | / ^ \ ---| |----
| | | | | | | | |
| _ < | / | | | | | __ | / /\ \ | | | | | | | | | | | |/| | / /\ \ | | | | | | | | | . | | |_) | | |\ \-.|
–’ | | | | | / _____ \ | --' | | | |
–’ | | | | | / _____ \ | | | | | --' | | |\ | |______/ | _|
.| _/ || || // __\ _/ || _/ || || // __\ || || ___/ || __|
Thanks much to @corbanmailloux for providing a great framework for implementing flash/fade with HomeAssistant https://github.com/corbanmailloux/esp-mqtt-rgb-led
To use this code you will need the following dependancies:
-
Support for the ESP8266 boards.
- You can add it to the board manager by going to File -> Preference and pasting http://arduino.esp8266.com/stable/package_esp8266com_index.json into the Additional Board Managers URL field.
- Next, download the ESP8266 dependancies by going to Tools -> Board -> Board Manager and searching for ESP8266 and installing it.
-
You will also need to download the follow libraries by going to Sketch -> Include Libraries -> Manage Libraries
- FastLED
- PubSubClient
- ArduinoJSON
*/
#include <ArduinoJson.h>
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include “FastLED.h”
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
/************ WIFI and MQTT Information (CHANGE THESE FOR YOUR SETUP) *************/
const char ssid = “xxxx”; //type your WIFI information inside the quotes
const char password = “xxxx”;
const char mqtt_server = “xxxx”;
const char mqtt_username = “xxxx”;
const char mqtt_password = “xxxx”;
const int mqtt_port = 1883;
/**************************** FOR OTA **************************************************/
#define SENSORNAME “barshelves” //change this to whatever you want to call your device
#define OTApassword “yourOTApassword” //the password you will need to enter to upload remotely via the ArduinoIDE
int OTAport = 8266;
/************* MQTT TOPICS (change these topics as you wish) ************************/
const char light_state_topic = “bar/shelves”;
const char light_set_topic = “bar/shelves/set”;
const char* on_cmd = “ON”;
const char* off_cmd = “OFF”;
const char* effect = “solid”;
String effectString = “solid”;
String oldeffectString = “solid”;
/*FOR JSON/
const int BUFFER_SIZE = JSON_OBJECT_SIZE(10);
#define MQTT_MAX_PACKET_SIZE 512
/*********************************** FastLED Defintions ********************************/
#define NUM_LEDS 300
#define DATA_PIN 5
//#define CLOCK_PIN 5
#define CHIPSET WS2811
#define COLOR_ORDER BRG
#define MILLION 1000000
byte realRed = 0;
byte realGreen = 0;
byte realBlue = 0;
byte red = 255;
byte green = 255;
byte blue = 255;
byte brightness = 255;
Any help would be great.