JurajNyiri / HomeAssistant-Tapo-Control

Control for Tapo cameras as a Home Assistant component
Apache License 2.0
1.08k stars 85 forks source link

Very strange behaviour with only (ONE) camera #349

Closed smogger closed 1 year ago

smogger commented 1 year ago

Description

Got 4 C200 models and one of them started to act incredibly strange.

All camera setups went through the same process, got everywhere the same options/scripts etc. This issue popped up ~1 month ago, till then worked for more than a whole YEAR.

Any idea where else should I check, since the other 3 cameras are working properly? Within the Tapo App, all these functions work!

Thanks for the tips in advance

Reproduction Steps

Some functions simply not working, no steps are needed.

Expected behavior

Able to setup Motion sensor sensitivity, and detect the motion.

If applicable, add error logs.

No response

Device Firmware

1.3.6 Build 230424 Rel.77225n(4555)

Using stream component

Yes

Does camera work via official integrations?

Yes

Camera has all attributes filled out in developer tools

Yes

HASS Environment

Unraid - Virtual OS

Search for similar issues

Yes

Additional information

No response

JurajNyiri commented 1 year ago

Please post logs.

smogger commented 1 year ago

Thank you in advance. PS: scripts, automation, and even stream is working, only a few features were mentioned earlier.

JurajNyiri commented 1 year ago

Please post any error logs originating from this integration into this post formatted with ```

JurajNyiri commented 1 year ago

Reviewed logs, connection to your camera is timing out. Make sure you are not overloading it and it has a good connection with HA.

smogger commented 1 year ago

That is very strange again, since the one which having the problem is the one in the same room with the router, yet only that one has this issue. Streaming is also set to SD, don't need the HQ for such project for me. No issue reaching all functions through the Tapo app. (like detection, setting etc)

Is there anything else I should look for?

Thank you

JurajNyiri commented 1 year ago

You can use ping CLI command to see if there are connection issues to the camera from HA.

smogger commented 1 year ago

There is something fundamentally wrong with C200 cameras.

I set up 4 different VLC windows just to check the stream quality and if there is any connection drop. (None...) From my router, all Camera connection is at the maximum bar, so signal level should not be an issue. Created a Mesh network just for the cameras, and check if it can solve it. (Nope) Heck, I even allocated more Cores in my Unraid server "just to check if that is the issue". Looks like 8 cores are still not enough.

I know it sounds dumb, but is it possible to downgrade back to several versions back of Tapo Control, just to check, cause I had zero issues with it ~3-6 months ago.

99% of features work except for motion detection.

JurajNyiri commented 1 year ago

Yes, you can select any version in HACS or download in releases. It might/will not be compatible with the latest HA though.

Try disabling webhooks for all cameras via integration configuration (requires latest version) and restart, see if it improves.

Edit: I see you have firmware 1.3.6 Build 230424 Rel.77225n(4555). It is a buggy firmware with broken pullpoint, with only webhooks working. DIsabling webhooks with this firmware will render the motion sensor inactive. If you are experinecing issues I recommend downgrading the firmware and disabling webhooks for the most stable solution.

smogger commented 1 year ago

"With" webhooks seems a bit more stable (in terms of reaction time and it does actually turn off the lights in privacy mode) "Without" webhooks just half of the features seems to work

But with either setup motion sensors are all "hit or miss".

PS: I disabled internet access for all of my cameras for safety reasons. But just in case I also tried switching it back just to check.

As you suggested, I will try to find a way to downgrade all cameras and see.

Thank you

smogger commented 1 year ago

Firmware downgraded back to 1.0.10, everything works fast and fluidly.

smogger commented 1 year ago

Bah, this is so annoying. I give up.

Camera firmware I tried:

After a clean setup and re-adding the cameras everything works, UNTIL I initiate a Privacy mode for all cameras. 20-30 minutes later ALL of the cameras just hang and unable to turn them back. Seems like a software hang because, after a power circle, all go back (until I turn on privacy mode). What the heck is happening

When I manually try to turn off privacy mode I get this error now. Failed to call service switch/turn_off. HTTPSConnectionPool(host='192.168.1.231', port=443): Max retries exceeded with url: /stok=1b567f86c9e3db800f474f42a599d4c3/ds (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff82c8cd7b0>: Failed to establish a new connection: [Errno 111] Connection refused'))

smogger commented 1 year ago

Looks like fixed the issue. For anyone in the future reference: Skip these C200 Camera firmwares, simply unreliable, and have several issues with them.

Found 1.1.16 Build 211209 in the wild. This one works well, no hanging, no freeze, and fast reaction time. Tapo: Cameras Control V 5.2.3 TURN OFF Webhooks.

Motion detection will work. Sometimes after turning on-off the privacy mode, the "detection stage" stuck, but as soon as it detects a movement it will "reset" itself and still can trigger as intended.

Hope I could help.

ngohaiitdog commented 12 months ago

@smogger Hi I have the same issues with my C200. Can you share the 1.1.16 Build 211209 firmware please? I have searched all over Google, but no luck at all.

smogger commented 12 months ago

Enjoy, It will be available for 7 days:

https://we.tl/t-ECBR2c2he3

It contains 1.0.10 / 1.0.17 / 1.1.16

ngohaiitdog commented 12 months ago

@smogger cheers pal!