JurajNyiri / HomeAssistant-Tapo-Control

Control for Tapo cameras as a Home Assistant component
Apache License 2.0
957 stars 80 forks source link

Old Firmwares: Unable to download/synchronise: Failure generating digest password, incorrect hashing method: None #466

Closed whitty closed 7 months ago

whitty commented 7 months ago

Description

I'm getting errors downloading including Failure generating digest password, incorrect hashing method: None

See full saga below, but I believe this is leaving my synchronisation in the state "Starting Download"

I believe it's tied to the fix for #462 - or at least the updates landed in 5.4.7/8

Hardware: C225

Reproduction Steps

  1. Add C225 to tapo_control
  2. (optionally) configure synchronisation and destination directory
  3. Browse Media to find latest clips
  4. Click one to download

Receive message "Already downloading a recording, please try again later."

If you configured Synchronisation at step 2 verify that synchronisation state is "Starting Download". Check log for Failure generating digest password, incorrect hashing method: None

If you did not configure Synchronisation at step 2 - you may get two messages on the first file you try to open Failure generating digest password, incorrect hashing method: None and Already downloading a recording, please try again later.

Expected behavior

Not quite sure - I've never done this successfully ;) - but I assume I'd eventually see the clip and optionally be able to see it on my NAS.

If applicable, add error logs.

2023-11-19 12:54:19.526 ERROR (MainThread) [custom_components.tapo_control] Failure generating digest password, incorrect hashing method: None
2023-11-19 12:54:19.972 ERROR (MainThread) [custom_components.tapo_control] Failure generating digest password, incorrect hashing method: None
2023-11-19 12:54:20.211 ERROR (MainThread) [custom_components.tapo_control] Failure generating digest password, incorrect hashing method: None
...
2023-11-19 12:54:33.092 ERROR (MainThread) [custom_components.tapo_control] Failure generating digest password, incorrect hashing method: None
2023-11-19 13:03:49.679 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry 192.168.17.12 for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 557, in async_unload
result = await component.async_unload_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/binary_sensor/__init__.py", line 175, in async_unload_entry
return await component.async_unload_entry(entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 202, in async_unload_entry
raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!

I've cut ... from the

Apologies if this is not the required log - with synchronisation enabled I think I can't get the "already downloading error".

Device Firmware

1.0.24 Build 230731 Rel.42636n

Integration Version

5.4.8

Using stream component

Yes

Does camera work via official integrations?

Yes

Camera has all attributes filled out in developer tools

Yes

HASS Environment

hassio on raspberry pi2

Search for similar issues

Yes

Additional information

Apologies - I'm new to Tapo, and new to HACs and new to the "Media" tab on home assistant (strangely though I've been using HA for a year or more - just on other things).

I'm going to splat my experience here because I think an expert would see this very different to a noob.

I installed tapo_control 5.4.8 yesterday and am just getting acquainted with the feature set.

Originally I was unable to download in the initial configuration of tapo_control - going to media, selecting a clip and hitting download.

The first time I got an error (I believe it was this one - I've restarted so many times I can't find the old logs). Thereafter clicking on any other clip gave me the error Already downloading a recording, please try again later. - but clicking the specific clip I had originally selected gave me Failure generating digest password, incorrect hashing method: None\nAlready downloading a recording, please try again later..

I was confused at the time by the README

However, downloading is rather slow, so it is a good idea to enable media synchronization in background.

So kept checking back to see if my "already downloading" recording would eventually "arrive". In the meantime I've been looking through issues to see what could be the problem.

Because I don't understand what is supposed to happen I have in the meantime set up a NAS for storage and enabled synchronisation. I wasn't sure if this had worked either since very little had changed, and I don't know the expected behaviour - however I could see that the download directories had been created on my nas so something was configured a little.

The closest issue I could find was #462 so I backed out to 5.4.6. I got almost the same behaviour Already downloading a recording, please try again later. when I click on any clip. Although I don't recall seeing the hashing error.

So I put 5.4.8 back in place. However I've now found the synchronisation entity and its history.

image

Looking back now I see some video files are present on my NAS, but after multiple restarts I've been stuck in Starting Download.

I'm about to go re-verify 5.4.6 because I suspect reverting to there did work and that the Already downloading message was about my clips not being synced yet and if I'd left them going I'd eventually have gotten there. And I was only confused because I was having the "Already downloading" message for a different reason on 5.4.8

whitty commented 7 months ago

ok - confirmed having reverted to 5.4.6 the synchronisation state has come back to life. I still get Already downloading a recording, please try again later - but I assume If I wait long enough the sync will complete and then I'll be able to actually play a clip.

Is there anyway I can get you more useful debug information on 5.4.8?

JurajNyiri commented 7 months ago

Thank you for your detailed log. I know where the issue is, I forgot about old firmwares in this fix. I will get this fixed soon, for now just use 5.4.6.

JurajNyiri commented 7 months ago

Fixed in https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/releases/tag/5.4.9.

whitty commented 7 months ago

Many thanks - I update to 5.4.12 and seems to be working.