I’m trying to get the rest_command service to work with a URL that toggles my Synology cameras on and off.
If I enter:
http://10.0.1.190:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.ExternalEvent&method="Trigger"&version=1&eventId=1&eventName="This is external event1"&account="username"&password="password"
into my browswer url bar the cameras disable as required.
Here’s is my attempt to automate this:
configiguration.yaml
rest_command: !include rest_configs.yaml
rest_configs.yaml:
disable_synology_cameras:
url: http://10.0.1.190:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.ExternalEvent&method="Trigger"&version=1&eventId=1&eventName="This is external event1"&account="username"&password="password"
method: PUT
automations.yaml:
- alias: Disable Synology Cameras
initial_state: 'on'
trigger:
- platform: state
entity_id: input_boolean.disable_synology_cameras
from: 'off'
to: 'on'
action:
- service: tts.google_say
data:
entity_id: media_player.kitchen_speaker
message: "Cameras disabled"
- service: rest_command.disable_synology_cameras
It all passes config check with no errors.
What am I missing here?