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

mancer
Posts: 1
Freshman Member

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="192.168.10.255#00-DE-AD-BE-EF-00", exec=">[OFF:net rpc shutdown -C MESSAGE -I 192.168.10.23 -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
#NAS_December
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="192.168.10.255#00-DE-AD-BE-EF-00", exec=">[OFF:net rpc shutdown -C MESSAGE -I 192.168.10.23 -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
#NAS_December
0
Accepted Solution
-
'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 executessh root@192.168.10.23 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.
1
All Replies
-
'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 executessh root@192.168.10.23 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.
1
Categories
- All Categories
- 434 Beta Program
- 2.7K Nebula
- 174 Nebula Ideas
- 117 Nebula Status and Incidents
- 6.1K Security
- 418 USG FLEX H Series
- 297 Security Ideas
- 1.6K Switch
- 78 Switch Ideas
- 1.2K Wireless
- 43 Wireless Ideas
- 6.7K Consumer Product
- 270 Service & License
- 416 News and Release
- 87 Security Advisories
- 31 Education Center
- 10 [Campaign] Zyxel Network Detective
- 4.1K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 83 About Community
- 87 Security Highlight