This was a great opportunity to have some fun and to add an addressable LED strip which through ANAVI Miracle Controller can be controlled remotely via web interface or moble application of the popular open source home automation platform Home Assistant.
WS2812B LED strip with appropriate connector with a choke resistor
5V power supply
Instance of Home Assistant, for example running on Raspberry Pi or another single board computer
Although ANAVI Miracle Controller supports 2 addressable LED strips, for this particular use case only one is used so during the initial configuration set the number of LEDs of the other LED strip to 0. This way only one LED strip will be automatically discovered by Home Assistant over the machine to machine protocol MQTT.
For more details how to enable Home Assistant discovery over MQTT have a look at our other step by step video tutorials for assembly guide, WS2811 12V LEDs as well as for NeoPixels.
Esptool is a free and open source ESP8266 and ESP32 serial bootloader command-line utility. The source code is available at GitHub under GPLv2 license. It is written in Python therefore it is universal and runs on Microsoft Windows, Mac OS and any GNU/Linux distribution (Ubuntu, Debian, Linux Mint, Fedora, CentOS, OpenSUSE, etc).
Installation
As of today esptool works fine with Python 2.7 or Python 3. Python 2 has been deprecated since January 1, 2020 therefore it is recommended to use esptool with Python 3.
The easier way to install the latest stable version of esptool is from pypi via pip. Open a terminal and execute the following command:
pip install esptool
Flashing Firmware
Using write_flash argument esptool flashed pre-compiled binary to devices with ESP8266 or ESP32. Here are the exact steps:
Download an appropriate binary for your ESP8266/ESP32 device.
Connect your device to a computer. For example, for ANAVI Thermometer, ANAVI Gas Detector, ANAVI Light Controller and ANAVI Miracle Controller you must use UART to USB debug cable.
Turn on the device in boot mode. For example, on ANAVI Thermometer, ANAVI Gas Detector, ANAVI Light Controller and ANAVI Miracle Controller, press and hold the RESET button and plug the power supply.
All ANAVI Internet of Things with ESP8266/ESP32 combine free and open source software with open source hardware. The firmware is built using Arduino IDE and a pre-compiled binary file is available at GitHub. Follow the links below to identify your ANAVI device and download appropriate binary for the latest stable firmware:
This YouTube video demonstrates do-it-yourself (DIY) holiday lights to celebrate Christmas or Halloween using ANAVI Miracle Controller, Olimex WS2811 LED ropes and the popular open source home automation platform Home Assistant!
All kits of ANAVI Miracle Controller come with WS2812B LED strip, however the board is also compatible with other addressable LED strips. In a previous update we covered Adafruit NeoPixels and now we are focussed on Olimex WS2811 LED Rope.
Raspberry Pi (recommended 3 or newer) with Home Assistant
Olimex is a well-known company in the maker community and I am lucky because their headquarter is my hometown Plovdiv, Bulgaria.
Olimex offers addressable, water proof, sealed with resin RGB WS2811 ropes with various number of LEDs. For this video I used a couple of Olimex LED-ROPE-10. The rope is waterproof so it is suitable for both indoor and outdoor installations. It works with power supply in the range from 3.3V to 5.5V and has a dedicated WS2811 driver for each LED.
The typical color code for Olimex LED-ROPE-10:
Olimex rope RED wire – VCC (3.3V-5.5V)
Olimex rope GREEN/BLUE (varies) wire – GND
Olimex rope WHITE wire – DATA
Each RGB LED in Olimex rope draws approximately 50mA at 5V with red, green, and blue at full brightness. Olimex LED-ROPE-10 has only 10 RGB LEDs with makes approximately 500mA and it is OK to power it through ANAVI Miracle Controller. For installation will longer ropes with bigger consumption wire the VCC and GND lines directly to the power supply.
When using Olimex LED ropes, set ANAVI Miracle Controller to 5V input and use an appropriate 5V center positive power supply!
NOTE: The color codes of other addressable LED strips, including WS2812B LED strip from all kits, are different!
Due to differences in color codes this wiring is valid only for Olimex LED ropes. Be careful and check the proper wiring as well input voltage requirements if you are using a different type of addressable LED strip or rope.
Software
Home Assistant must be installed on an appropriate device. If you haven’t installed it already, a single board computer like Raspberry Pi (version 3 or newer) is the perfect fit!
MQTT broker is also required and must be installed. You can install Mosquitto from Home Assistant add-on store. Integrate the MQTT broker in Home Assistant and enable discovery. The exact steps have been covered in a previous blog post about ANAVI Miracle Controller and Adafruit NeoPixels.
After completing the initial installation and integration in Home Assistant, you can easily control the holiday lights from your personal computer, smartphone or tablet. You can either install the official mobile app on your smartphone or use the web interface from any modern HTML5 web browser (Google Chrome, Mozilla Firefox, etc). Furthermore, with Home Assistant you can create automation and trigger automatically the holiday lights depending on various events.
ANAVI Miracle Controller is an ESP8266-powered Wi-Fi dev board to control two 5 V or two 12 V addressable (digital) LED strips like WS2812B, WS2812, WS2811, etc. Furthermore, mini OLED display and up to 3 I2C sensors can be attached. It has been certified by the Open Source Hardware Association.
We have already started manufacturing. The first and second batches of boards are ready. Right now we are testing and packaging them. The estimated shipping date remains the same – Mar 30, 2020. In the meantime you can still place pre-orders at the same prices. Crowd Supply will take care of the shipping for all orders placed during the crowdfunding campaign and pre-orders.
ANAVI Miracle Controller is an open source hardware development board for simultaneously managing a couple of 5V or 12V addressable (digital) LED strips. Furthermore you can attach to it mini OLED display and up to 3 I2C sensor modules. The default firmware is available as an Arduino sketch at GitHub. Out of the box it is compatible with the popular open source automation software Home Assistant over the machine-to-machine protocol MQTT.
ANAVI Miracle Controller is a new entirely open source development board for addressable (digital) LED strips like NeoPixels, WS2812B, WS2811, etc. The major advantages are that you can control two LED strips simultaneously, add a mini OLED display and I2C sensor modules as peripherals. Recently we launched a crowdfunding campaign for it at Crowd Supply.
ANAVI Miracle Controller is a development board and it is easy to flash a custom firmware on it. The process is very similar as for our other open source project like ANAVI Thermometer, ANAVI Gas Detector and ANAVI Light Controller.
This tutorial explains the exact steps how to compile and upload the default open source Arduino sketch for ANAVI Miracle Controller using Arduino IDE.
Required Hardware
ANAVI Miracle Controller
USB to UART debug cable
Addressable LED strip
Appropriate power supply at 5V or 12V depending on the type of LED strips
Personal computer with MS Widows, Mac OS or GNU/Linux distribution
Optionally a mini OLED display and other peripherals can be attached
Download Source Code from GitHub
The default firmware of ANAVI Miracle Controller is an open source Arduino sketch. It relies on several popular open source Arduino libraries, including FastLED for controlling addressable LED strips. Clone or download the source code from GitHub.
Connecting UART to USB
Each ANAVI Miracle Controller kit includes a USB to UART debug cable with CP2102. Depending on the operating system on your PC you might be required to install additional drives. It works out of the box on GNU/Linux distributions. As open source enthusiasts we are using it on Ubuntu. Plug the USB in your computer and connect the 3 wires as follows:
ANAVI Miracle Controller
USB to UART Debug Cable
RX
TX
TX
RX
GND
GND
Download Arduino IDE
Download and install Arduino IDE on your personal computer. It is free and open source software available for MS Windows, Mac OS and GNU/Linux distributions.
Launch Arduino IDE. From File > Open load an Arduino sketch. It can be the default firmware or any other compatible with ANAVI Miracle Controller Arduino sketch.
Configure ESP8266 in Arduino IDE
Go to File > Preferences. Select Settings and in the field Additional Boards Manager URLs add: http://arduino.esp8266.com/stable/package_esp8266com_index.json
From Arduino IDE select Tools > Board: Generic ESP8266 Module. Set the flash size to 4M (1M SPIFFS). The upload speed is 115200. Adjust the exact port of USB to serial debug cable connected to your computer.
In Arduino IDE click Verify/Compile. If there are any errors, please double check that you have installed all required libraries and their exact versions. If the source code compiles successfully, please proceed to to the next step for flashing the firmware.
In Arduino IDE click Upload. Set the jumper on ANAVI Miracle Controller to 5V or 12V depending on your power supply and type of LED strips. The power supply voltage must match the required voltage by the LED strips, for example 5V for NeoPixels and the WS2812B included in all kits. Press and hold the RESET button on ANAVI Miracle Controller. Without releasing the RESET button, plug the power supply in the barrel jack of ANAVI Miracle Controller.
Do NOT release the RESET button until you see in Arduino IDE that the upload is 100% completed!
The Christmas tree is among the most popular symbols of the holiday season. Decorating it is always fun, especially for a maker.
Andrey Kozhevnikov a.k.a. CODeRUS, a talented software engineer and a very skilled maker, used ANAVI Miracle Controller and addressable (digital) LED strips to decorate his Christmas tree and to control it with voice commands through Google Assistant and Home Assistant. Home Assistant is a popular open source platform for home automation. Google Assistant is an artificial intelligence-powered virtual assistant that recognizes speech and voice commands. CODeRUS shared a short video in twitter with the amazing result!
As a small gift for the leading contributor to the Arduino sketch for another of our open source projects, ANAVI Light Controller, we sent one of the first stable prototypes of ANAVI Miracle Controller to CODeRUS. We were sure that he will make something interesting with it. His amazing creativity is always inspiring!
CODeRUS is also well known in the open source communities because of his numerous contributions over the years to Maemo, MeeGo and Sailfish OS. These names ring a bell in any die-hard open source fan as they were/are brands of GNU/Linux distributions for smartphones, most notably Nokia models like N900 (Maemo) and N9 (MeeGo Harmattan) made a decade ago.
Yes, that’s correct! Let’s get started with Adafruit NeoPixel Ring and NeoPixel Stick in Home Assistant without any coding, just a few simple configurations.
Install Mosquitto MQTT broker from Hass.io add-on store, configure username and password as well as Access Control Lists (ACL).
From Configure > Integrations add new MQTT integration and click Enable discovery. It is mandatory to enable discovery!
Solder male to male jumper wires to Adafruit NeoPixel Ring and NeoPixel Stick.
Connect NeoPixel Stick DIN to LED1, GND to GND and 5VDC to VOUT on ANAVI Miracle Controller. Connect NeoPixel Ring Data Input to LED2, GND to GND and 5V DCPower to VOUT on ANAVI Miracle Controller.
Set the jumper of ANAVI Miracle Controller to 5V and use appropriate power supply to turn on the board.
Configure ANAVI Miracle Controller to connect to your local WiFi network, set LED type to NEOPIXEL, number of LEDs for LED1 to 8 and number of LEDs for LED2 to 12.
In Home Assistant web interface, a couple of new devices will be automatically added under the names ANAVI Miracle Controller LED1 and ANAVI Miracle Controller LED2. Set different effects and colors for each Adafruit NeoPixels.
How Does It Work?
ANAVI Miracle Controller combines open source hardware with free and open source software. It has been certified by the Open Source Hardware Association under UID BG000050. After initial configuration the default firmware of ANAVI Miracle Controller, available as an Arduino sketch in GitHub, connects to the WiFi network and the MQTT broker. It sends a retained MQTT message with JSON payload containing description of the device. Home Assistant, thanks to the MQTT integration with enabled discovery, automatically receives the message and recognizes the device as MQTT Light component. As a result out of the box ANAVI Miracle Controller appears in the Home Assistant GUI.
ANAVI Miracle Controller is an open source hardware Wi-Fi development board powered by the ESP8266 and designed to control two 5 V or 12 V addressable LED strips simultaneously.
ANAVI Miracle Controller supports popular addressable LEDs including Neopixel, WS2811, WS2812B, TM1809, etc. It also has a dedicated slot for a mini OLED I²C display and slots for up to three additional I²C sensor modules. The default firmware is available at GitHub as an Arduino sketch implementing Home Assistant MQTT Light component.
Back in 2018 we created ANAVI Light Controller for low-cost 12V RGB LED strips. Inspired by a lot of people asking for open source hardware dev board for addressable LEDs strips we created ANAVI Miracle Controller.