Jump to content

Shutting Down PCs / RPi


MaddBomber83

Recommended Posts

Hello;

 

Has anyone looked into / found / is using a solution to send 'soft' reset/shutdown requests to PCs and the Raspberry Pi?

 

I would like to integrate an event in the ISY where I can control power to these devices (such as killing power to the outlet) and I would like to be able to shut the down 'proper' before taking away power.

Link to comment

Not directly and I've not been completely successful at this yet. What I was trying to do was get a variable update when the pc's were actually in use vs just being on. I thought maybe a wrapper around a screen saver might work, but only the latest versions of windows appear to have a reliable method of telling, maybe.

 

That way (and maybe when we get ping response you can tell if it's actually on as well) the normal power saving feature of the pc's could be used and you would know they are down, therefore it's safe to turn off the power.

 

Alan

Link to comment

Wow - finally I can contribute something to the Forum.

 

I have done just want you are wanting. I shut down all my PCs/Servers when the house goes into "AWAY" mode and then restart them again when I set the house to "HOME" mode.

 

What you need is the Network Resources addin for ISY and a program called "SleepOnLan" (http://www.ireksoftware.com/SleepOnLan).

 

1) Download and install the program on the Computer(s) that you want to be able to shutdown.

2) Run the program and set the port number that you want it to listen on.

3) The program needs to be always running - this means that you should have it auto-start when the Computer boots. Depending on your setup you may need to have your user account "auto Log-on" (there's a sysinternals tool to enable you to easily do this) so that it runs the program (I don't think it can be installed as a Service).

4) Note down from the programs main screen the form of the command line that you need to send (e.g. http://PC_ip:port/command) and the options that you have.

5) Now go to ISY and create a new network resource for each computer that you want to shutdown (or hibernate, logoff, lock, reboot etc).

5) In the Network Resource Editor window set the following for the protocol information:

- http

- GET

- IP of your Computer

- Port that you selected

- /Forcepoweroff - or whatever other Action you want to perform

6) Save the settings and you are good to go. Just add the newly created "resource" into your controlling program ( e.g Resource 'PowerDownPC1') and execute that program

 

To get your machines to wake up again you will need to make sure that they have Wake-On-Lan features enabled (usually in the Network Card Settings but sometines ist necessary to configure things in the BIOS.

 

Once enable you can then use the ISY to send out WOL commands - simply create the necessary entries in the Wake On LAN tab of the Networking addin.

The command can be sent from an ISY program simply by adding Wake On LAN 'recourceName'

 

I haven't tried this yet on my RaspberryPi (as there is little point in shutting them down as they draw so little power) - however it should be fairly similar to the MS Windows approach.

Link to comment

Nice ppitkin.

 

Later when I have the chance I'll be trying this out as it sounds exactly what I need.

 

 

For the RPi, I'm having issues with connected USB miners having decaying performance over time. The temp solution was a croon job to restart the RPi every few hours. Instead, I'm considering hooking the mining equipment into a monitored outlet so that I can see the power consumption. I'm assuming as the hash power goes down so does the consumption. The idea is rather than a dumb timer, I could restart the RPi based on consumption. It would also allow me to restart the equipment (hard reset) remotely either on failed starting of all the chips or when I am tinkering around with it.

 

 

As for the computers, I'm not look for an 'auto' solution. Instead I would like to hit one of the switches in our bedroom / phones to turn them off.

 

Again, thanks for the write up! Looking forward to testing it out. Gives me a reason to buy the network resource pack now.

Link to comment
Hello;

 

Has anyone looked into / found / is using a solution to send 'soft' reset/shutdown requests to PCs and the Raspberry Pi?

 

I would like to integrate an event in the ISY where I can control power to these devices (such as killing power to the outlet) and I would like to be able to shut the down 'proper' before taking away power.

In my link programs (I think you're using one), you can enable the relay server which will accept restart and shutdown commands.

Link to comment
  • 1 month later...

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.3k
×
×
  • Create New...