While I’m perfectly happy with the H801 LED Strip controller’s abilities, there were a few niggles that I didn’t like:
- The controller would always advertise as an access point, allowing “anyone” to connect as long as they knew the default SSID password (88888888)
- Communication is 1 way with no feedback
- The script I wrote to go through the colour spectrum was ran off the server and basically sending a command to the H801 over the WiFi network every 0.1 sec
- I had to create an on/off switch as well as 3 sliders to select the (RGB) LED colour
Knowing the H801 is based on the ESP8266 chip and programmable, I looked for a better solution and finally settled on corbanmailloux solution for the following reasons:
- The H801 is no longer an access point, making it more difficult to hack
- it’s MQTT “enabled” and offers 2 way communication
- It’s Home-Assistant compatible, and already includes support for RGB attributes via a colour picker and other effects
- It already has the function to loop through the colour spectrum; actually it has 2 of them at different speeds, plus the possibility to time colour transitions and a flash feature, for notifications for example
I used the code off the mqtt_esp8266_rgb folder. The only things I had to change in config.h
were:
- LED colour pins to be compatible with the H801:
#define CONFIG_PIN_RED 15 #define CONFIG_PIN_GREEN 13 #define CONFIG_PIN_BLUE 12
- change the WiFi settings and the MQTT settings
Because I use cloudmqtt, I also changed the MQTT port in the main `mqtt_esp8266_rgb.ino` file:
client.setServer(mqtt_server, 16306);
I followed the instructions on corbanmailloux git page to install Arduino and the relevant libraries, and I used the esptool from micropython to upload the firmware