Hi, I’d appreciate if someone could help me. Thanks.
I’d like to switch on / off my LG TV with either WOL, Rest Command or Curl in an automation.
Homeassistant is running on a dedicated Intel Nuc on VLAN 192.168.20.xxx. LG TV on another VLAN 192.168.40.xxx.
In the config.yaml im having the following rest command specified:
rest_command:
wake_device:
url: 'https://opnsense/api/wol/wol/set'
method: POST
payload: '{"wake":{"interface": "opt4","mac": "ac:5a:f0:e3:0b:00}}'
content_type: 'application/json'
username: xxxx
password: yyyy
verify_ssl: false
With the rest command I’m calling the WOL Api from opnsense. I’m getting the following error when executing the rest command in an automation,
Führe die Aktion „rest_command.wake_device” aus
Ausgeführt: 23. Mai 2025 um 11:39:12
Ergebnis:
params:
domain: rest_command
service: wake_device
service_data: {}
target: {}
running_script: false
but there are no blockings in the firewall but consequently LT TV isn’t switching on.
Running the following curl commands in the home assistant terminal it works perfectly:
curl -k https://opnsense/api/wol/wol/set \
-u "xxxx/":"yyyy"
-H "Content-Type: application/json" \
-d '{"wake":{"interface": "opt4","mac": "ac:5a:f0:e3:0b:00"}}'
What I understand, it’s basically the same …
I’m not a dev or coder but I’d appreciate if someone could help me to get my LGTV on with an automation.