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

Reolink Camera doesn't display recordings in either clips gallery or timeview #1899

Open
sherryxiao1988 opened this issue Feb 17, 2025 · 10 comments
Labels
bug Something isn't working

Comments

@sherryxiao1988
Copy link

Checklist:

[REQUIRED] Card diagnostic information:

card_version: 7.1.0
browser: >-
  Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML,
  like Gecko) Chrome/129.0.0.0 Safari/537.36
date: 2025-02-17T21:56:42.489Z
lang: en
timezone: America/Los_Angeles
git:
  hash: 7fb710d
  build_date: Fri, 14 Feb 2025 15:24:30 GMT
  commit_date: Fri, 14 Feb 2025 07:23:19 -0800
ha_version: 2025.1.4
custom_integrations:
  frigate:
    detected: false
  hass_web_proxy:
    detected: false
config:
  type: custom:advanced-camera-card
  cameras:
    - camera_entity: camera.backyard_right_fluent
      live_provider: auto
      capabilities:
        disable: []
    - camera_entity: camera.backyard_left_fluent
    - camera_entity: camera.main_gate_2_fluent
    - camera_entity: camera.main_outside_fluent
    - camera_entity: camera.left_gate_camera_fluent
  live:
    display:
      mode: grid

[REQUIRED] Description of problem:
Live view works fine.

Clips gallery says "no media to display":

Image

Switching to "recordings" get this:

Image

Switching to "snapshot" get a similar error:

Image

Timeview displays nothing:

Image

Here are some screenshots for things under media:

Image Image Image Image
@dermotduffy
Copy link
Owner

recordings and snapshots not showing anything is not surprising, there's no support for that. There is support for clips though (i.e. non-continuous recordings), so our goal is to get that first screenshot working, the one that currently says "No media to display".

Looking through your screenshots (hugely helpful, thank you), I don't know why it's not working though. As all the titles appear to match what the card is looking for.

Next step in debugging is to look at the websocket messages being exchanged between the card, and your browser. If you're not a developer, this will be quite intimidating/difficult. To do that we can either:

  • If you're familiar with web debugging tools, you'd open them (usually F12), navigate to Network, choose WS, click the websocket row, then the Messages tab, then refresh the page and look through the messages (requests and their results) with the type field set to media_source/browse_media and paste as many of them in here as you can.
  • OR: Give me temporary access to your HA instance, I can do it remotely, and you can revoke my access. This is a huge leap of faith on your part though.
  • OR: I can try to add a new debugging mode that dumps out content like this...

Sorry, no nice options :-(

@sherryxiao1988
Copy link
Author

Thanks for the detailed explanation @dermotduffy. I am a developer so things might be easier for us :)

I am having another issue with those cameras (battery draining with HA integration). I will get back to this one once I A/B tested having the pooling update turned off for the battery issue.

@dermotduffy
Copy link
Owner

Sounds good, thank you!

@sherryxiao1988
Copy link
Author

FYI, it seems this battery issue might also be relate to the advanced camera card, I am linking it here for reference:
home-assistant/core#136963 (comment)

@sherryxiao1988
Copy link
Author

recordings and snapshots not showing anything is not surprising, there's no support for that. There is support for clips though (i.e. non-continuous recordings), so our goal is to get that first screenshot working, the one that currently says "No media to display".

Looking through your screenshots (hugely helpful, thank you), I don't know why it's not working though. As all the titles appear to match what the card is looking for.

Next step in debugging is to look at the websocket messages being exchanged between the card, and your browser. If you're not a developer, this will be quite intimidating/difficult. To do that we can either:

  • If you're familiar with web debugging tools, you'd open them (usually F12), navigate to Network, choose WS, click the websocket row, then the Messages tab, then refresh the page and look through the messages (requests and their results) with the type field set to media_source/browse_media and paste as many of them in here as you can.
  • OR: Give me temporary access to your HA instance, I can do it remotely, and you can revoke my access. This is a huge leap of faith on your part though.
  • OR: I can try to add a new debugging mode that dumps out content like this...

Sorry, no nice options :-(

I only found two that's "media_source/browse_media":


{type: "media_source/browse_media", media_content_id: "media-source://reolink", id: 64}
id
: 
64
media_content_id
: 
"media-source://reolink"
type
: 
"media_source/browse_media"


{type: "media_source/browse_media", media_content_id: "media-source://reolink", id: 66}
id
: 
66
media_content_id
: 
"media-source://reolink"
type
: 
"media_source/browse_media"

I am only displaying one camera this time:

card_version: 7.1.0
browser: >-
  Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML,
  like Gecko) Chrome/129.0.0.0 Safari/537.36
date: 2025-02-18T05:46:11.525Z
lang: en
timezone: America/Los_Angeles
git:
  hash: 7fb710d
  build_date: Fri, 14 Feb 2025 15:24:30 GMT
  commit_date: Fri, 14 Feb 2025 07:23:19 -0800
ha_version: 2025.1.4
custom_integrations:
  frigate:
    detected: false
  hass_web_proxy:
    detected: false
config:
  type: custom:advanced-camera-card
  cameras:
    - camera_entity: camera.backyard_right_fluent
  live:
    lazy_unload:
      - unselected
    auto_pause:
      - unselected
type: custom:advanced-camera-card
cameras:
  - camera_entity: camera.backyard_right_fluent
