Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2way audio, might be silly #750

Open
Archy54 opened this issue Sep 22, 2024 · 1 comment
Open

2way audio, might be silly #750

Archy54 opened this issue Sep 22, 2024 · 1 comment
Labels
question Further information is requested

Comments

@Archy54
Copy link

Archy54 commented Sep 22, 2024

type: custom:webrtc-camera
streams:
  - url: onvif://admin:[email protected]:80?subtype=MediaProfile00000
    mode: webrtc
    media: video,audio,microphone
menu:
  buttons:
    microphone:
      enabled: true
      icon: mdi:microphone
      type: momentary

Alternative

type: custom:webrtc-camera
streams:
  - url: >-
      rtsp://admin:[email protected]/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
    mode: webrtc
    media: video,audio,microphone
live:
  microphone:
    disconnect_seconds: 2
menu:
  buttons:
    microphone:
      enabled: true
      icon: mdi:microphone
      type: momentary

I think also worked but not via nabucasa.
So this works as an always recording microphone on laptop only when enabled, but not home assistant phone app nabu casa but I can't see a button for a push to talk in either webrtc card, does it exist? Can I make one? one I can hold down like a doorbell. I've tried so many different bits of code but I can't figure it out. I got frigate hass card with hold down microphone but it only works on browser, not naba casu app.
EmpireTech-IPC-T5442T-ZE-Vari-Focal s3 (dahua 5442 s3)

#Frigate Server (LXC) go2rtc

api:
  origin: '*'
hass:
  config: /config
log:
  format: text
rtsp:
  default_query: mp4
streams:
  Car_Port_North:
  - rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
  - ffmpeg:Car_Port_North_2way_audio#audio=opus
  Shed:
  - rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
  - ffmpeg:Shed#audio=opus
webrtc:
  candidates:
  - stun:8555

#Frigate Server (LXC) Frigate Config

mqtt:
  enabled: true
  host: 192.168.x.x
  port: 1883
  topic_prefix: hidden
  client_id: hidden
  user: hidden
  password: hidden

cameras:
  Car_Port_North:
    enabled: true
    ffmpeg:
      hwaccel_args: preset-vaapi
      output_args:
        record: preset-record-generic-audio-aac
      inputs:
        - path: rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
          input_args: preset-rtsp-restream
          roles:
            - record
            - detect
    detect:
      enabled: true
      width: 1920
      height: 1080
      fps: 5
      min_initialized: 2
      max_disappeared: 25
    record:
      enabled: true
      retain:
        days: 2  # Adjust the number of days you want to keep recordings
      events:
        pre_capture: 5  # Seconds before event to capture
        post_capture: 10  # Seconds after event to capture
    zones:
      CarPortNorthZone:
        coordinates: 0,0,1,0,0.991,0.603,0.877,0.992,0.002,0.995
        loitering_time: 0
  Shed:
    enabled: true
    ffmpeg:
      hwaccel_args: preset-vaapi
      output_args:
        record: preset-record-generic-audio-aac
      inputs:
        - path: rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
          input_args: preset-rtsp-restream
          roles:
            - record
            - detect
    zones:
      ShedZone:  # Rename this zone to ShedZone to avoid conflict with the camera name
        coordinates: 0,0,2688,0,2688,1520,0,1520  # Define the zone coordinates
    detect:
      enabled: true
      width: 2688
      height: 1520
      fps: 5
      min_initialized: 2
      max_disappeared: 25
    record:
      enabled: true
      retain:
        days: 2  # Adjust the number of days you want to keep recordings

objects:
  track:
    - person
    - cat
    - dog
    - bicycle
    - motorcycle

detectors:
  coral:
    type: edgetpu
    device: usb

version: 0.14

logger:
  logs:
    frigate.record.maintainer: debug

Frigate hass card

type: custom:frigate-card
cameras:
  - camera_entity: camera.car_port_north
    live_provider: go2rtc
    go2rtc:
      modes:
        - webrtc
    webrtc_card: {}
    id: Car Port North 
  - camera_entity: camera.shed_2
    live_provider: go2rtc
    go2rtc:
      modes:
        - webrtc
menu:
  style: outside
  buttons:
    cameras: {}
    clips:
      icon: mdi:film
      alignment: matching
      enabled: true
    frigate:
      enabled: true
    recordings:
      enabled: true
    microphone:
      enabled: true
      disconnect_seconds: 2
      alignment: opposing
      type: momentary
    image:
      enabled: true
media_gallery:
  controls:
    thumbnails:
      show_details: true
live:
  microphone:
    disconnect_seconds: 2
view:
  scan:
    enabled: false
@AlexxIT AlexxIT added the question Further information is requested label Oct 6, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Oct 6, 2024

microphone will only work on HTTPS pages. This also applies to the Hass mobile app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants