So I managed to add emulated roku device to home assistant and harmony hub which lets me map a button press on harmony remote to sth. in home assistant.
I also added wake on lan integration which works. I press a button and the pc starts…sth. logitech didn’t manage/care to implement in decades…perfect.
Now I also want to shut the pc down again and in the Supervisor I found rpc shutdown addon, I configured it like this:
computers:
- alias: desktop
address: 192.168.---.---
credentials: ---%---
delay: 0
message: >-
Home Assistant is shutting down this PC. This cannot be canceled. Please
save your work!
Rpc shutdown command via ssh from the debian homeserver now works. Wake on lan helppage tells me it has a turn_off variable to add sth. for turning the pc off, so I added rpc shutdown in switch.yaml like that:
- platform: wake_on_lan
name: pc
mac: "*************"
host: 192.168.---.---
turn_off:
service: hassio.addon_stdin
data:
addon: core_rpc_shutdown
input: desktop
And the automation that listens for roku button presses and should shut down the pc looks like that:
alias: pc_aus
description: pc ausschalten via rpc shutdown
trigger:
- event_data:
key: Rev
source_name: homeassistant
type: keypress
event_type: roku_command
platform: event
condition: []
action:
- data: {}
entity_id: switch.pc
service: switch.turn_off
I’m sure I’m missing sth. but I can’t figure out why pc shutdown doesn’t work.