JurajNyiri / HomeAssistant-Tapo-Control

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

FR / Or Bugreport,, logs are spammed with "ERROR" when i turn of my C310 #410

Closed boheme61 closed 1 year ago

boheme61 commented 1 year ago

Is your feature request related to a problem? Please describe. ( Ex. I'm always frustrated when [...] ) :)

I have Cameras which i only want to turn On occasionally, i.e if ( Alarm "Holiday" Activated ) etc. . Lately i've noticed excessive logs writings, "Errors" every 80-seconds , because i've turned of my C310 (see attached pics)

Im don't think it's a code-bug, obviously, as it's a correct "error" ( or could be ! ) , And i've also had this "problem" with Local-Tuya, However in L-T i felt i was forced to Add in "Logger" to "Critical" only ( As i have 4 Plugs/Switches swarming my log-file )

Describe the solution you'd like

I think it should be possible to "distinct" these particular "events" i.e ( (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at ) and flag them as "Warnings"s It s about a 1000 "errors" a day (for this cam) which i turned of, by a remote-switch( through an alarm-automation )

Describe alternatives you've considered

Im aware it's a erno-113, but maybe it could ( automatically ) be flagged as "unavailable", somehow after a specified amount of time, so the "checking" for that device is skipped

BR

Additional context

Trying to add screenshots in new commend !

boheme61 commented 1 year ago

net1 net2

boheme61 commented 1 year ago

Thought i would add this:

I tried to turn it on, and shortly after Off again, turns out the first minute it shows the following.

2023-09-25 19:45:30.679 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.tpc1f_hd_stream] Error from stream worker: Error demuxing stream: [Errno 110] Operation timed out: 'rtsp://*******:********@192.168.50.118:554/stream1'
2023-09-25 19:45:45.769 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.tpc1f_hd_stream] Error from stream worker: Error opening stream (ERRORTYPE_110, Operation timed out) rtsp://****:****@192.168.50.118:554/stream1
2023-09-25 19:46:09.820 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.tpc1f_hd_stream] Error from stream worker: Error opening stream (ERRORTYPE_113, Host is unreachable) rtsp://****:****@192.168.50.118:554/stream1
2023-09-25 19:46:34.841 ERROR (MainThread) [custom_components.tapo_control] HTTPSConnectionPool(host='192.168.50.118', port=443): Max retries exceeded with url: /stok=97c073cded4397810a68017621439a38/ds (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fc95575d890>: Failed to establish a new connection: [Errno 113] Host is unreachable'))

Not that the first "errors" is relevant to this integration, just so you know how this Cam is "integrated"

JurajNyiri commented 1 year ago

https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues/382

boheme61 commented 1 year ago

Sorry bout that, guess i didn't do a proper search first :) , and yes i did expect something similar as what you answered the other "report", i did go through the config_flow, and also searched some in ha-core reported issues, so i was pretty sure there was no way "around" this ( i just didn't wanted this integration ended up in "critical only" logging ), below local tuya :) ... on the other hand, if i experience "real" issues with this integration and my cams i know howto revert 👍

I know it's complicated to implement a "feature" which can "sense" that i just turned of a device(by another device) to i.e save power/usage ... but would be great with a "turn-off-service/entity" so HA doesn't have to check a device who is already setup correct, but just not available, do to an i.e automation-setup