Hi community,
I was hoping to get some advice or just a confirmation that this will work…
Yes, I know, this is only slightly related to HA. If you think I should find a more relevant forum feel free to delete this post. Maybe suggest a better forum?
Currently, I have a raspberry pi zero w hanging from a USB cable behind my desk. It is serving as my Zigbee2MQTT server and has the ZigBee stick plugged into a USB extension cable in the other USB port.
I also want to add some LED strips to my office setup to improve my lighting a bit. So I need another power supply for the lights and a NodeMCU to control the light. The light strips are about 1m long each. But I want the 2 next to each other as I need more light for the video calls I need to make all day long.
Since you are running ESPHome on the NodeMCU we have a forum category for you.
Your wiring is mostly ok. The issue is that your data signal from the NodeMCU is 3V logic and the LED strips expect 5V logic. Sometimes this works, mostly it does not.
You will need a level shifter. This can be as simple as a single transistor or MOSFET, or you can purchase 5V <–> 3.3V level shifter modules cheaply. There is also another trick using a diode and sacrificing the first LED:
One more thing. Instead of ESPHome, I highly recommend you run WLED on the ModeMCU instead.
Thanks!
Yes, I will use WLED. That was on my list.
I had it setup in ESPHome and plugged it in on my desk. Just using the USB Power from the NodeMCU and it all worked. Maybe I am one of the lucky ones and I don’t need a level shifter. But better add one in before I put it all behind the desk and then have to pull it out again in a few weeks…
Thanks for the advice.
After I finished the post I was questioning why I need 2 “computers”…
Could I control the lights from the raspberry and Home Assistant?
I’m sure there are alternatives that would run on a pi, might not be as full featured as WLED though, also integration with Home Assistant might be trickier.
Also, also I’d have to delete your post as you are no longer using ESPhome.
The ESP2866 with WLED often drops the WiFi connection and therefore becomes un-responsive. It keeps whatever state it is in but just does not connect for a while.
sometimes the WLED just resets. (the first LED flashes blue and the strip goes out.
The ESP2866 is mounted next to the RPi and that does not seem to have wifi issues.
Any advise on how I could start trouble shooting? They are both mounted behind a backboard that holds my monitor and I rather keep it there. Is there a way for remote debugging?
Hi, I am back.
In general the setup works, but I lose network connection to the WLED often.
Mostly just after I turn the lights on.
I am thinking there might be a bittoo much going on in the wifi.
The RPi is next to the ESP and then there is also the Zigbee stick.
Now I think I replace the RPi Zero with a RPi 3b and run an ethernet cable there.
Then I would like to replace the ESP as well and somehow control the LEDs from the Pi. I don’t need fancy light shows. Mostly I just switch the light on and adjust the temperature a bit. It is only there to light up my face a bit when on web calls (almost all day long in the current work-from-home era)
Any idea how i could control the lights via HA? (Running on another server in docker)
Maybe something that integrates via MQTT?
I have managed to create a very basic script that announces the LED Strip via MQTT Discovery to HA and then I can manage the light as usual in lovelace.
very creatively name
RPI-LED 2 MQTT
There are still a few things to work out, but for the basics it works.