Código: Seleccionar todo
switch:
- name: reniciar
platform: command_line
switches:
apagar_pc:
command_off: "net rpc shutdown -I ip.del.pc.en.la.red.local -U usuarioPC%suclave"
command_on: "wakeonlan direccion.mac.de.la.tarjeta.de.red.del.PC"
command_state: "ping -c2 ip.del.pc.en.la.red.local"
friendly_name: "PC casa"
Código: Seleccionar todo
[{"id":"9d47b2cc.b879c8","type":"alexa-home","z":"be2411d8.7086b","conf":"3487ef6.9c68e9","device":"49088","acknoledge":true,"name":"ordenador","topic":"","x":80,"y":540,"wires":[["ad13826d.95faf8"]]},{"id":"ad13826d.95faf8","type":"switch","z":"be2411d8.7086b","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":250,"y":540,"wires":[["85641df5.189118"],["d3525dbd.a9aec8"]]},{"id":"85641df5.189118","type":"exec","z":"be2411d8.7086b","command":"wakeonlan mac.de.la.tarjeta.de.red","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":560,"y":540,"wires":[[],[],[]]},{"id":"d3525dbd.a9aec8","type":"exec","z":"be2411d8.7086b","command":"net rpc shutdown -I ip.del.pc.en.red.local -U usuarioPC%suClave","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":660,"y":600,"wires":[[],[],[]]},{"id":"3487ef6.9c68e9","type":"alexa-home-conf","z":"","username":"usuarioSkill"}]
En la raspberry:
sudo apt-get install samba-common
sudo apt-get install wakeonlan
En el PC activar shutdown remoto y el wake on lan:
https://www.online-tech-tips.com/comput ... n-command/
https://www.howtogeek.com/109655/how-to ... ndows-pcs/
https://www.redeszone.net/2018/02/10/ac ... indows-10/