M5stack Echo with a hex light

With all my playing around with home assistant, I've bought myself a M5stack Echo. The echo is the variant of choice for home assistant's "Year of the voice". The other day, I did come across a 37 led array in the shape of a hexagon on Aliexpress.
Curious, I bought the device. My original aim was to plug it in to my other M5stack device, which is currently configured to be a matter device. The main reason I didn't was because the echo was already programmed in to home assistant via the esphome add-on. All the code was in the right place. With a bit of digging, I found a code block that was close, but needed a bit of tweaking. I ended up with this code:
light:
- platform: esp32_rmt_led_strip
chipset: SK6812
pin: GPIO21
num_leds: 1
rgb_order: GRB
name: "Onboard Light"
rmt_channel: 0
id: built_in
- platform: esp32_rmt_led_strip
chipset: SK6812
pin: GPIO26
num_leds: 37
rgb_order: GRB
name: "Hex ring"
rmt_channel: 1
id: hexring
When added to my echo's configuration, this exposed 2 lights to home assistant, the on board LED and the hex display. I did make a mistake when I initially set it up, and set the rmt_channel to both to be '0'. The practical side of this was that I could control an individual led on the hex display. More information about esp32_rmt_led_strip can be found here.
The board did take a bit of debugging to get right. I did try other libraries, which don't work with the esp-idf framework (I'm looking at you FastLED). Finding the data pin was as simple as looking at the back of the echo.

The last part that required debugging was the rgb_order. This is simply the way to do this, is set the order to RGB at the start (unless known!). In the controls of home assistant, set the light to red. In my case this glowed green. Next I set it to green, and got red. Lastly, I confirmed that blue was indeed blue. From this, I was able to tell the order was green, red, blue - GRB.
About the author
Tim Wilkes is a UK-based security architect with over 15 years of experience in electronics, Linux, and Unix systems administration. Since 2021, he's been designing secure systems for a telecom company while indulging his passions for programming, automation, and 3D printing. Tim shares his projects, tinkering adventures, and tech insights here - partly as a personal log, and partly in the hopes that others will find them useful.
Want to connect or follow along?
LinkedIn: [phpsytems]
Twitter / X: [@timmehwimmy]
Mastodon: [@timmehwimmy@infosec.exchange]
If you've found a post helpful, consider supporting the blog - it's a part-time passion that your support helps keep alive.
⚠️ Disclaimer
This post may contain affiliate links. If you choose to purchase through them, I may earn a small commission at no extra cost to you. I only recommend items and services I’ve personally read or used and found valuable.
As an Amazon Associate I earn from qualifying purchases.