This will be a small manual about running Anavi Light Controller with ESPEasy and controlling it from Domoticz.
- Anavi Light Controller is a really cool OSHW board with ESP8266 that can control RGB led strips.
- ESPEasy is open source project for the ESP8266 (and ESP32) microcontrollers.
Anavi Light Controllers, comes with a firmware the the creator - Leon Anavi wrote and works great with it.
But I am working on doing some home automation stuff and I have alot of ESP8266/ESP32 devices, using
different firmwares on evey one of them is a bit of a pain...so I'm trying to keep all my devices with
ESPEasy (or Tasmota but that is another story) for more consistency in my life.
0x01 What will we need
There are alternative plugins like P105 that can some of the same things
But P141 has more functionality, so I'll only look into this plugin here.
First you will need to get your Arudino IDE ready to compile ESPEasy.
To do that, follow the manual on their page Click
After you do all of that , make sure you download a plugin (P141) from the repository with the extra plugins.
(Those plugins are not yet part of the official build).
The next thing you need to do is tell ESPEasy's code that you want to include the testing plugins too, not only the stable ones (default).
Look for a file called
ESPEasy-Globals.h. Inside looks for a block like this
//build all the normal stable plugins (on by default) #define PLUGIN_BUILD_NORMAL //build all plugins that are in test stadium #define PLUGIN_BUILD_TESTING //build all plugins that still are being developed and are broken or incomplete #define PLUGIN_BUILD_DEV
By default only
#define PLUGIN_BUILD_NORMAL will be uncommented.
There is one more small thing you need to do.
easyesp.ino and somewhere in the begining add
Otherwise plugin P141 will fail to compile.
0x03 Compile & Upload
I wont go into details how to upload the firmware ...if you don't know, this page is not the place for you any way.
But the jiff is - connect the UART cable, hold the button (it is connected to GPIO0) while plugging the power and then upload the new firmware....
ESP8266 is 3.3V! If you power it with 5V it will die!
0x04 Plugin Configuration
When all that is done, you just need to:
- Open web interface
- Go to Devices
- Click Edit on any (free) device
- Select P141 Output LEDStrip
- Add some name for the device
- Enable the device
- Select LedStrip Type - RGB
- Select GPIO Red - GPIO-12 (D6)
- Select GPIO Green - GPIO-13 (D7)
- Select GPIO Blue - GPIO-14 (D5)
- (Optional) Add IDX with your Domoticz ID.
0x05 Making sure it works
When all that is done - we can check if all is working as expected.
All you need to do is send some command to the device.
The most easy way is
Command Examples : - /control?cmd=ON Turn Leds On - /control?cmd=OFF Turn Leds Off - /control?cmd=RGB,255,0,0 Set Leds to Red - /control?cmd=HSV,0,255,255 Set Leds to Red - /control?cmd=Mode,2 Animate Leds in "Flash" mode - /control?cmd=Mode,5,400 Animate Leds in "Smooth" mode, with a speed of 400
0x06 Full list of commands and modes
List of commands : - ON - OFF - RGB,<red 0-255>,<green 0-255>,<blue 0-255> - HSV,<hue 0-255>,<saturation 0-255>,<value/brightness 0-255> - HUE,<hue 0-360> - SAT,<saturation 0-100> - VAL,<value/brightness 0-1023> - DIM,<value/brightness 0-1023> - H_RGB,<RGB HEX COLOR > ie #FF0000 for red - H_HSV,<HSV HEX COLOR > ie #00FFFF for red - SPEED,<0-65535> Fast to slow - MODE,<mode 0-6>,<Speed 1-255> time for full color hue circle; Available Modes: * 0 : OFF * 1 : ON * 2 : Flash * 3 : Strobe * 4 : Fade * 5 : Smooth * 6 : Party