platform: wake_on_lan
mac: “xx:xx:xx:xx:xx”
name: Wake on lan
host: “192.168.xxx.xxx”
turn_off:
service: shell_command.turn_off_pc
shell_command:
turn_off_pc: ‘net rpc shutdown -I 192.168.xxx.xxx -U user%pass’
the wake up works fine, the shutdown does not work.
If i manually launch “net rpc shutdown -I 192.168.xxx.xxx -U user%pass” on the raspberry it wrks fine, why via HA does not shutdown?
thanks
dell_shut_down:
alias: Shut down Dell
sequence:
- data:
addon: core_rpc_shutdown
input: dell1
service: hassio.addon_stdin
mode: single
…and in the add-on configuration:
- alias: dell1
address: xxx.xx.x.xxx
credentials: HomeAssistant%B77cFB959o
delay: 0
message: >-
Home Assistant is shutting down this PC. This cannot be cancelled. Please
save your work!
- platform: wake_on_lan
mac: "xxxx"
name: Wake on lan
host: "xxx"
turn_off:
service: shell_command.turn_off_pc
shell_command:
turn_off_pc: bash ./shut.sh
root@raspberrypi:/home/homeassistant/.homeassistant# ls output*
output output2 output3
root@raspberrypi:/home/homeassistant/.homeassistant# cat output
./shut.sh: line 1: ./net: No such file or directory
root@raspberrypi:/home/homeassistant/.homeassistant# cat output2
./shut.sh: line 2: /usr/bin/net: No such file or directory
root@raspberrypi:/home/homeassistant/.homeassistant# ls net
net
root@raspberrypi:/home/homeassistant/.homeassistant#