live:
  lazy_unload:
    - unselected
  auto_pause:
    - unselected

I updated

live:
  lazy_unload:
    - unselected
  auto_pause:
    - unselected

to test the battery issue. I think it's not relevant to this issue.

Thanks.

@dermotduffy
Copy link
Owner

dermotduffy commented Feb 18, 2025

I only found two that's "media_source/browse_media":

Huh. OK. That's odd and might immediately be the issue, there should be many more. Hints that maybe it's not finding the camera you are referring to in the media browser (for some, likely incorrect, reason). You have included the requests, can you find the responses too. e.g. for this one:

type: "media_source/browse_media", media_content_id: "media-source://reolink", id: 64}

... there'll be another websocket communication (in the opposite direction) almost immediately after that timewise, that refers to id 64. I need to see both the requests and responses to understand why the card is doing what it's doing.

Here's an example of a response from my test setup, each request made (the ones you link to), will each have a response row that looks like this:

{"id":92,"type":"result","success":true,"result":{"title":"Reolink","media_class":"app","media_content_type":"","media_content_id":"media-source://reolink","children_media_class":"channel","can_play":false,"can_expand":true,"thumbnail":null,"not_shown":0,"children":[{"title":"Back Yard","media_class":"channel","media_content_type":"playlist","media_content_id":"media-source://reolink/CAM|01J8XHYXXH34WE3C654K05KX1F|0","children_media_class":null,"can_play":false,"can_expand":true,"thumbnail":"/api/camera_proxy/camera.back_yard_fluent"}]}}

@hendrikwolf79
Copy link

This is my response value. But looks like your example.
I hope this helps.

 {
    "id": 48,
    "type": "result",
    "success": true,
    "result": {
        "title": "Reolink",
        "media_class": "app",
        "media_content_type": "",
        "media_content_id": "media-source://reolink",
        "children_media_class": "channel",
        "can_play": false,
        "can_expand": true,
        "thumbnail": null,
        "not_shown": 0,
        "children": [
            {
                "title": "Garten",
                "media_class": "channel",
                "media_content_type": "playlist",
                "media_content_id": "media-source://reolink/CAM|01JGY1JJKZVA464AMQ304QR9E3|1",
                "children_media_class": null,
                "can_play": false,
                "can_expand": true,
                "thumbnail": "/api/camera_proxy/camera.garten_flussig"
            },
            {
                "title": "Garten 2",
                "media_class": "channel",
                "media_content_type": "playlist",
                "media_content_id": "media-source://reolink/CAM|01JGY1JJKZVA464AMQ304QR9E3|3",
                "children_media_class": null,
                "can_play": false,
                "can_expand": true,
                "thumbnail": "/api/camera_proxy/camera.garten_2_flussig"
            },
            {
                "title": "Carport",
                "media_class": "channel",
                "media_content_type": "playlist",
                "media_content_id": "media-source://reolink/CAM|01JGY1JJKZVA464AMQ304QR9E3|4",
                "children_media_class": null,
                "can_play": false,
                "can_expand": true,
                "thumbnail": "/api/camera_proxy/camera.carport_flussig"
            },
            {
                "title": "Doorbell",
                "media_class": "channel",
                "media_content_type": "playlist",
                "media_content_id": "media-source://reolink/CAM|01JGY1JJKZVA464AMQ304QR9E3|5",
                "children_media_class": null,
                "can_play": false,
                "can_expand": true,
                "thumbnail": "/api/camera_proxy/camera.doorbell_flussig"
            },
            {
                "title": "Eingang",
                "media_class": "channel",
                "media_content_type": "playlist",
                "media_content_id": "media-source://reolink/CAM|01JGY1JJKZVA464AMQ304QR9E3|2",
                "children_media_class": null,
                "can_play": false,
                "can_expand": true,
                "thumbnail": "/api/camera_proxy/camera.eingang_autotrack_flussig"
            },
            {
                "title": "Terrasse",
                "media_class": "channel",
                "media_content_type": "playlist",
                "media_content_id": "media-source://reolink/CAM|01JGY1JJKZVA464AMQ304QR9E3|0",
                "children_media_class": null,
                "can_play": false,
                "can_expand": true,
                "thumbnail": "/api/camera_proxy/camera.terrasse_flussig"
            }
        ]
    }

@sherryxiao1988
Copy link
Author

Here's the result:

{"id":56,"type":"result","success":true,"result":{"title":"Reolink","media_class":"app","media_content_type":"","media_content_id":"media-source://reolink","children_media_class":"channel","can_play":false,"can_expand":true,"thumbnail":null,"not_shown":0,"children":[{"title":"Backyard Left","media_class":"channel","media_content_type":"playlist","media_content_id":"media-source://reolink/CAM|01JKGK5B84C3VW1462XEHBASG8|3","children_media_class":null,"can_play":false,"can_expand":true,"thumbnail":"/api/camera_proxy/camera.backyard_right_fluent"}]}}

@sherryxiao1988
Copy link
Author

Hi @dermotduffy , any update on this one? Let me know if anything needed from my side. Thanks.

@dermotduffy
Copy link
Owner

@sherryxiao1988 Will be sure to update the issue if I have something new to say. Fastest way to make progress would be to diagnose and submit a PR yourself to fix it, more than happy to review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants