make a computer sleep

Any idea if there is an opportunity to get micasaverde to turn off a computer in much the same way as wake on lan just reverse.

I don’t believe there is a “sleep-on-lan” magic packet like there is for wake on lan. But, if you can code a little bit you could probably write a listener on the target machine that would start a shutdown after getting a message from the Vera.

I have a batch file on my work PC that I use to restart it (if needed) from my Terminal Server session, shutdown and restart are not available via TS.

tsshutdn 5 /reboot /delay:5

Assuming there’s a shutdown batch file…%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState

How would it get triggered from Vera?

Another option would be to hibernate the computer after n mins of use? I’m fighting with this on my personal computer though as it asks “Do you want to close the open applications first” and hangs there waiting for user input ::slight_smile:


I can think of a few ways you could get that script to work. If you can code, you could hack up a simple daemon that listened for a command which in turn executed the script. The other way would be to run a web server on your machine and execute the script via some server side scripting language. (PHP, ASP, etc.) The web server method would also allow you to easily have some security on it. You could set the server up to require authentication before it can send commands. That way you don’t have anyone that can talk to your computer shutting it down for ‘fun’.

JOD - Have you tried using the “shutdown” command? On Windows 7 it has a /f parameter that seems like it would shut down without stopping at that prompt. The down side being that anything you have not saved would be lost.

Or perhaps more simply:

[ul][li]Put computer on Cheap UPS[/li]
[li]Attach USB Cable from UPS to Computer[/li]
[li]Install standard UPS Software that will do orderly shutdown of computer, when UPS tells it to[/li]
[li]Put UPS on Z-Wave appliance module…[/li][/ul]

Then you’ll also have a UPS for the computer, along with the associated line/spike filtering, as well as a proven model for shutting the computer down on any type of power outage - either from the Power company, or initiated as a Z-Wave Appliance module “Off” command :wink:

Thanks for responding. The Z-Wave appliance module you talked about what could it be for example. i only have dimmer plugs and on off plugs. you think they will work?

My computer is a server running win 7 only for downloading og runing sqeesbox server and hosting my files.
I have created a scene leaving home, where i want to be able to turn of my server. And a coming home coming home scene. the coming home scene works fine with wake on lan.

A Z-Wave Appliance module is basically a Power socket, in a plug-pack form, that lets you turn something On or Off (only, no dimming).

A bunch of companies make them, mine are the 15A rated ones from Monster, but GE, WD, Leviton, etc etc make them. They typically have 3-Pin power sockets in them.

If you already have Z-Wave switched sockets, then those will do (just not the dimmer-based ones)

Note that once you do this, the computer will be truely Off, and will no longer respond to WoL requests. It’ll also take some time to boot back up again, as the UPS will fully shutdown the machine.

[quote=“fba, post:4, topic:170323”]JOD - Have you tried using the “shutdown” command? On Windows 7 it has a /f parameter that seems like it would shut down without stopping at that prompt.[/quote]I have a Mac at home so no, haven’t tried it. I just assumed the OP’s request was for a PC.


no problem turning on the computer my motherboard can be turn on when 100% turned off. i only have 2 programs that work with wake on lan do one being micasaverde and squeezebox. my computer will not stay in hibernation because of teamwiewer and som remote desktop programs keep turning the computer on again.
So what you’re saying is a usb like this

and some software connected on the computer, to af z-wave on off plug, then it should work.
How to make micasaverde send a signal to turn of the ups, or can the usb automatically send a signal when it gets power and then turn of when coming home?
sorry for the newbie questions i am writeing from Denmark using google translate. and do not know how to code :slight_smile:

[tt][/tt] - requires [tt]samba-common[/tt] package installed.

Shutting down a machine remotely can work well however, it is not always straight forward as different version of Windows have different User Access Control in place. NT/Vista and Windows 7 (Professional is different to home). There was a small program power off that is still available and the info give you some ideas. See

As @guessed pointed out there is a safe options of using a UPS.

When the UPS has it power cut, it informs the computer and the software will then evokes a shutdown (turn off computer).
If your bios is set to restart on power on, the system will fire up. You can also modify the Registry if you desire to include user name and password and thus it would log in for you as well.

Now, by using a Z-Wave appliance module, you can remotely evoke the power off and on. One problem - most UPS will output a beep when the power is cut.

Most people who manage system like servers do not like remote shut downs as there can be issues as a result. That is just a warning. You may be better just setting up your power control to do this. I have both Team viewer and Window live Mesh and I do not have any issues with either sleeping or hibernation.

There is a post here somewhere (can’t find it but I’m trying) about wiring a relay in parallel with the power switch of a PC, then plugging the relay into an appliance module. A short on/off would be the same as pressing the power switch on the pc and would cause it to shutdown. The author also noted a few seconds of energizing the relay would force shutdown. I have a relay I picked up from from granger I’m going to be adding to my gaming pc for shutting down when it’s left on by mistake.

I’ll keep,searching for that thread…

i already have a app on my iphone (severcontrol) it can turn off my computer remotely so somehow it works.
i nedded to created a administrator user for i to work.
i dont need a ups so if a z-wave plug can turn off my computer by turning on and off quickly that wood be cool

i have made a executabel script that turns of my computer now the big question how will i make micasaverde send a signal to aktivate the program???

Easiest approach is to run eventghost on your PC. Install the webserver plugin (standard plugins), then simply do an HTTP request on the page via Vera.

For example (yours can/will differ slightly) one line in Luup will do it:

luup.inet.wget(“h-t-tp://internalIPDNSWhatever/eventghost.html?SleepPC”) (take the dashes out of h-t-tp - this BB thinks I’m posting a link, which technically I am, but…)

Then look at eventghost, the event is captured, and assign it to suspend the PC action. “Tada!” This is how I wired in every command to my media machines through Vera.

Eventghost is pretty reliable, lightweight, and straightforward. It’s free, and honestly, you don’t have to mess with hardware solutions. Sounds like you want software anyway, as you chose to go with WOL instead of using a z-wave plug and “boot on power” in the BIOS to begin with.

Nice research, demonspank.

Link to EventGhost for the lazy: