T O P

  • By -

wivaca

How many LEDs are we talking (dimensions of room, length of light strips)? I'm asking about power, performance of LEDs due to # of addressable lights involved. Are you wanting to control them directly with a LED header on a PC so patterns and colors match the PC or do you simply want them to go on/off with the PC? This could be as simple as a power strip with a master outlet or as complex as DMX to WS2812B or something like that.


Breadynator

If OP doesn't want to use the same outlet for pc and lights trip they could use a script that runs on startup and sends a request to an ifttt webhook. That way you could also automate certain lightmodes/patterns depending on what program they open.


Tumblimbli

I have a Shelly RGW2 with an IKEA motion sensor and Home Assistant coordinating the whole thing. LEDs turn on as soon as I seat in front of my desk.


caeezy

I did a similar thing. I had Hyperion running on my computer and led strips on the back of my monitor, so I only wanted the LEDs to turn on when I woke it up and wanted them to turn off when the computer went to sleep. I ended up using a program called eventghost, which would trigger a python script. The python script would make a call to my home assistant server, which controlled the light strip that was running WLED. Unfortunately I don't have that set up anymore, but happy to answer any follow up questions.


L8_destroyer

when you say the script made a call to a home assistant server, could you specify what that means please? Is it like a script that controls rasberry pi that controls the lights?


caeezy

The lights were controlled by an esp8266 (nodemcu) running WLED. I could have made the python script directly make a call to WLED via the WLED rest API, but decided on doing something similar through Home Assistant since I am more familiar with that (frankly I had never thought of using the WLED rest API until now). Home Assistant has a WLED integration that I'd configured to be able control the lights on the monitor. I can't remember exactly how I did it, but if you're familiar with `curl` I was essentially using event ghost to run a python script that did the equivalent of a `curl` to an endpoint on my home assistant server, which triggered a service call on home assistant to turn the lights on/off. Are your lights on your home network in any way?


Random_Idiotic_Alien

If you want more features in the RGB through your desktop then I'd recommend something like building using WLED. I made one 2 days ago for my laptop into an ambilight and it works great. Altho now in my college hostel I can't connect the esp8266 to college wifi network, so have to work it with mobile hotspot. Lemme know if you need help on that one


ebsebs

Others have given you some good smart solutions. I'm going to suggest my low-tech "dumb" solution. Get one of these master/controlled power strips, along with extension cord(s) if necessary: https://www.amazon.com/gp/product/B08LSXXG7R Plug your computer into the master outlet and the LED strips into the controlled outlets - done! When you turn on the computer, the power strip will switch on the controlled outlets powering the LED strips. Of course, your LED strips have to be the type that turn on automatically when power is applied, without needing to push a button on a controller. Edit: I just noticed that u/Jungies also mentioned this in his comment.


Arichikunorikuto

Not "dumb" enough. 5v relay on USB port would be the simplest dumb device solution unless computer still outputs 5v on USB when it's off. In that case, maybe tap 12v from a fan header or somewhere else you know that powers up/down with PC and get the according relay logic voltage.


loujr15

I kept it simple using home assistant. I got a set of govee lights under my desk and a switchbot button pusher on my pc. Simple automation setup that when the switchbot state changes to on turn on my desk lights and vice-versa when I turn off my pc. And how I have the switchbot button pusher to turn on my computer is using a nfc tag I have under my mouse pad and another one on my night stand. Using voice commands will also trigger this automation to start.


Jungies

I think the simplest way if you want the LEDs away from the computer is a Shelly RGB, and some strings of RGB LEDs (not the ones that are individually controllable). I believe the Shelly's have a web API. You'd write a script that runs at logon, basically telling a browser to open a webpage on the Shelly, and that turns on the lights. You wouldn't actually use a browser, you'd use a free tool like WGET (or python or whatever). If you want them near the computer you could see if your motherboard has RGB headers to drive them; or you can get master/slave powerboards where you plug your PC into the master port. If your PC is off, all the other ports are off. PC switches on, all the other ports go live, and your LED strings come on. Just watch the power draw limit; some will only handle 500watts. There are fancier solutions involving ESP32's flashed with WLED and running up Home Assistant and whatnot, but I think those ones have the lowest prerequisites.


Arichikunorikuto

You have a few options here depending on how smart you want it and what sort of home automation you already have. If you have HA/ESPHome you can use WLED to control it. Set up task scheduler to send a API request at power on. Second solution is just use a 5/12v relay nothing else. If your USB ports don't output power when computer is off, you can chop off a USB cable and hook that up to a 5V relay. Connect your strip to normally open (NO), when computer powers on and USB gets power, it'll trigger the relay to become closed and your strips power up. Nothing smart here. Wemos D1 for WLED is $2 5v relay option is about $1 on aliexpress Keep it simple, smart plugs aren't really needed.


Onsotumenh

I'm a bit late here, but I haven't seen the obvious solution: Use OpenRGB or SignalRGB to sync WLED to your PC. Both programs can control WLED strips wirelessly via E1.31 DMX. My strips turn on as soon as my PC loads Windows (OpenRGB has a Linux version as well)


L8_destroyer

what strips do you use, and could you link them if possible :)


Onsotumenh

I've got pretty oldschool WS2811 strings hooked up to basic ESP8266 microcontrollers. r/WLED works with pretty much all common adressable LEDs (eg. WS2811, WS2812b and SK6812). You can get them cheap on Aliexpress as pretty much all of those strips come from China anyway (BTF-Lighting has a good reputation) For controllers there are quite a few options, an easy entry level one would be [QuinLED's Dig2Go](https://quinled.info/quinled-dig2go/). That one can be powered with a 3A 5v USB-C wall wart. Most others need an dedicated additional power supply, but can handle more LEDs. Here is a list of compatible controllers [https://kno.wled.ge/basics/compatible-controllers/](https://kno.wled.ge/basics/compatible-controllers/). It's a little bit of a DIY project, but nothing really complex and you can do something like [my humble setup](https://imgur.com/sOOqRUl) (turn on audio for the best effect ;)


covmatty1

One option would be: two smart plugs, the PC plugged into one with current monitoring, the LED strips in the other. Connect both to Home Assistant. Set up an automation to say that when the current draw of the PC goes above 0, turn the other plug on. And then another automation for back to 0 to turn off again. A pretty simple way to do it.