Frigate and MQTT

I have cameras that write in the Frigat program. I disable LED recording and detection and motion via MQTT on the camera. But the camera still records. The information in MQTT shows that there is no recording, but recording is in progress.

alias: frigate_led_off
description: ""
trigger:
  - platform: state
    entity_id:
      - input_boolean.manual_vent
    to: "off"
condition: []
action:
  - service: mqtt.publish
    data:
      topic: frigate/LED/recordings/set
      payload: "off"
  - service: mqtt.publish
    data:
      topic: frigate/LED/motion/set
      payload: "off"
  - service: mqtt.publish
    data:
      topic: frigate/LED/detect/set
      payload: "off"
mode: single





Is there a reason you aren’t using the ha entity, probably named switch.led_recording ?

I tried through full-time integration. Everything is off but the camera is writing on motion and detection.


My frigate code:

  LED:
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-aac
      
      inputs:
        # sub strim
      - path: rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1
        roles:
        - detect
        # main srim 
      - path: rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
        roles:
        - record

    detect:
          width: 640
          height: 480
          fps: 5    
    record:
      enabled: true
      retain:
        days: 0
        mode: all
      events:
        retain:
          default: 1
          mode: active_objects
          objects:
            cat: 1
            persone: 1
    snapshots:
      enabled: true    

Perhaps use the frigate help channels. This isn’t the frigate forum.

1 Like