home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.71k stars 30.84k forks source link

Reolink Camera entities for "AI delay" are unavailable on my camera despite being available in native app #107226

Closed cpainchaud closed 10 months ago

cpainchaud commented 10 months ago

The problem

AI Delay entities remain unavailable while camera now supports it (from recent firmware update). Camera is RLC-510A. Firmware 3.1.0.976_22051203

I believe this was never tested by @starkillerOG because AI_delay on this specific model was enabled by vendor only this month.

Note that I can run raw 'reolink_aio' commands shall it be needed to get output/structure of JSON replies. I also know how to test the fix shall one be written. I used to maintain previous unofficial integration

What version of Home Assistant Core has the issue?

core-2024.1.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

reolink

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 10 months ago

Hey there @starkillerog, mind taking a look at this issue as it has been labeled with an integration (reolink) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `reolink` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign reolink` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


reolink documentation reolink source (message by IssueLinks)

starkillerOG commented 10 months ago

@cpainchaud could you post the diagnostics data for the RLC-510A: https://www.home-assistant.io/docs/configuration/troubleshooting/#download-diagnostics I need to see the capabilities list.

Do the AI delay entities show up but the status is unavailable or are they not present at all? Those AI delay entities are disabled by default, did you enable them?

starkillerOG commented 10 months ago

Did you restart the Reolink integration (or HomeAssistant) after updating the firmware of the RLC-510A?

cpainchaud commented 10 months ago

Cameras were added after the firmware update (I took this opportunity to delete the old integration and start fresh with yours)

On Fri, Jan 5, 2024, 18:08 starkillerOG @.***> wrote:

Did you restart the Reolink integration (or HomeAssistant) after updating the firmware of the RLC-510A?

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/107226#issuecomment-1878995435, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTC5PWISVGKCRMZOFKBCVDYNAXQRAVCNFSM6AAAAABBODVLE6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZYHE4TKNBTGU . You are receiving this because you were mentioned.Message ID: @.***>

starkillerOG commented 10 months ago

@cpainchaud could you send the diagnostic data (on github, does not work in mail).

Do the AI delay entities show up but the status is unavailable or are they not present at all? Those AI delay entities are disabled by default, did you enable them?

starkillerOG commented 10 months ago

I need the diagnostic data to check what is going on....

cpainchaud commented 10 months ago

Hi @starkillerOG , your involvement is incredible but we all have private lives. I am going to gather diag logs asap

cpainchaud commented 10 months ago

@starkillerOG I believe this is the portion that interests you:

2024-01-08 14:51:39.017 DEBUG (MainThread) [reolink_aio.api] cam-seine/x:443::send() HTTP Request body =
[{'cmd': 'GetEnc', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetIsp', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetMdState', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetAiState', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetIrLights', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetAudioCfg', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetEmailV20', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetPushV20', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetFtpV20', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetRecV20', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetMdAlarm', 'action': 0, 'param': {'channel': 0}}, {'cmd': 'GetAiAlarm', 'action': 0, 'param': {'channel': 0, 'ai_type': 'people'}}, {'cmd': 'GetAiAlarm', 'action': 0, 'param': {'channel': 0, 'ai_type': 'vehicle'}}]

2024-01-08 14:51:39.272 DEBUG (MainThread) [reolink_aio.api] cam-seine/x:443::send() HTTP Response status = 200, content-type = (text/html).
2024-01-08 14:51:39.272 DEBUG (MainThread) [reolink_aio.api.data] cam-seine/x7:443::send() HTTP Response data:
[
(removed irrelevant data)
   {
      "cmd" : "GetAiState",
      "code" : 0,
      "value" : {
         "channel" : 0,
         "dog_cat" : {
            "alarm_state" : 0,
            "support" : 0
         },
         "face" : {
            "alarm_state" : 0,
            "support" : 0
         },
         "people" : {
            "alarm_state" : 0,
            "support" : 1
         },
         "vehicle" : {
            "alarm_state" : 0,
            "support" : 1
         }
      }
   },
   {
      "cmd" : "GetAiAlarm",
      "code" : 0,
      "value" : {
         "AiAlarm" : {
            "ai_type" : "people",
            "channel" : 0,
            "max_target_height" : 0.2322320044040680,
            "max_target_width" : 0.1231480017304420,
            "min_target_height" : 0.03623500093817711,
            "min_target_width" : 0.02188500016927719,
            "scope" : {
               "area" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111100000000000000000000000000000000000000000000000000000000000000000001111100011111100000000000000000000000000000000000000000000000000000000000011111111111111111111100000000000000000000000000000000000000000000000000000000001111111111111111111111000000000000000000000000000000000000000000000000000000000111111111111111111111111000000000000000000000000000000000000000000000000000000001111111111111111111111110000000000000000000000000000000000000000000000000000000111111111111111111111111100000000000000000000000000000000000000000000000000000001111111111111111111111111011100000000000000000000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000000000000000001111111111111111111111111111111111111111000000000000000000000000000000000000000011111111111111111111111111111111111111111100000000000000000000000000000000000001111111111111111111111111111111111111111111100000000000000000000000000000000000011111111111111111111111111111111111111111111000000000000000000000000000000000001111111111111111111111111111111111111111111110000000000000000000000000000000000011111111111111111111111111111111111111111111000000000000000000000000000000000001111111111111111111111111111111111111111111110000000000000000000000000000000001111111111111111111111111111111111111111111111100000000000000000000000000000000111111111111111111111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111111111111111111110000000000000000000000000000000001111111111111111111111111111111111111111111111100000000000000000000000000000000001111111111111111111111111111111111111111111111000000000000000000000000000000000011111111111111111111111111111111111111111111100000000000000000000000000000000000011111111111111111111111111111111111111111111000000000000000000000000000000000000101111111111111111111111111111111111111111110000000000000000000000000000000000000011111111111111111111111111111111111111111100000000000000000000000000000000000000111111111111111111111111111111111111111110000000000000000000000000000000000000000111111111111111111111111111111111111111100000000000000000000000000000000000000001111111111111111111111111111111111111111000000000000000000000000000000000000000011111111111111111111111111111111111111110000000000000000000000000000000000000000011111111111111111111111111111111111111100000000000000000000000000000000000000000111111111111111111111111111111111111110000000000000000000000000000000000000000000001111111111111111111111111111111111000000000000000000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000000000000000000001111111111111111111111111111111000000000000000000000000000000000000000000000000000111111111111111111111111111110000000000000000000000000000000000000000000000000000111111111111111111111111111100000000000000000000000000000000000000000000000000000011111111111111111111111110000000000000000000000000000000000000000000000000000000001111111111111111111111100000000000000000000000000000000000000000000000000000000000111111111111111111111000000000000000000000000000000000000000000000000000000000000011111111111111111110000000000000000000000000000000000000000000000000000000000000000111111111111111100000000000000000000000000000000000000000000000000000000000000000111111111111110000000000000000000000000000000000000000000000000000000000000000001111111111111000000000000000000000000000000000000000000000000000000000000000000000111111111100000000000000000000000000000000000000000000000000000000000000000000000011111111000000000000000000000000000000000000000000000000000000000000000000000000001111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
               "cols" : 80,
               "rows" : 60
            },
            "sensitivity" : 60,
            "stay_time" : 1
         }
      }
   },
   {
      "cmd" : "GetAiAlarm",
      "code" : 0,
      "value" : {
         "AiAlarm" : {
            "ai_type" : "vehicle",
            "channel" : 0,
            "max_target_height" : 0.09048599749803543,
            "max_target_width" : 0.03632900118827820,
            "min_target_height" : 0.0,
            "min_target_width" : 0.0,
            "scope" : {
               "area" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111100000000000000000000000000000000000000000000000000000000000000000001111100011111100000000000000000000000000000000000000000000000000000000000011111111111111111111100000000000000000000000000000000000000000000000000000000001111111111111111111111000000000000000000000000000000000000000000000000000000000111111111111111111111111000000000000000000000000000000000000000000000000000000001111111111111111111111110000000000000000000000000000000000000000000000000000000111111111111111111111111100000000000000000000000000000000000000000000000000000001111111111111111111111111011100000000000000000000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000000000000000001111111111111111111111111111111111111111000000000000000000000000000000000000000011111111111111111111111111111111111111111100000000000000000000000000000000000001111111111111111111111111111111111111111111100000000000000000000000000000000000011111111111111111111111111111111111111111111000000000000000000000000000000000001111111111111111111111111111111111111111111110000000000000000000000000000000000011111111111111111111111111111111111111111111000000000000000000000000000000000001111111111111111111111111111111111111111111110000000000000000000000000000000001111111111111111111111111111111111111111111111100000000000000000000000000000000111111111111111111111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111111111111111111110000000000000000000000000000000001111111111111111111111111111111111111111111111100000000000000000000000000000000001111111111111111111111111111111111111111111111000000000000000000000000000000000011111111111111111111111111111111111111111111100000000000000000000000000000000000011111111111111111111111111111111111111111111000000000000000000000000000000000000101111111111111111111111111111111111111111110000000000000000000000000000000000000011111111111111111111111111111111111111111100000000000000000000000000000000000000111111111111111111111111111111111111111110000000000000000000000000000000000000000111111111111111111111111111111111111111100000000000000000000000000000000000000001111111111111111111111111111111111111111000000000000000000000000000000000000000011111111111111111111111111111111111111110000000000000000000000000000000000000000011111111111111111111111111111111111111100000000000000000000000000000000000000000111111111111111111111111111111111111110000000000000000000000000000000000000000000001111111111111111111111111111111111000000000000000000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000000000000000000001111111111111111111111111111111000000000000000000000000000000000000000000000000000111111111111111111111111111110000000000000000000000000000000000000000000000000000111111111111111111111111111100000000000000000000000000000000000000000000000000000011111111111111111111111110000000000000000000000000000000000000000000000000000000001111111111111111111111100000000000000000000000000000000000000000000000000000000000111111111111111111111000000000000000000000000000000000000000000000000000000000000011111111111111111110000000000000000000000000000000000000000000000000000000000000000111111111111111100000000000000000000000000000000000000000000000000000000000000000111111111111110000000000000000000000000000000000000000000000000000000000000000001111111111111000000000000000000000000000000000000000000000000000000000000000000000111111111100000000000000000000000000000000000000000000000000000000000000000000000011111111000000000000000000000000000000000000000000000000000000000000000000000000001111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
               "cols" : 80,
               "rows" : 60
            },
            "sensitivity" : 60,
            "stay_time" : 0
         }
      }
   }

You can see stay_time is there. The entity remains 'unavailable' inside HA, they are there though

cpainchaud commented 10 months ago

image

cpainchaud commented 10 months ago

diag files attached config_entry-reolink-d0070873a58f437380fc49907153cfee.json.txt home-assistant_reolink_2024-01-08T14-11-12.539Z.log

starkillerOG commented 10 months ago

It seems like the entities are simply "disabled" instead of "unavailable" (the AI delays are disabled by default). See this part of the docs: https://www.home-assistant.io/integrations/reolink/#asterisk--next-to-entities-listed-in-this-documentation

Just click on the AI person delay entity -> then hit the gear icon -> then toggle the "enabled" switch to true. Then wait about 30 seconds and the entity schould become available.

cpainchaud commented 10 months ago

@starkillerOG thank you it fixed it. I am sorry for wasting your time : it's first time I see an integration which disable some entities I need to enable, it's usually the other way around.