This is the ESP8366 code for receiving commands via MQTT to control LED. We wil be using NodeRed on a Raspberry Pi as the UI. The code expect a hex string that contains the color tuple. Format is RGB_HexString, Example RGB0xffffff to turn on full brightness white. Wiring is the same as the other WS2812 Led example.
Note: The client names, outgoing and incoming MQTT topics must be unique for this example to work properly.
Need to install the Mqtt helper library included in this repo. Also need the PubSubClient, Captive portal WifiManager, and FastLed libraries installed using the PIO library manager.
Raspberry Pi Pi will have the Mosquitto MQTT broker and NodeRed installed on it