Just thought I'd share some work I put in this weekend to control Neopixel RGBW LED strips via the Arduino plug-in.
First some background:
A few months back, I installed around 10 meters of addressable Neopixel strips - SK6812s specifically - above and below my kitchen cabinets, wired to a NodeMCU for control. I started out using ESPEasy firmware to control it by http commands. That worked well enough, and I planned to create some virtual devices and events to control them with Homeseer. Unfortunately, during testing I found the firmware was not reliable enough for everyday use. I'm still not sure what was causing it, but after a variable amount of time, the NodeMCU would become unreachable and require a press of the reset button. So I gave up on ESPEasy.
I looked at a few other firmwares, and was considering moving to RPI for control when I remembered I had purchased a license for the Arduino plug-in but hadn't made use of it yet. Sadly, since most users probably don't bother with addressable LEDs for cabinet lighting, I didn't find any other posts about having done what I needed. So I played around for a bit with the NodeMCU API and I now have a working sketch that let's me control my pixels directly from Homeseer. As of now I have Brightness, R, G, B, and W devices with sliders to adjust individual color values and another device with preset color values. It works great, and I've yet to have any connectivity issues. I also love that OTA updating is built into the API sketch, as I haven't needed to plug and unplug the NodeMCU dozens of times as I did with some other solutions I toyed with.
Here's a screenshot of the controls:
And one of the Plug-in config page:
Here are the edits I made to the API sketch:
NeopixelSketchEdits.txt
When I have the time, I plan to add some inputs to control the cabinet tops and bottoms independently so I can, for example, set top and bottom brightness to different levels or turn off the bottoms and dim the tops at night. Once that's done, I want to look at creating patterns without the delay() function, and possibly set up buttons in Homeseer to make holiday light themes simple.
Overall I'm very pleased with how easily I was able to get something up and running with this plugin, and I hope someone else finds this post useful.
WeaslyD
First some background:
A few months back, I installed around 10 meters of addressable Neopixel strips - SK6812s specifically - above and below my kitchen cabinets, wired to a NodeMCU for control. I started out using ESPEasy firmware to control it by http commands. That worked well enough, and I planned to create some virtual devices and events to control them with Homeseer. Unfortunately, during testing I found the firmware was not reliable enough for everyday use. I'm still not sure what was causing it, but after a variable amount of time, the NodeMCU would become unreachable and require a press of the reset button. So I gave up on ESPEasy.
I looked at a few other firmwares, and was considering moving to RPI for control when I remembered I had purchased a license for the Arduino plug-in but hadn't made use of it yet. Sadly, since most users probably don't bother with addressable LEDs for cabinet lighting, I didn't find any other posts about having done what I needed. So I played around for a bit with the NodeMCU API and I now have a working sketch that let's me control my pixels directly from Homeseer. As of now I have Brightness, R, G, B, and W devices with sliders to adjust individual color values and another device with preset color values. It works great, and I've yet to have any connectivity issues. I also love that OTA updating is built into the API sketch, as I haven't needed to plug and unplug the NodeMCU dozens of times as I did with some other solutions I toyed with.
Here's a screenshot of the controls:
And one of the Plug-in config page:
Here are the edits I made to the API sketch:
NeopixelSketchEdits.txt
When I have the time, I plan to add some inputs to control the cabinet tops and bottoms independently so I can, for example, set top and bottom brightness to different levels or turn off the bottoms and dim the tops at night. Once that's done, I want to look at creating patterns without the delay() function, and possibly set up buttons in Homeseer to make holiday light themes simple.
Overall I'm very pleased with how easily I was able to get something up and running with this plugin, and I hope someone else finds this post useful.
WeaslyD
Comment