A simple example to control a RGB led and a white led connected to a NodeMCU board (ESP8266).
- MQTT discovery
- MQTT JSON Light
- State
- RGB
- White
- Brightness
- Color temperature
- Effect
- Rainbow
- Rename
config.example.h
toconfig.h
- Define your WiFi SSID and password
- Define your MQTT settings
- Install the external libraries (PubSubClient, ArduinoJson)
- Define
MQTT_MAX_PACKET_SIZE
to256
inArduino/libraries/pubsubclient/src/PubSubClient.h