HOW TO SETUP OPENREMOTE TO SHUTDOWN A PC?
Cyril Stauber
On Jun 01, 2016 16:40
Hi to the OR community!
I am a total newbie with OR.
I succeeded to setup and perform a Wake On LAN with Openremote, which I'm very happy with.
Now I would like to perform a shutdown of a PC (fixed IP, windows 10).
The PC is on the same LAN than the Raspberry Pi (fixed IP) running the OR server.
I am using my android phone for the interface.
I tried to find some clues on how to setup a shutdown of a PC with OR.
I am still unable to find any tutorial on how to perform this.
So I am turning my search to this forum, hoping somebody can help me.
There is the Windows Shutdown command line instruction that can be used across a network.
If you can get that working, it should be easy enough to get OpenRemote to perform a shell command.
However, there is the minor detail that you're running OR on a Linux OS, rather than another Windows machine.
That said, if you can configure a .sh script to shutdown the Windows machine, you can call that from OpenRemote.
Thanks again for your answer.
The shell script that I could call from OR might be the right way to perform the remote shutdown.
I'm building my script accordingly to the shutdown terminal command I tested and that succeded.
The terminal command is: sudo net rpc shutdown /s -f -I IPADDRESS -U USERNAME%PASSWORD
Prior to that you need to install SAMBA packages: sudo apt-get install samba-common-bin
I'll post a script example so everyone can do it.