Send a URL to IPCAM at Sunrise/Sunset to change Day to Night

I have a single line URL that works to trigger my IPCAMs to NIGHT mode in my browser.
If I make a Sunset/Sunrise automation, how do I create a trigger to send that URL ?

Have you looked at the HA docs for automation triggers?

Why, yes I have. I have several automations already that are triggered by sunrise/sunset. I just cannot wrap my head around how to trigger a URL. The webhooks thing looks like a likely candidate, but I cannot wrap my head around the webhook instructions and how to actually implement it. A simple example would help a lot. It baffles me, the way the doc is written atm.

you saying that you wanted to “create a trigger…” confused me. I thought you wanted to create a trigger. What you really want is to know how to send the command.

for my security cameras (Foscam brand)I use a shell_command to set the desired states.

here is an example of what I do to set the position of one of my cameras based on me being home or not_home:

  - alias: AS Computer Cam Position Control
      - platform: state
      service: >
        {% if trigger.to_state.state == 'home' %}
        {% else %}
        {% endif %}


  as_comp_cam_record_pos: curl -k ""
  as_comp_cam_top_pos: curl -k ""

I’m not sure what would be necessary to send that URL command to the camera from within HA on your system. It may just work out of the box. You could try it and see.

Well, yes, I am trying to simply send the command within the HA ‘Automations’ as an Action from within the GUI. I have no idea where to put any of that code that you mentioned.

I don’t use the GUI so I don’t have any idea if you can create a template service call or not. But you can definitely either make two automations - one for sunrise and one for sunset - and use the appropriate shell_command service call directly in the action without templating or you can get a bit more advanced and create two triggers (a sunrise and a sunset trigger) in one automation and use the “choose:” action to call the correct shell_command.

or you can write the automation in yaml manually.

as far as I know you can’t create shell_commands in the GUI so you will need to put the “shell_comand:” portion in the configuration.yaml manually using yaml.