Use computer state to control lights?

Is it possible to use my computer state to control devices?

I have a motion sensor in my office, but sometime (apparently) I’m motionless for 20 mins and lights turn off.

I’d like to use my computer state to keep the lights on.

Ideally it would be:

If my computer has activity AND is connected to a certain google wifi puck, then keep lights on.


Since I’m exclusively working from home, I’m integrating it with the screen status, so I can leave the computer on, but turn the light on only if a screen is on, and turn off when it’s turned off.

You need an application that has to run on your PC, and a virtual device that is able to receive it. If you don’t need this complex scenario, NetMon (or Ping) plugin is probably enough. You can monitor your PC and use it as a virtual sensor to keep your light on.

1 Like

I vote for the Netmon (plug-in) approach, since it’s so easy to set up, and simply watch for the computer’s IP address to be ‘active’. (In my setup, I use WOLPlusPing instead, since I can use it to also ‘wake up’ my computer via Wake-On-Lan. Setting up WOL on most PC’s is straightforward but not always self-explanatory.)

Meanwhile, if you do go the more sophisticated route of having a utility program running on your Windows PC to negotiate other activities, may I recommend EventGhost? It’s free (although again, not entirely obvious how to configure!) and will allow Vera to send HTTP requests, which in turn can perform functions such as shutting down your PC.

If all you need is, “Computer ON? Do something.” then stick with Netmon and a virtual switch setup!

Perfect thanks!

Ok I just setup netmon, but just thinking this through, I do leave my computer on quite a bit, but monitor goes to screensaver or turns off. I’d like the lights to correspond to the screen similar to @therealdb. What application do you use @threrealdb? Same as @librasun suggested?..EventGhost?

Netmon caution… some PCs will respond to ping when in standby… smarter Ethernet cards/chipsets have an offload engine that keeps running. You may need to disable this function on your PC’s Ethernet interface.

1 Like

I have a custom app, responding to Windows’ screen/standby events. If you’re comfortable with developing a C# app, I can point you into the right direction. Unfortunately it’s very hacky, since it just serves this specific scope, so it’s not intended to be shareable (hard coded urls, timeouts, etc).

Ok thanks. I tested this once today, and it showed computer offline while in standby. I’ll keep an eye on it.

Ok. Not a programmer other than VBA, so ill pass. Thanks.

Why not simply use a wallplug with power measuring (watts). I use fibaro’s and greenwave 6port nodes for all my equipment. To save energy costs (kill standby when in away or night mode) but also to use watts in scenes (or Reactor Sensors)

Yeah was thinking of something like that if I can’t get monitoring my computer state working. Better to use what I have available if possible I think.

Not sure what type of pc
but task schedular can trigger on sleep and event and you can action shell script etc. So should be able to http request etc

Yep, but I turn it off when the PC is automatically locked (I wait 30 secs just to have time to move on with lights still on).
And automatically on when unlocked. You can obviously add hardware to get the same result, but it was maybe half an hour of coding, so well worth the investment for me.

I solved that problem with a force sensitive resistor connected to the dry contact inputs of an Ecolink Door/Window sensor. I have the resistor attached to the cushion of my desk chair, and so the Ecolink reports whether or not there is weight in the chair.

Link to force sensitive sensor on Amazon:

I’ve also got a couple of my dining room and breakfast nook chairs “wired up” like this to keep the lights on when there’s not enough motion, and without having to use a really long timeout. (Example, I use 3 minutes of no motion/chair not occupied in my home office).

I use a similar approach in my bathroom, but with a pressure sensitive mat under the rug in front of my vanity. Nothing more frustrating on those days when my contact lenses are not being cooperative, and the lights go out because I’m not generating enough motion.

Cool idea! but wont work for me in this case. My desk raises and lower to from sitting to standing. But may use this elsewhere! Thanks.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.