HA motion - send http to Blue Iris to start recording

Hi all. I just discovered that I can use cheap 433MHZ motion detectors and a Sonoff bridge with ESPHome. Works great! Now I want to have an automation that on motion detect sends an HTTP request to BlueIris to start a camera recording.
I need to send http://my.blueiris.server:6060/admin?camera=Hik-3&trigger=1

I looked at setting up a rest command service but I’m unclear on the details. If I do this:

rest_command:
  record_backyard:
    url: "http://my.blueiris.server:6060/"
    method: get
    content_type: "application/x-www-form-urlencoded"
    payload: "admin?camera=Hik-3&trigger=1"

What do I put in the service data?
If anyone else has done this, I’d love to see your config files.
Thanks!

I am using a command line switch to send the http request.

- platform: command_line
   switches:
   
     front_garden_cam_manual_recording:
       command_on: "curl -k 'http://192.168.0.25:81/admin?camera=front_garden_hd&manrec=1&manrecsec=0&user=xxxxx&pw=xxxxxxxxx'"
       command_off: "curl -k 'http://192.168.0.25:81/admin?camera=front_garden_hd&manrec=0&user=xxxxx&pw=xxxxxxxxx'"

This is the automation.

- alias: "Front Door Open Recording On"
  mode: restart
  initial_state: True
  trigger:
    platform: state
    entity_id: binary_sensor.alarm_front_door
    to: "on"
  action:
   - service: switch.turn_on
     entity_id: switch.front_garden_cam_manual_recording
1 Like

Thanks! I’ll give it a try.

Worked great! Thanks again!