How can I shut down NSA-325v2 from a Raspberry (openHAB)?

mancer Posts: 1  Freshman Member
edited December 2017 in Personal Cloud Storage
Hey guys.
I started using openHAB on a Raspberry Pi. While it's easy to turn the NAS on, I'm having troubles turning it off again through openHAB.
I use the binding Wake-on-LAN, which suggests the following:
Switch networkPC "Computer" (network, gOGBuero) { wol="", exec=">[OFF:net rpc shutdown -C MESSAGE -I -U USER%%PASSWORD -f -t 120]" }
However, nothing happens. Upon logging into the Pi through SSH and executing the command (net rpc...), Pi returns Connection failed: NT_STATUS_HOST_UNREACHABLE Any ideas if a remote shutdown is possible at all? Regards, Alex


Accepted Solution

  • Mijzelf
    Mijzelf Posts: 1,630  Guru Member
    Accepted Answer
    'net rpc' is a samba tool to send Windows RPC messages. AFAIK that will only work on Windows targets.

    You can do a remote shutdown by enabling the ssh daemon on the NAS and execute
    ssh [email protected] poweroff

    I'd rather replace the IP by a hostname, but I don't know if your network DNS supports that.

    This way you'll have to enter a password. That can be bypassed by using ssh keyless login. To get that running root needs to have a non-volatile home directory. By default it is volatile. Using Tweaks you can change root's homedirectory.

Sign In to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click on this button!