- alias: Living Room Camera View
trigger:
platform: state
entity_id: input_select.livingroom_presets
to: "Living Room"
action:
service: shell_command.lv_cam_preset1
@omeasire
Thanks for the quick reply. I have setup the automations like you suggested, it passes script test
hass --script check_config
But when I actually choose the input nothing happens. how can i emulate the shell command?
This is my shell_commands.yaml
shell_command:
#Created a preset point in Living Room Web Interface
lv_cam_preset1: 'curl -k "http://192.168.1.184/cgi-bin/decoder_control.cgi?type=2&cmd=0&user=admin&pwd=12345"'
#Created a preset point
lv_cam_preset2: 'curl -k "http://192.168.1.184/cgi-bin/decoder_control.cgi?type=2&cmd=1&user=admin&pwd=12345"'
#Created a preset point
lv_cam_preset3: 'curl -k "http://192.168.1.184/cgi-bin/decoder_control.cgi?type=2&cmd=2&user=admin&pwd=12345"'
Did you get this to work? I’m trying the same to control a Dahua PTZ and calling the service does nothing on Hassio 0.82.1. Also tried on another system running 0.83.3, still no joy. When I paste that curl command into cURL for Windows however, it works.