+Warwagon MVC Posted February 9, 2023 MVC Share Posted February 9, 2023 So I have a little Lenovo computer I got off eBay for the sole purpose of displaying my security cameras above my TV. It's a Pentium with 4GB of ram and uses around 11 watts. But I don't need it awake and running at night when I'm sleeping or out of the house. I was looking for a way to put it to sleep remotely because there is no mouse and keyboard hooked up to it. I found a way to do it via SSH. Install OpenSSH on the computer, install putty on my computer, and create a batch file which when ran, connects to the SSH server using putty and sends the following sleep command. RUNDLL32.EXE powrprof.dll,SetSuspendState The Bat file looks like this putty.exe -ssh owner@IP address -pw Password -m c:\command.txt You replace the ip address with the ip address of the computer and the password with the password of the computer. Then just put the rundll command above in the command.txt. Then to wake it up I simply use a wake-on Lan app. I was surprised how well it worked on my first attempt, which can be seen in the video below. 11 watts isn't much, but a little here and a little there and it adds up. WndSks, hellowalkman, Mindovermaster and 3 others 3 2 1 Share Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/ Share on other sites More sharing options...
+BudMan MVC Posted February 9, 2023 MVC Share Posted February 9, 2023 On 09/02/2023 at 10:08, Warwagon said: 11 watts isn't much, but a little here and a little there and it adds up. Yeah to the tune of what about 65 cents a month, if you leave it off for 16 hours a day and elec costs you like 12 (national average or so) cents a kwh.. So what 8$ in a year - you could buy yourself a starbucks coffee heheh But its not fully off is it, so are you really saving the whole 11 watts or is it something less than that your saving? I am all for saving electric and all - but is the say 2 cents a day worth it if something fails and it doesn't come back up when you want to see whats on the camera? Sikh 1 Share Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797185 Share on other sites More sharing options...
+Warwagon MVC Posted February 9, 2023 Author MVC Share Posted February 9, 2023 On 09/02/2023 at 14:05, BudMan said: Yeah to the tune of what about 65 cents a month, if you leave it off for 16 hours a day and elec costs you like 12 (national average or so) cents a kwh.. So what 8$ in a year - you could buy yourself a starbucks coffee heheh But its not fully off is it, so are you really saving the whole 11 watts or is it something less than that your saving? I am all for saving electric and all - I'm just a tightwad who also hates wasting electricity. Also my elec cost is 8 cents for the first 1,000 kw then it goes down to 4 cents. At least during the winter. So, get this, I just put all 4 of my couch computer monitors on a surge protector connected to a voice-controlled outlet. So at night, I say "Ok, Google, turn off the monitors" and the combined sleep of all 4 monitors which was 3 watts, is now 0 (I put a kill-a-watt on it) But I can also tell them to turn off when i'm down stairs in my office, not even on the couch computer. In that case it saves 180 watts So now we are up to about 13 watts! woot! (little computer is probably burning 1 watt just to sleep. As per the last bit, the computer gets turned on when I wake up in the morning and get turned off when I go to bed. Sir Topham Hatt and Jose_49 1 1 Share Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797195 Share on other sites More sharing options...
+BudMan MVC Posted February 9, 2023 MVC Share Posted February 9, 2023 4 cents per kwh? JFC that is cheap.. So your saving what like $2.5 a year.. Not even enough for a coffee Mindovermaster and Sikh 2 Share Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797197 Share on other sites More sharing options...
+Warwagon MVC Posted February 9, 2023 Author MVC Share Posted February 9, 2023 On 09/02/2023 at 14:26, BudMan said: 4 cents per kwh? JFC that is cheap.. So your saving what like $2.5 a year.. Not even enough for a coffee Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797202 Share on other sites More sharing options...
binaryzero Posted February 9, 2023 Share Posted February 9, 2023 You could've accomplished this using PowerShell... Yonah and Sikh 1 1 Share Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797260 Share on other sites More sharing options...
+Matthew S. Subscriber² Posted February 9, 2023 Subscriber² Share Posted February 9, 2023 On 09/02/2023 at 15:26, BudMan said: 4 cents per kwh? JFC that is cheap.. So your saving what like $2.5 a year.. Not even enough for a coffee Its enough for a Tim Hortons coffee... lol Mindovermaster 1 Share Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797271 Share on other sites More sharing options...
Mindovermaster Global Moderator Posted February 9, 2023 Global Moderator Share Posted February 9, 2023 On 09/02/2023 at 17:18, Matthew S. said: Its enough for a Tim Hortons coffee... lol I think that's almost enough for Dunkin' if I remember right.. +Matthew S. 1 Share Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797282 Share on other sites More sharing options...
+Warwagon MVC Posted February 10, 2023 Author MVC Share Posted February 10, 2023 On 09/02/2023 at 16:53, binaryzero said: You could've accomplished this using PowerShell... Do tell. Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797544 Share on other sites More sharing options...
binaryzero Posted February 10, 2023 Share Posted February 10, 2023 https://www.howtogeek.com/117192/how-to-run-powershell-commands-on-remote-computers/ Yonah and Sikh 1 1 Share Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797649 Share on other sites More sharing options...
+BudMan MVC Posted February 11, 2023 MVC Share Posted February 11, 2023 I would be more interested in this 4 cents you say your paying, or even 8 cents . So if you go over 1000 kwh for the month the rate drops to 4 cents? That is some cheap power to be sure, prob not much solar in your area at those rates. Do they hit you with high delivery charges? This is what can be confusing in finding true cost of power in some areas - where sites will list the cost per kwh, they don't always show the delivery charges.. Here in chicagoland the price per kwh is only like 9 some cents.. But then they add on another like 4 cents for delivery of that electric per kwh. And then there is just the charge for being a customer, and the meter charge.. Hope my jokey way of responding didn't come across that not worth saving some kwh here or there.. But there is prob some bigger fish to fry in saving electric than something that only uses like 10 watts.. And shutting it down for a few hours a day. How long do you leave it off vs on is needed to know how much actual kwh you might be saving as well. Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797695 Share on other sites More sharing options...
+Warwagon MVC Posted February 11, 2023 Author MVC Share Posted February 11, 2023 On 10/02/2023 at 23:36, BudMan said: I would be more interested in this 4 cents you say your paying, or even 8 cents . So if you go over 1000 kwh for the month the rate drops to 4 cents? That is some cheap power to be sure, prob not much solar in your area at those rates. Do they hit you with high delivery charges? This is what can be confusing in finding true cost of power in some areas - where sites will list the cost per kwh, they don't always show the delivery charges.. Here in chicagoland the price per kwh is only like 9 some cents.. But then they add on another like 4 cents for delivery of that electric per kwh. And then there is just the charge for being a customer, and the meter charge.. How long do you leave it off vs on is needed to know how much actual kwh you might be saving as well. I forgot, that there is also the Energy Adjustment Clause, where they adjust what the have to pay. I have no gas and just have heat pump. Usually during months were the heat or ac doesn't have to run my electric bill is about $60. Quote Hope my jokey way of responding didn't come across that not worth saving some kwh here or there.. But there is prob some bigger fish to fry in saving electric than something that only uses like 10 watts.. And shutting it down for a few hours a day. For sure, I've done best I could, even replacing computers with lower power ones that do the same thing. But then I go and build a new computer more power hungry than the last one. But if ya want performance gotta use some power. Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797744 Share on other sites More sharing options...
Nick H. Supervisor Posted February 11, 2023 Supervisor Share Posted February 11, 2023 On 10/02/2023 at 17:32, Warwagon said: Do tell. It's funny, I just finished watching this video and then I saw this thread. There are some neat tips throughout the video, but he talks specifically about shutting down remote computers at 14:43: +Warwagon 1 Share Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797750 Share on other sites More sharing options...
+BudMan MVC Posted February 11, 2023 MVC Share Posted February 11, 2023 you used 2782 Kwh in 1 month? WTF dude.. That is insane.. I have never used that much even in the summer with the AC running like constantly since the wife likes it 67 degrees.. Here is old bill showing before went solar You used like what I used in 2 months in summer with AC going full bore.. Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797815 Share on other sites More sharing options...
+Warwagon MVC Posted February 11, 2023 Author MVC Share Posted February 11, 2023 On 11/02/2023 at 16:58, BudMan said: you used 2782 Kwh in 1 month? WTF dude.. That is insane.. I have never used that much even in the summer with the AC running like constantly since the wife likes it 67 degrees.. Here is old bill showing before went solar You used like what I used in 2 months in summer with AC going full bore.. Air conditioning is much cheaper than heat pump in the winter. We had a Lowe’s in the -20. . At that point the emergency heat kicks on and I’m using electric heat. Actually under 15° needs assistant from the emergency heat. Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797817 Share on other sites More sharing options...
+BudMan MVC Posted February 11, 2023 MVC Share Posted February 11, 2023 On 11/02/2023 at 17:01, Warwagon said: and I’m using electric heat. Ugghhh.. Yeah that would suck.. Good thing your rate over 1k is only 4 cents Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797818 Share on other sites More sharing options...
WndSks Posted February 12, 2023 Share Posted February 12, 2023 (edited) On 09/02/2023 at 17:08, Warwagon said: RUNDLL32.EXE powrprof.dll,SetSuspendState 0,1,0 Please stop spreading incorrect information. Your 0,1,0 parameters here do nothing! It is undefined if this command will sleep or hibernate. You are lucky it does not just crash and burn. Quote Rundll32 can only call functions from a DLL explicitly written to be called by Rundll32. See also: What can go wrong when you mismatch the calling convention? Throwing garbage on the sidewalk: The sad history of the rundll32 program Shutdown.exe on recent versions can hibernate but not sleep for unknown reasons. Use Powershell instead for sleep. Edited February 12, 2023 by WndSks Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797948 Share on other sites More sharing options...
+Warwagon MVC Posted February 12, 2023 Author MVC Share Posted February 12, 2023 On 12/02/2023 at 16:04, WndSks said: Please stop spreading bad information. Your 0,1,0 parameters here do nothing! It is undefined if this command will sleep or hibernate. You are lucky it does not just crash and burn. See also: What can go wrong when you mismatch the calling convention? Throwing garbage on the sidewalk: The sad history of the rundll32 program I can confirm the 0,1,0 are not needed. I found that command online from numinous sources, so I didn't think to modify it, but I did remove those numbers from the command and it still works. Removed the numbers from the command on the first post. Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797952 Share on other sites More sharing options...
WndSks Posted February 12, 2023 Share Posted February 12, 2023 On 12/02/2023 at 23:19, Warwagon said: and it still works but it is still incorrect and the result is undefined. There is simply no way to correctly call this function with rundll32. You must p/invoke with powershell. Something along the lines of Add-Type -Assembly System.Windows.Forms [System.Windows.Forms.Application]::SetSuspendState([System.Windows.Forms.PowerState]::Suspend, $true, $false) (I did not test this but it should be close) Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797955 Share on other sites More sharing options...
farmeunit Posted February 13, 2023 Share Posted February 13, 2023 Why don't you just schedule it? Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797963 Share on other sites More sharing options...
+Warwagon MVC Posted February 13, 2023 Author MVC Share Posted February 13, 2023 On 12/02/2023 at 19:00, farmeunit said: Why don't you just schedule it? Because I don't always go to bed at the same time. I also want to put it to sleep if I leave the house for the day. Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598797967 Share on other sites More sharing options...
farmeunit Posted February 18, 2023 Share Posted February 18, 2023 It doesn't have to be an exact schedule. Just set to midnight if you go between 10-midnight. As for leaving the house, use IFTT. Set up something on your phone like a geofence. You could probably even tie it into Alexa, so when you say Goodnight, it turns it off. And when you say something else it turns it on. Of course that requires WoL or something like that. Lots of ways to really do it, but you need to right combination or hardware. Honestly, use a smart plug. Problem solved. Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598799607 Share on other sites More sharing options...
+Warwagon MVC Posted February 18, 2023 Author MVC Share Posted February 18, 2023 On 18/02/2023 at 17:52, farmeunit said: It doesn't have to be an exact schedule. Just set to midnight if you go between 10-midnight. As for leaving the house, use IFTT. Set up something on your phone like a geofence. You could probably even tie it into Alexa, so when you say Goodnight, it turns it off. And when you say something else it turns it on. Of course that requires WoL or something like that. Lots of ways to really do it, but you need to right combination or hardware. Honestly, use a smart plug. Problem solved. Smart plug is like yanking the power out of the wall while it's running. Honestly I'm really happy with this setup. It works perfect for what I need. Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598799608 Share on other sites More sharing options...
farmeunit Posted February 20, 2023 Share Posted February 20, 2023 (edited) If you're just using it for viewing cameras and such, it doesn't really matter. Especially with mostly solid state parts. The only time it really matters if it's writing data because it could get corrupted. Otherwise, it makes little to no difference. That being said, you can automated the whole process before actually shutting off the plug. Then you can have it return to the last power state once the plug is turned on. I was just giving you options instead of focusing on one way to do it. Home Assistant or several other options available. Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598799941 Share on other sites More sharing options...
+Warwagon MVC Posted February 20, 2023 Author MVC Share Posted February 20, 2023 On 20/02/2023 at 14:45, farmeunit said: If you're just using it for viewing cameras and such, it doesn't really matter. Especially with mostly solid state parts. The only time it really matters if it's writing data because it could get corrupted. Otherwise, it makes little to no difference. That being said, you can automated the whole process before actually shutting off the plug. Then you can have it return to the last power state once the plug is turned on. I was just giving you options instead of focusing on one way to do it. Ya, I could have the computer shut down at X time, and then set it so a smart outlet turn off. Or I can just double click a batch file 3 seconds before I get off the couch and go to bed. I do shut the machine off when I leave for 3 or 4 days. Thanks for the options though. Link to comment https://www.neowin.net/forum/topic/1425728-putting-a-windows-1011-computer-to-sleep-over-the-network-using-ssh/#findComment-598799944 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now