question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

switch entitys for camera control does not work (frigate-hass-integration)

See original GitHub issue

Version of the custom_component

image image

Configuration

-configuration.yaml:

# Loads default set of integrations. Do not remove.
default_config:

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
media_source:
http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

frigate.yml:
mqtt:
  host: HAfrigate
  user: 69xxx
  password: xxx69
cameras:
  reolink:
    ffmpeg:
      input_args:
        - -avoid_negative_ts
        - make_zero
        - -fflags
        - nobuffer+genpts+discardcorrupt
        - -flags
        - low_delay
        - -strict
        - experimental
        - -analyzeduration
        - 1000M
        - -probesize
        - 1000M
        - -rw_timeout
        - "5000000"
      inputs:
        - path: http://192.168.2.137/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=xxx69&password=69xxx
          roles:
            - record
            - rtmp
        - path: http://192.168.2.137/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=xxx69&password=69xxx
          roles:
            - detect
    detect:
      width: 896
      height: 672
      fps: 7
  esp32:
    ffmpeg:
      input_args:
        - -r
        - 4
        - -avoid_negative_ts
        - make_zero
        - -fflags
        - +genpts
        - -use_wallclock_as_timestamps
        - '1'
      inputs:
        - path: http://192.168.2.155:81/stream
          roles:
            - detect
#ffmpeg:
#  hwaccel_args:
#    - -c:v
#    - h264_v4l2m2m
rtmp:
  # Optional: Enable the RTMP stream (default: True)
  enabled: False
record:
  enabled: True
  events:
    retain:
      default: 10

Describe the bug

Switch entity for control of the camera does not work. State is always undefined. image

Debug log

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.frigate.api Source: custom_components/frigate/api.py:172 Integration: Frigate (documentation, issues) First occurred: 13:07:22 (5 occurrences) Last logged: 16:40:19

Error fetching information from http://ccab4aaf-frigate-beta:5000/api/stats: Cannot connect to host ccab4aaf-frigate-beta:5000 ssl:default [Name does not resolve] Error fetching information from http://ccab4aaf-frigate-beta:5000/api/stats: 502, message=‘Bad Gateway’, url=URL(‘http://ccab4aaf-frigate-beta:5000/api/stats’) Error fetching information from https://ccab4aaf-frigate-beta:5000/api/stats: Cannot connect to host ccab4aaf-frigate-beta:5000 ssl:default [[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)]

Frigate NVR Beta (0.11.0) [s6-init] making user provided files available at /var/run/s6/etc…exited 0. [s6-init] ensuring user provided files have correct perms…exited 0. [fix-attrs.d] applying ownership & permissions fixes… [fix-attrs.d] done. [cont-init.d] executing container initialization scripts… [cont-init.d] done. [services.d] starting services [services.d] done. [2022-07-18 13:08:01] frigate.app INFO : Starting Frigate (0.11.0-ef54cd6) [2022-07-18 13:08:01] frigate.app INFO : Creating directory: /tmp/cache Starting migrations [2022-07-18 13:08:01] peewee_migrate INFO : Starting migrations There is nothing to migrate [2022-07-18 13:08:01] peewee_migrate INFO : There is nothing to migrate [2022-07-18 13:08:02] frigate.app INFO : Output process started: 218 [2022-07-18 13:08:02] frigate.app INFO : Camera processor started for reolink: 221 [2022-07-18 13:08:02] detector.cpu INFO : Starting detection process: 217 [2022-07-18 13:08:02] ws4py INFO : Using epoll [2022-07-18 13:08:02] frigate.app INFO : Camera processor started for esp32: 224 [2022-07-18 13:08:02] frigate.app INFO : Capture process started for reolink: 226 [2022-07-18 13:08:02] frigate.app INFO : Capture process started for esp32: 227 [2022-07-18 13:08:02] frigate.edgetpu WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes. [2022-07-18 13:08:03] ws4py INFO : Using epoll


![image](https://user-images.githubusercontent.com/42540450/179542409-3b8c6c76-a422-4b72-8432-7083231a604a.png)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
NickM-27commented, Jul 18, 2022

My whole setup uses a single mqtt server instance for all my clients. This is fine for the frigate integration to work, right? or did I miss something?

Yes that’s totally fine (and what I do), OP didn’t have the MQTT integration (different from addon) setup. Frigate integration uses the MQTT integration to automatically communicate with your MQTT server instance so it doesn’t need to ask for MQTT credentials and store those separately

0reactions
baylangercommented, Jul 18, 2022

Do you have the MQTT integration (different than addon) setup in HA? That is required for this integration to work

awesome - you are my hero done

I’m about to complete my setup and now a bit confused 😃

My whole setup uses a single mqtt server instance for all my clients. This is fine for the frigate integration to work, right? or did I miss something?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frigate Lovelace Card + Camera Detection Switch Overlay
I'm using the Frigate HACS integration with the Frigate Card Lovelace Frontend customization and it works fairly well but I really want to...
Read more >
Home Assistant Integration - Frigate Docs
Switch entities to toggle detection, recordings and snapshots. A "motion" binary sensor entity per camera/zone/object.
Read more >
Frigate and Home Assistant - YouTube
An indepth look at how Frigate integrates into Home Assistant. Using the Frigate HACS integration we can look at our live video streams, ......
Read more >
Video surveillance system with Frigate and Home Assistant
This will create all the Entities with the cameras that we have defined in Frigate, and there is nothing left to do but...
Read more >
Home Assistant Frigate integration for local image recognition
Home Assistant Frigate integration will allow you to have local object detection with AI for you IP cameras. Home Assistant automations are ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found