dermotduffy / frigate-hass-card

A Lovelace card for Frigate in Home Assistant
MIT License
470 stars 52 forks source link

Home Assistant Nabu casa + frigate issue = two way audio issue #1408

Closed nosar77 closed 2 months ago

nosar77 commented 2 months ago
Currently I have HAOS, frigate, HAproxy for HTTPS/TLS and internally, to use two way audio with the frigate card, I have to access home assistant over HTTPS. Setting that up, It allows me to two audio on reolink video doorbell. The issue is, I started the trial for nabu casa, and when i use that external address even though its https, the two way audio is disabled which i think has something to do with the HTTPS but im not sure exatly what or how would I go about fixing this. I has assumed because nabu casa is using https for the URL that the frigate would detect that and create the connected needed for two way audio. Has anyone else ran into this issue? Not sure if i should contact nabu casa or the frigate integration team? **Checklist:** - [X] I updated to the latest version available - [X] I cleared the cache of my browser **Release with the issue:** 5.2.0* **Browser and Operating System:** Brave on desktop HA app on android 14

Description of problem:

See above

Frigate card diagnostic information

Card diagnostics. Please review for confidential information prior to sharing
{
  "ha_version": "2024.3.0",
  "card_version": "5.2.0",
  "browser": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
  "date": "2024-03-13T06:26:29.599Z",
  "frigate_version": {
    "f49dd756fdb385f63641c50c0792cf49": "5.0.1/0.13.2-6476f8a"
  },
  "lang": "en",
  "timezone": "America/Los_Angeles",
  "git": {
    "build_version": "5.2.0-HEAD+g69249b6",
    "build_date": "Fri, 23 Jun 2023 15:26:26 GMT",
    "commit_date": "Thu, 22 Jun 2023 09:21:26 -0600"
  },
  "config": {
    "type": "custom:frigate-card",
    "cameras": [
      {
        "camera_entity": "camera.front_door_bell",
        "live_provider": "go2rtc",
        "go2rtc": {
          "modes": [
            "webrtc"
          ]
        }
      }
    ],
    "menu": {
      "buttons": {
        "microphone": {
          "enabled": true,
          "alignment": "opposing",
          "type": "momentary"
        },
        "timeline": {
          "enabled": false
        },
        "cameras": {
          "enabled": false
        },
        "frigate": {
          "enabled": true
        },
        "download": {
          "enabled": false
        },
        "media_player": {
          "enabled": false
        },
        "mute": {
          "enabled": true,
          "alignment": "opposing"
        },
        "camera_ui": {
          "enabled": false
        }
      },
      "style": "overlay",
      "position": "left",
      "button_size": 80
    },
    "live": {
      "controls": {
        "thumbnails": {
          "mode": "none"
        }
      },
      "auto_mute": "all",
      "preload": false
    },
    "dimensions": {},
    "media_gallery": {
      "controls": {
        "thumbnails": {
          "size": 140,
          "show_favorite_control": false,
          "show_timeline_control": false,
          "show_download_control": false
        },
        "filter": {
          "mode": "none"
        }
      }
    }
  }
}

Frigate Config File:

mqtt:
  host:        # YOUR MQTT IP
  port: 1883
  topic_prefix: frigate
  user:                # YOUR MQTT USERNAME
  password:        # YOUT MQTT PASSWORD

detectors:
  cpu1:
    type: cpu
    num_threads: 3

go2rtc:
  streams:
    front_door_bell:
      - "ffmpeg:rtsp://XXX:xxx23@192.xxx.xxx.xxx:554/h264Preview_01_main#audio=pcm"
      - rtsp://xxxx:xxxx@192.xxx.x.xxx:554/h264Preview_01_main

    front_door_bell_sub:
      - "ffmpeg:rtsp://xxx:xxxx@192.xxx.x.xxx:554h264Preview_01_sub#audio=pcm"
      - rtsp://xxxxx:xxxxx@192.xxx.xx.xxx:554/h264Preview_01_sub

  webrtc:
    candidates:
      - 192.xxx.x.xxx:8555
      - stun:8555

## THIS PREVENTS THE AUDIO COMING OUT FROM THE DOORBELL SOUNDING MUFFLED
  ffmpeg:
    bin: ffmpeg
    volume: "-af \"volume=30dB\""
    hwaccel_args: preset-vaapi

# Camera configuration
cameras:
  front_door_bell:
    ffmpeg:
      inputs:
        # Main stream for recording
        - path: rtsp://xxxx:xxxx@192.xxx.x.xxx:554/h264Preview_01_main
          roles:
            - record
        # Sub-stream for detection
        - path: rtsp://xxxx:xxx@192.xxx.xxx.xxx:554/h264Preview_01_sub
          roles:
            - detect
      output_args:
        record: preset-record-generic-audio-copy

#Global camera Ccnfigsreset-rtsp-restream

    detect: 
      enabled: true
      width: 1920
      height: 1080
      fps: 5

objects:
  track:
    - person
    - cat
    - dog
  filters:
    person:
      min_area: 5000
      max_area: 100000

snapshots :
  enabled: true
  timestamp: true
  bounding_box: true
  retain:
    default: 14

record:
  enabled: true
  events:
    retain:
      default: 7

Additional information:

NickM-27 commented 2 months ago

https://www.reddit.com/r/homeassistant/s/etOIOLh9j3

nosar77 commented 2 months ago

Issue is solved by port forwarding following the instructions on the web2rtc module. h

ttps://github.com/AlexxIT/go2rtc?tab=readme-ov-file#module-webrtc