blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
18.17k stars 1.66k forks source link

[Support]: Update failure - please can you point me in the right direction. #4132

Closed ripvega closed 1 year ago

ripvega commented 1 year ago

Describe the problem you are having

I have tried to update to

This is what I see in my logs: Error fetching information from http://10.0.1.100:5000/api/stats: Cannot connect to host 10.0.1.100:5000 ssl:default [Connect call failed ('10.0.1.100', 5000)] 8:01:05 AM – (ERROR) Frigate (custom integration) - message first occurred at October 19, 2022 at 7:22:25 PM and shows up 573 times Failed to to call /store/addons/ccab4aaf_frigate-fa/update - Unknown error, see supervisor October 19, 2022 at 7:32:13 PM – (ERROR) Home Assistant Supervisor - message first occurred at October 19, 2022 at 7:27:13 PM and shows up 2 times Config entry 'Frigate' for frigate integration not ready yet; Retrying in background October 19, 2022 at 7:22:25 PM – (WARNING) config_entries.py Failed to connect to MQTT server due to exception: [Errno 111] Connection refused October 19, 2022 at 7:22:24 PM – (ERROR) MQTT

This is the error I'm seeing.

Screenshot 2022-10-20 at 08 07 38

And this is in the addon log: [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-10-20 08:11:08] frigate.app INFO : Starting Frigate (0.10.1-83481af) [2022-10-20 08:11:08] frigate.app INFO : Creating directory: /tmp/cache Starting migrations [2022-10-20 08:11:08] peewee_migrate INFO : Starting migrations There is nothing to migrate [2022-10-20 08:11:08] peewee_migrate INFO : There is nothing to migrate [Errno 111] Connection refused [cmd] python3 exited 1 [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal.

Version

0.10.1-83481AF to 0.11.1

Frigate config file

mqtt:
  host: 10.0.1.100
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: ashscott
  password: pw
  stats_interval: 60

ffmpeg:
  hwaccel_args:
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p

database:
  path: /media/frigate/clips/frigate.db

timestamp_style:
  position: "tl"
  format: "%m/%d/%Y %H:%M:%S"
  color:
    red: 255
    green: 255
    blue: 255
  thickness: 2
  effect: shadow

detectors:
  # coral1:
  #   type: edgetpu
  #   device: usb:0
  # coral2:
  #   type: edgetpu
  #   device: usb:1
  cpu1:
    type: cpu
    num_threads: 3
# resolution was 640x352 changed to 1920x1080
cameras:
  the_lodge: # <------ Name the camera
    ffmpeg:
      inputs:
        - path: rtsp://admin:pw@10.0.1.200:554/cam/realmonitor?channel=1&subtype=1
          roles:
            - detect
        - path: rtsp://admin:pw@10.0.1.200:554/cam/realmonitor?channel=1&subtype=0
          roles:
            - record

#### Testing with file ####
      # inputs:
      #   - path: /media/frigate/the_lodge.mp4
      #     input_args: -re -stream_loop -1 -fflags +genpts
      #     roles:
      #       - detect
      #       - rtmp

    rtmp:
      enabled: false # <-- RTMP should be disabled if your stream is not H264
    detect:
      width: 704 # <---- update for your camera's resolution
      height: 576 # <---- update for your camera's resolution
      fps: 20
      # stationary:
      #   interval: 0
      #   threshold: 50
    objects:
      track:
        - car
        - person
      filters:
        person:
          threshold: 0.5
          min_score: 0.8
        car:
          threshold: 0.6
          min_score: 0.6
          min_area: 800
    motion:
      mask:
        - 704,0,704,88,0,68,0,0
        - 0,576,704,576,704,209,0,174
      threshold: 30  

      # Optional: Minimum size in pixels in the resized motion image that counts as motion (default: 30)
      # Increasing this value will prevent smaller areas of motion from being detected. Decreasing will
      # make motion detection more sensitive to smaller moving objects.
      # As a rule of thumb:
      #  - 15 - high sensitivity
      #  - 30 - medium sensitivity
      #  - 50 - low sensitivity
      contour_area: 28

      # Optional: Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames (default: shown below)
      # Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion.
      # Too low and a fast moving person wont be detected as motion.
      # Default is 0.2
      delta_alpha: 0.4

      # Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background (default: shown below)
      # Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster.
      # Low values will cause things like moving shadows to be detected as motion for longer.
      # https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/
      # Default is 0.2
      frame_alpha: 0.22

      # Optional: Height of the resized motion frame  (default: 50)
      # This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense
      # of higher CPU usage. Lower values result in less CPU, but small changes may not register as motion.
      # Default is 50
      frame_height: 55

    zones: 
      # left:
      #   coordinates: 0,92,0,136,132,139,120,94
      # # left:
      # #   coordinates: 50,93,50,134,241,142,236,112
      # middle:
      #   coordinates: 258,152,449,165,454,125,254,100
      # right:
      #   coordinates: 704,145,704,206,459,169,456,119zones:
      left:
        coordinates: 0,92,0,136,250,146,252,107
      middle:
        coordinates: 258,152,449,165,454,125,254,100
      right:
        coordinates: 672,143,671,205,459,169,456,119
    record:
      enabled: True
      retain:
        days: 2
        mode: all
      events:
        required_zones:
          - right
          - middle
          - left
        retain:
          default: 5
          mode: motion
        pre_capture: 3
        post_capture: 15
    snapshots:
      enabled: true
      timestamp: false
      bounding_box: false
      crop: true
      height: 500
      retain:
        default: 5
    mqtt:
      timestamp: False
      bounding_box: False
      crop: True
      height: 500
      quality: 100

  lodge_garage_camera: # <------ Name the camera
    ffmpeg:
      inputs:
        - path: rtsp://admin:pw@10.0.1.201:554/h264Preview_01_main
          roles:
            - detect
        - path: rtsp://admin:pw@10.0.1.201:554/h264Preview_01_sub
          roles:
            - record

#### Testing with file ####
      # inputs:
      #   - path: /media/frigate/lodge_garage_camera.mp4
      #     input_args: -re -stream_loop -1 -fflags +genpts
      #     roles:
      #       - detect
      #       - rtmp

    rtmp:
      enabled: false # <-- RTMP should be disabled if your stream is not H264
    detect:
      width: 704 # <---- update for your camera's resolution
      height: 576 # <---- update for your camera's resolution
      fps: 20
      # stationary:
      #   interval: 0
      #   threshold: 50
    objects:
      track:
        - car
        - person
      filters:
        person:
          threshold: 0.5
          min_score: 0.8
        car:
          threshold: 0.6
          min_score: 0.6
          min_area: 800
    motion:
      mask:
        - 704,0,704,88,0,68,0,0
        - 0,576,704,576,704,209,0,174
      threshold: 30  

      # Optional: Minimum size in pixels in the resized motion image that counts as motion (default: 30)
      # Increasing this value will prevent smaller areas of motion from being detected. Decreasing will
      # make motion detection more sensitive to smaller moving objects.
      # As a rule of thumb:
      #  - 15 - high sensitivity
      #  - 30 - medium sensitivity
      #  - 50 - low sensitivity
      contour_area: 28

      # Optional: Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames (default: shown below)
      # Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion.
      # Too low and a fast moving person wont be detected as motion.
      # Default is 0.2
      delta_alpha: 0.4

      # Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background (default: shown below)
      # Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster.
      # Low values will cause things like moving shadows to be detected as motion for longer.
      # https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/
      # Default is 0.2
      frame_alpha: 0.22

      # Optional: Height of the resized motion frame  (default: 50)
      # This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense
      # of higher CPU usage. Lower values result in less CPU, but small changes may not register as motion.
      # Default is 50
      frame_height: 55

    zones: 
      left:
        coordinates: 0,92,0,136,250,146,252,107
      middle:
        coordinates: 258,152,449,165,454,125,254,100
      right:
        coordinates: 672,143,671,205,459,169,456,119
    record:
      enabled: True
      retain:
        days: 2
        mode: all
      events:
        required_zones:
          - right
          - middle
          - left
        retain:
          default: 5
          mode: motion
        pre_capture: 3
        post_capture: 15
    snapshots:
      enabled: true
      timestamp: false
      bounding_box: false
      crop: true
      height: 500
      retain:
        default: 5
    mqtt:
      timestamp: False
      bounding_box: False
      crop: True
      height: 500
      quality: 100

Relevant log output

Error fetching information from http://10.0.1.100:5000/api/stats: Cannot connect to host 10.0.1.100:5000 ssl:default [Connect call failed ('10.0.1.100', 5000)]
8:01:05 AM – (ERROR) Frigate (custom integration) - message first occurred at October 19, 2022 at 7:22:25 PM and shows up 573 times
Failed to to call /store/addons/ccab4aaf_frigate-fa/update - Unknown error, see supervisor
October 19, 2022 at 7:32:13 PM – (ERROR) Home Assistant Supervisor - message first occurred at October 19, 2022 at 7:27:13 PM and shows up 2 times
Config entry 'Frigate' for frigate integration not ready yet; Retrying in background
October 19, 2022 at 7:22:25 PM – (WARNING) config_entries.py
Failed to connect to MQTT server due to exception: [Errno 111] Connection refused
October 19, 2022 at 7:22:24 PM – (ERROR) MQTT

FFprobe output from your camera

n/a

Frigate stats

No response

Operating system

HassOS

Install method

HassOS Addon

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

n/a

Any other information that may be helpful

No response

blakeblackshear commented 1 year ago

The release notes mention uninstalling and reinstalling the addon if you see this error.

ripvega commented 1 year ago

Thank you for your help.

Yes, I tried that, and now have it installed but it stops running as soon as I attempt to access the web UI.

The log now looks like this:

[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-10-20 13:03:41] frigate.app INFO : Starting Frigate (0.11.1-2eada21) [2022-10-20 13:03:41] frigate.app INFO : Creating directory: /tmp/cache Starting migrations [2022-10-20 13:03:41] peewee_migrate INFO : Starting migrations There is nothing to migrate [2022-10-20 13:03:41] peewee_migrate INFO : There is nothing to migrate [2022-10-20 13:03:41] frigate.mqtt ERROR : Unable to connect to MQTT server: [Errno 111] Connection refused [Errno 111] Connection refused [cmd] python3 exited 1 [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal.

blakeblackshear commented 1 year ago

Looks like it is unable to connect to mqtt.

ripvega commented 1 year ago

I'm seeing repeated instances of this in the MQTT log since uninstalling and reinstalling Frigate.

Does this relate to Frigate?

2022-10-20 12:18:53: Client closed its connection. 2022-10-20 12:20:53: New connection from 172.30.32.2:41640 on port 1883. 2022-10-20 12:20:53: Client closed its connection. 2022-10-20 12:22:53: New connection from 172.30.32.2:52388 on port 1883. 2022-10-20 12:22:53: Client closed its connection. 2022-10-20 12:24:53: New connection from 172.30.32.2:47250 on port 1883. 2022-10-20 12:24:53: Client closed its connection. 2022-10-20 12:26:53: New connection from 172.30.32.2:36886 on port 1883. 2022-10-20 12:26:53: Client closed its connection. 2022-10-20 12:28:53: New connection from 172.30.32.2:50220 on port 1883. 2022-10-20 12:28:53: Client closed its connection.

ripvega commented 1 year ago

The log is now showing: [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-10-20 13:18:51] frigate.app INFO : Starting Frigate (0.11.1-2eada21) [2022-10-20 13:18:51] frigate.app INFO : Creating directory: /tmp/cache Starting migrations [2022-10-20 13:18:51] peewee_migrate INFO : Starting migrations There is nothing to migrate [2022-10-20 13:18:51] peewee_migrate INFO : There is nothing to migrate [Errno 111] Connection refused [cmd] python3 exited 1 [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal.

It's not indicating that it ca't connect to MQTT but what does [Errno 111] Connection refused relate to?

NickM-27 commented 1 year ago

Restart the MQTT addon, it's connecting but not able to write anything

ripvega commented 1 year ago

Thank you.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.