Skip to content

Card doesn't remove backchannel after turning off mic #2178

Description

@pilipovicn

[REQUIRED] Card diagnostic information:

card_version: 7.17.0
browser: >-
  Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
  Chrome/137.0.0.0 Safari/537.36
date: 2025-09-07T01:29:51.786Z
lang: en
timezone: Europe/Belgrade
git:
  hash: 6b656b1
  build_date: Mon, 01 Sep 2025 23:15:28 GMT
  commit_date: Mon, 1 Sep 2025 16:14:30 -0700
ha_version: 2025.8.3
custom_integrations:
  frigate:
    detected: true
    version: 5.9.4
    devices:
      01JT40F0BCTR10ZAE1X5WPWQPR: 5.9.4/0.16.1-e664cb2
  hass_web_proxy:
    detected: false
config:
  type: custom:advanced-camera-card
  cameras:
    - camera_entity: camera.front_door
      live_provider: go2rtc
      go2rtc:
        modes:
          - webrtc
      dependencies:
        all_cameras: false
      capabilities:
        disable:
          - ptz
      webrtc_card: {}
  live:
    microphone:
      always_connected: false
      disconnect_seconds: 15
      mute_after_microphone_mute_seconds: 15
    preload: false
    auto_unmute:
      - visible
      - selected
    auto_play:
      - visible
      - selected
    lazy_load: false
    zoomable: false
    draggable: false
    controls:
      builtin: false
    lazy_unload:
      - unselected
      - hidden
  menu:
    buttons:
      microphone:
        enabled: true
        type: toggle
      snapshots:
        enabled: false
    style: overlay
    position: bottom
    alignment: left
    button_size: 30
  view:
    default: live
    theme:
      themes: []
  status_bar:
    items:
      technology:
        enabled: false
      engine:
        enabled: false
      title:
        enabled: false

[REQUIRED] Description of problem:

I am using HA with Frigate/go2rtc and Advanced card. The camera is a Reolink Doorbell D340W. It is regarding the 2-way comms. The card doesn't seem to correctly terminate the backchannel stream, after time elapses from config microphone: disconnect_seconds: 15. This poses a problem, since this particular camera stays in "2way mode" with it's indicator light shining, and while that's so, the ringing is disabled (camera thinks there's a conversation).

I am sorry I don't have more detailed info, but I have this. Watching the rtsp connection to port 554 of the camera i see just one connection reset. It goes like this: I open the card, it loads up, I see a specific source port (call it port 1) from HA targeting camera:554. I click the microphone, the stream resets, and a new connection is made, from a different source port (say port 2), this time backchannel is present. Mic works. 15 seconds elapse, the card seemingly refreshes the stream to normal (loading icon), but the connection is not actually remade, evidenced by the source port not changing this time. It's still port 2. And this makes the camera think the 2way is still active, the light stays on, and bell won't ring.

Depending how is resetting the stream back to no-backchannel implemented, it seems to not be initiating a new rtsp stream, and that's a problem here. The first reset, simplex -> backchannel, resets the connection, but the second one doesn't.

The light turns off and the camera goes to normal after either:
manually killing the connection in the firewall - immediate effect.
or killing the HA tab, or switching menus in HA - effect apparent after about 10s. This solution isn't ideal, since I have HA as an app running on android in the background, and it seems to keep connections alive, thus camera stays always in 2way mode.

This might be crude info, but I'm ready to add anything I can help with. I can send you the full Wireshark dump if you need. For now here is the interesting part in photos:

This is the moment when I click the mic, and 2way turns on. Notice the rtsp TEARDOWN packet, for ending the stream and a volley of RSTs after. Next DESCRIBE requests backchannel and turns it on.
Image

The moment below is when 15 seconds elapsed, and the mic is allegedly disconnected. However no reset happens, and same connection is used. So the mic is not actually disconnected. Notice the interleaved backchannel packets stopping, and returning to simplex and acks from client. That's good, but also notice no rtsp teardown and no full tcp reset.

Image

A full tcp reset seems to be required for some cameras, mine at least. Since the card buffers and "reloads" anyways after elapsed 15s, might as well do the actual reset? Any help and input is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Priority: LowbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions