mjehrhart / viewu

The Viewu App is a compact, user-friendly iOS application designed to integrate seamlessly with Frigate NVR systems.
https://www.viewu.app
GNU General Public License v3.0
23 stars 1 forks source link

Cameras Tab does not show anything #24

Closed clehmann closed 1 month ago

clehmann commented 1 month ago

Running the viewu server as a docker image vai compose on the same host as frigate.

Docker daemon is forwarding port 5099 to frigate

The timeline works, but nothing shows up when I go to the 'cameras' tab

Compose definition as follows:

frigate:
    container_name: frigate
    privileged: true
    restart: unless-stopped
    image: ghcr.io/blakeblackshear/frigate:stable
    shm_size: "128mb" 
    devices:
      - /dev/bus/usb:/dev/bus/usb
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              capabilities: [gpu]
              count: 1 # number of GPUs

    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${VOLUMES_PATH}/frigate/:/config/
      - /mnt/nvr/frigate:/media/frigate
      - type: tmpfs
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    ports:
      - "5099:5000"
      - "8554:8554" # RTSP feeds
      - "8555:8555/tcp" # WebRTC over tcp
      - "8555:8555/udp" # WebRTC over udp
    environment:
      - FRIGATE_RTSP_PASSWORD=XXXXXX
      - TZ=America/Chicago

  viewu:
    container_name: viewu
    restart: unless-stopped 
    image: mjeoffline/viewu:amd64
    environment:
      MQTT_PORT: 1883
      MQTT_IP: mqtt
      APN_TITLE: Motion detected at Home
      DOMAIN: http://citra.local.lan:5099
      APN_LEVEL: 1
      # For anonymous connections, leave MQTT_USER and MQTT_PASSWORD blank
      MQTT_USER: 
      MQTT_PASSWORD: 
      NOTIFICATION_TEMPLATE:

Frigate config as follows:

mqtt:
  host: mqtt

detectors:
  coral1:
    type: edgetpu
    device: usb:0

ffmpeg:
  hwaccel_args: preset-nvidia-h264

cameras:
  front_doorbell:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/front_doorbell?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/front_doorbell_720?video=copy
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 640
      height: 480
      fps: 10
    zones:
      front_yard:
        coordinates: 404,283,522,286,640,278,640,480,0,480,0,206,128,257
    motion:
      mask:
        - 640,0,640,92,0,90,0,0
  front_porch:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/front_porch?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/front_porch?video=copy
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 704
      height: 480
      fps: 15
    objects:
      filters: 
        person:
          threshold: .70
      mask:
        - 701,371,613,373,580,293,494,314,408,344,353,480,704,480  #Canna in front of house
  back_deck:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/back_deck?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/back_deck_720?video=copy
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 704
      height: 480
      fps: 15
    objects:
      mask:
        - 413,0,704,114,704,0,411,0,164,84,154,0 #Empty lot behind fence
        - 439,314,359,408,351,480,486,480,476,432,498,388,514,335,535,292,545,241,493,233,462,256 #Smoker and grill - Thinks it is a person for some reason
    motion:
      mask:
        - 704,0,704,56,509,50,517,0

record:
  enabled: true
  retain:
    days: 7
    mode: all

  events:
    retain:
      default: 14

birdseye:
  enabled: True
  mode: motion

objects:
  track:
    - person
    - cat
    - dog
  filters: 
    cat:
      threshold: .59
    person:
      threshold: .78

snapshots:
  enabled: True
  retain:
    default: 30

go2rtc:
  streams:
    front_doorbell:
      - http://@frontdoorbell.local.lan/flv?port=1935&app=bcs&stream=channel0_main.bcs&user={USERNAME}&password=XXXXXX
    front_doorbell_720:
      - http://frontdoorbell.local.lan/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user={USERNAME}&password=XXXXXX
    back_deck:
      - rtsp://{USERNAME}:XXXXX@backdeckcamera.local.lan:554/cam/realmonitor?channel=1&subtype=0
    back_deck_720:
      - rtsp://{USERNAME}:XXXXX@backdeckcamera.local.lan:554/cam/realmonitor?channel=1&subtype=1
    front_porch:
      - rtsp://{USERNAME}:XXXXX@frontporchcamera.local.lan:554/cam/realmonitor?channel=1&subtype=0
    front_porch_720:
      - rtsp://{USERNAME}:XXXXX@frontporchcamera.local.lan:554/cam/realmonitor?channel=1&subtype=1

  webrtc:
    candidates:
      - stun:8555
clehmann commented 1 month ago

imageimage

mjehrhart commented 1 month ago

Thanks. I am looking at the file now.

mjehrhart commented 1 month ago

I created a new build to debug the camera issue. I'm releasing it just to you. When I ran your config, it works as expected on my system and in Viewu. So, I'm hoping the new logging feature will give better insight as to what is happening. Toggle on DeveloperMode and return back to the TimeLine. From there, click on the Log menu button. Ideally, this should show an error log for ContentView. Please copy and paste the errors to here or take a screenshot.

mjehrhart commented 1 month ago

I'm fairly certain I found the issue. Frigate config has a different value type in 0.14 than it does in 0.13 for min_initialized which in 0.14 is an Optional(Int). But in 0.13, this is returned as a Double/Float. To make this work with both version, I am removing this from the viewu app - as it's a read only field in viewu. I expect there could be more values like this to look out for in the future.

mjehrhart commented 1 month ago

Build 29 resolves this issue by remove min_initialized from the app to accommodate people using both frigate 0.13 and 0.14.

kzaoaai commented 1 week ago

I had the same problem, it was due to me having audio filters my config. If I comment the filters block the error disappears and cameras show normally. Having audio, whether on or off, throws the error and no cameras show...

audio:
  enabled: True
  max_not_heard: 30
  #  - 200 - high sensitivity - 500 - medium sensitivity - 1000 - low sensitivity
  min_volume: 500
  listen:
    - bark
    - fire_alarm
    - scream
    - speech
    - yell
  # Optional: Filters to configure detection.
  filters:
    # Label that matches label in listen config.
    speech:
      # Minimum score that triggers an audio event (default: shown below)
      threshold: 0.8