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

Bug: C310 Motion sensor stops working or becomes unavailable #84

Closed
dankocrnkovic opened this issue Apr 21, 2021 · 57 comments
Closed

Bug: C310 Motion sensor stops working or becomes unavailable #84

dankocrnkovic opened this issue Apr 21, 2021 · 57 comments
Labels
Bug Something isn't working Help wanted Extra attention is needed

Comments

@dankocrnkovic
Copy link

dankocrnkovic commented Apr 21, 2021

Describe the bug
Motion sensor stops reporting state change after some time. (daily).
Stream still works.
Sometimes motion sensor in HA reports unavailabe and somtimes it just stays in off state.
Motion is still detected on camera and recordings work on Android Tapo app.

Reseting motion detection on camera or rebooting camera does not help. Only HA restart recovers motion detection state change.

I have explicitly opened ports on firewall 2020,554,443,1024 but result is the same.

Log
No log entries.


**Camera (please complete the following information):**
C310

**Using stream component**
Yes

**Camera works through onvif component OR different cameras work in general**
Camera and motion detection works in Android Tapo app.

**Camera has all attributes filled out properly in developer tools**
yes

**HASS Environment**
Supervised HA OS (RP 4)

@JurajNyiri
Copy link
Owner

JurajNyiri commented Apr 22, 2021

Hello @dankocrnkovic

I have pushed a version with debug logs into main branch. Please download that manually (not available on HACS) and configure logger to log debug for this component.

logger:
  default: critical
  logs:
    custom_components.tapo_control: debug

On a first successful motion detection you should see a message "Found event which doesn't have entity yet, adding binary sensor!".

When it happens the next time, please restart the camera without restarting home assistant and post all the logs here (ideally from the time when it was still working).

@dankocrnkovic
Copy link
Author

Hell @JurajNyiri Is this change included in new release: 3.3.1w ?

danko

@JurajNyiri
Copy link
Owner

Hello yes it is.

@dankocrnkovic
Copy link
Author

@JurajNyiri
Yesterday just about after finishing posting this issue, there was a firmware update for C310 camera in Tapo App.
Its been 24 hours that I didnt restart HA (I had to later today to update and enable logging). In this 24 hour sensor was working. Usually I would have this problem twice a day.
So maybe firmware fixed something. I will monitor this and report.

But, I'm confused now as you stated with latest update that new firmware version is 1.1.7, but my version from yesterday is 1.0.14 Build 210118 Rel.58915n(4555)

@JurajNyiri
Copy link
Owner

JurajNyiri commented Apr 22, 2021

My version on C200 is 1.1.7 Build 210406. Yours seems to be from January. Maybe they have different versions for C310 or are rolling it out in phases which is a common practice. That build seems to be pretty old though.

For motion sensor onvif event manager from home assistant is used, which is keeping itself alive during camera restarts, connection loss etc, so most likely change will be needed on Home Assistant side.

Before that we need to determine the cause though that's why I added the debugging.

There might be a way how to work around it until it is fixed or it might be something I missed. Either way we will find out when it happens again.

As for replicating, I tried many things to try and replicate it - reconnect camera, reboot, disconnect it for a while... it always recovered properly so its really hard to debug without it happening.

@JurajNyiri JurajNyiri added Bug Something isn't working Help wanted Extra attention is needed labels Apr 22, 2021
@dankocrnkovic
Copy link
Author

dankocrnkovic commented Apr 23, 2021

home-assistant.zip
Here it is. It happend.
I noticed around 14:45.
Rebooted camera and nothing changed. I noticed in log that it reports everything is ok.
But, motion is not detected. In Tapo App motion is detected and all i ok.

Its a big log.

Last recorded video on motion in on 14:54:42
This is camera Reboot
2021-04-23 14:57:43 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream:
2021-04-23 14:58:12 ERROR (MainThread) [custom_components.tapo_control] HTTPSConnectionPool(host='192.168.3.4', port=443): Max retries exceeded with url: /stok=5e44aa5a80dab7c7f9e3e14841323312/ds (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f6a2f9400>: Failed to establish a new connection: [Errno 113] Host is unreachable'))

d.

@dankocrnkovic
Copy link
Author

I waited till now (5 hours) and nothing new happened. So I restarted HA.
After restart sensor was unavailable until first motion detected and now sensor is reporting ok.
I attached new log that shows this.
home-assistant.log

@JurajNyiri
Copy link
Owner

That confirms my belief that the Home Assistant event manager is not able to recover properly.

logger:
  default: critical
  logs:
    custom_components.tapo_control: debug
    homeassistant.components.onvif: debug

Lets add debug for it and observe how it behaves when it stops working.

This is an example of successful recovery on camera reboot:

2021-04-23 21:40:15 WARNING (MainThread) [homeassistant.components.onvif] Failed to fetch ONVIF PullPoint subscription messages for '28f39a982d2634f6aa21be4917158645_tapo_events': [Errno 61] Connect call failed ('192.168.100.70', 1025)
2021-04-23 21:40:19 DEBUG (MainThread) [custom_components.tapo_control] Finished fetching Tapo resource status data in 68.889 seconds
2021-04-23 21:40:20 DEBUG (MainThread) [homeassistant.components.onvif] Restarted ONVIF PullPoint subscription for '28f39a982d2634f6aa21be4917158645_tapo_events'
2021-04-23 21:40:29 DEBUG (MainThread) [custom_components.tapo_control] async_update_data - entry

Lets see what does it do when it stops receiving events. Once we have that information we can move forward and create a bug report on Home Assistant and/on workaround it via integration somehow.

@dankocrnkovic
Copy link
Author

Are you sure that log category is homeassistant.components.onvif?

This is from my configuration.yaml:
logger:
default: warning
logs:
custom_components.tapo_control: debug
homeassistant.components.onvif: debug

There is no log record after HA restart, camera reboot, tapo app motion detection, and now I noticed that sensor is not working again. No log.

@JurajNyiri
Copy link
Owner

Hello yes I tested it before sending. Try to add it, make motion so that sensor shows up and reboot camera, you should get log from onvif.

@Akkor70
Copy link

Akkor70 commented Apr 24, 2021

Hi
I have the samme Issue
I added the logs option to configuration.yaml , rebooted HA and cameras
It seems to me that the motion sensor is unavailable since the cam detect a movement.....then the sensor became available, but after some time is unavailable again (some idle time ?)
I have a log https://pastebin.com/mdTcBs1p

@JurajNyiri
Copy link
Owner

JurajNyiri commented Apr 24, 2021

Did you add log also for onvif? I can't see anything from it in the logs and there should be something there where it attempts to recover.

  1. Add logs for tapo and onvif as described above
  2. Restart hass
  3. Make a motion so that sensor shows up
  4. Reboot camera via service (once camera is up, and or when motion is detected again, there should be a log from onvif, you can verify that here)
  5. Make a motion so that sensor shows up
  6. Keep camera with privacy mode off, basically don't change anything on the camera since point 4
  7. When it stops detecting motion correctly, post all the logs

@Akkor70
Copy link

Akkor70 commented Apr 24, 2021

Did you add log also for onvif? I can't see anything from it in the logs and there should be something there where it attempts to recover.

  1. Add logs for tapo and onvif as described above
  2. Restart hass
  3. Make a motion so that sensor shows up
  4. Reboot camera via service (once camera is up, and or when motion is detected again, there should be a log from onvif, you can verify that here)
  5. Make a motion so that sensor shows up
  6. Keep camera with privacy mode off, basically don't change anything on the camera since point 4
  7. When it stops detecting motion correctly, post all the logs

I made all steps as descrbed, the only mismatch is that I rebboted the cam from Tapo App
I'll wait the movement sensor stop working to post the log again........

@JurajNyiri
Copy link
Owner

Please verify that the log for onvif is working. Without it waiting for logs from tapo brings no new information.

@Akkor70
Copy link

Akkor70 commented Apr 24, 2021

Please verify that the log for onvif is working. Without it waiting for logs from tapo brings no new information.

This is my config

logger:
  default: critical
  logs:
    homeassistant.components.automations: debug
    custom_components.tapo_control: debug
    homeassistant.components.onvif: debug

@JurajNyiri
Copy link
Owner

JurajNyiri commented Apr 24, 2021

  1. Add logs for tapo and onvif as described above
  2. Restart hass
  3. Make a motion so that sensor shows up
  4. Reboot camera via service (once camera is up, and or when motion is detected again, there should be a log from onvif, you can verify that here)
  5. Make a motion so that sensor shows up
  6. Keep camera with privacy mode off, basically don't change anything on the camera since point 4
  7. When it stops detecting motion correctly, post all the logs

@Akkor70
Copy link

Akkor70 commented Apr 24, 2021

  1. Add logs for tapo and onvif as described above
  2. Restart hass
  3. Make a motion so that sensor shows up
  4. Reboot camera via service (once camera is up, and or when motion is detected again, there should be a log from onvif, you can verify that here)
  5. Make a motion so that sensor shows up
  6. Keep camera with privacy mode off, basically don't change anything on the camera since point 4
  7. When it stops detecting motion correctly, post all the logs

Onvif log is working becouse when I restart the camera from service I got this

2021-04-24 22:06:02 ERROR (stream_worker) [libav.tcp] Connection to tcp://192.168.1.61:554?timeout=5000000 failed: Operation timed out
2021-04-24 22:06:04 ERROR (stream_worker) [libav.tcp] Connection to tcp://192.168.1.85:554?timeout=5000000 failed: Operation timed out
2021-04-24 22:06:13 WARNING (MainThread) [homeassistant.components.onvif] Failed to fetch ONVIF PullPoint subscription messages for 'f2b5148ba1da55a033b8c575a149f9a3_tapo_events':
2021-04-24 22:06:19 ERROR (MainThread) [custom_components.tapo_control] HTTPSConnectionPool(host='192.168.1.85', port=443): Max retries exceeded with url: /stok=4d1a9607399fb6d9094cb3198f9d1ede/ds (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f25e342af40>: Failed to establish a new connection: [Errno 111] Connection refused'))
2021-04-24 22:06:19 DEBUG (MainThread) [custom_components.tapo_control] Finished fetching Tapo resource status data in 31.489 seconds
2021-04-24 22:06:19 ERROR (stream_worker) [libav.tcp] Connection to tcp://192.168.1.85:554?timeout=5000000 failed: Connection refused
2021-04-24 22:06:20 WARNING (MainThread) [homeassistant.components.onvif] Failed to fetch ONVIF PullPoint subscription messages for '5a7801df5d943ccdbf8adc8dea0cc7c0_tapo_events':
2021-04-24 22:06:20 WARNING (MainThread) [homeassistant.components.onvif] Failed to restart ONVIF PullPoint subscription for '5a7801df5d943ccdbf8adc8dea0cc7c0_tapo_events'. Retrying
2021-04-24 22:06:21 WARNING (MainThread) [homeassistant.components.onvif] Failed to restart ONVIF PullPoint subscription for 'f2b5148ba1da55a033b8c575a149f9a3_tapo_events'. Retrying

Now I'll wait the sensor stop working to post log

@JurajNyiri
Copy link
Owner

I was able to replicate this, by disconnecting HOST from network.

Home Assistant onvif event manager is no longer able to reconnect.

2021-04-24 23:00:06 WARNING (MainThread) [homeassistant.components.onvif] Failed to restart ONVIF PullPoint subscription for 'c38ba820a0eddb08cda53d5bea952b9e_tapo_events'. Retrying

on repeat.

Figuring out next steps...

@JurajNyiri
Copy link
Owner

JurajNyiri commented Apr 24, 2021

So after investigating, I have found out that it doesn't seem to be the same case.

  1. Disconnected HASS host
  2. Reconnected HASS host after a minute
  3. Onvif was failing to recover as described above
  4. Rebooted camera
  5. Onvif recovered

P̶l̶e̶a̶s̶e̶ ̶d̶o̶w̶n̶l̶o̶a̶d̶ ̶a̶n̶d̶ ̶r̶e̶n̶a̶m̶e̶ ̶e̶v̶e̶n̶t̶.̶t̶x̶t̶ ̶i̶n̶t̶o̶ ̶e̶v̶e̶n̶t̶.̶p̶y̶ ̶a̶n̶d̶ ̶p̶l̶a̶c̶e̶ ̶i̶n̶t̶o̶ ̶y̶o̶u̶r̶ ̶p̶i̶p̶3̶ ̶l̶i̶b̶r̶a̶r̶i̶e̶s̶ ̶f̶o̶l̶d̶e̶r̶,̶ ̶i̶n̶t̶o̶ ̶ site-packages/homeassistant/components/onvif/event.py ̶.̶ ̶O̶n̶ ̶h̶a̶s̶s̶.̶i̶o̶ ̶i̶t̶s̶ ̶s̶t̶o̶r̶e̶d̶ ̶i̶n̶s̶i̶d̶e̶ ̶t̶h̶e̶ c̶o̶n̶t̶a̶i̶n̶e̶r̶ ̶i̶t̶s̶e̶l̶f̶.̶

I̶t̶ ̶i̶s̶ ̶t̶h̶e̶ ̶s̶a̶m̶e̶ ̶e̶v̶e̶n̶t̶.̶p̶y̶ ̶a̶s̶ ̶p̶r̶o̶v̶i̶d̶e̶d̶ ̶b̶y̶ ̶H̶o̶m̶e̶ ̶A̶s̶s̶i̶s̶t̶a̶n̶t̶,̶ ̶b̶u̶t̶ ̶w̶i̶t̶h̶ ̶a̶ ̶t̶o̶n̶ ̶m̶o̶r̶e̶ ̶d̶e̶b̶u̶g̶ ̶m̶e̶s̶s̶a̶g̶e̶s̶ ̶I̶ ̶a̶d̶d̶e̶d̶.̶

Current debugging process:

  1. Download and install https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/tree/experimental branch manually.
  2. Add logs for tapo and onvif component
logger:
  default: critical
  logs:
    custom_components.tapo_control: debug
    homeassistant.components.onvif: debug
  1. Restart hass
  2. Make a motion so that sensor shows up. You should see logs like 2021-04-24 23:53:50 DEBUG (MainThread) [homeassistant.components.onvif] async_start 1 and 2021-04-24 23:53:50 DEBUG (MainThread) [custom_components.tapo_control] Setting up onvif...
  3. Reboot camera via service
  4. Make a motion so that sensor shows up
  5. Don't change anything on the camera, dont move it, dont touch it.
  6. When it stops detecting motion correctly, note time
  7. Reboot camera, note time of reboot
  8. Try to make a ton of motion etc etc, so that it has a possibility to recover, leave it be for 5 min, do a ton of motion again.

If its still not recovered by that point, please post logs and times you noted down. @Akkor70 @dankocrnkovic

@dankocrnkovic
Copy link
Author

I simply can not get onvif logs :(
Rebooted camera via service and nothing new in log.

@Akkor70 did you manage to go forward with debugging?

d.

@Akkor70
Copy link

Akkor70 commented Apr 26, 2021

I simply can not get onvif logs :(
Rebooted camera via service and nothing new in log.

@Akkor70 did you manage to go forward with debugging?

d.

I'm waiting for motion sensor stop working

@dankocrnkovic
Copy link
Author

As I cant get logs to work, Motion stop reporting today and I just restarted HA without rebooting camera. And it recovered after HA restart. So, its not in camera problem as it seams.

d.

@JurajNyiri
Copy link
Owner

@dankocrnkovic its a Home Assistant issue (99% probably not this integration), we just need to narrow it down and then workaround it and/or create an issue/fix for Home Assistant.

@JurajNyiri
Copy link
Owner

Hey @Akkor70 any updates with the logs?

@Akkor70
Copy link

Akkor70 commented May 6, 2021

No man
I'm in trouble with HA atm
I'll post asap

@monotonus
Copy link

Seems to be the same issue with my C200 with newest firmware and newest Tapo integration

@JurajNyiri
Copy link
Owner

@monotonus we need logs i described above to proceed with this as i cannot replicate it

@CoYoNq
Copy link

CoYoNq commented Aug 24, 2021

Motion sensors with TAPO APP running in any device in the network (ie in an android device, where app runs in background), makes sensor detection fail times to times. Kill the app in your device (stop it) and sensors gonna show again.
Looks like low profile cams (like tapo C100) can report only once, and TAPO app monopolices it.
C320 uses not to fail, ie.
Bassically, it is not a bug (in the project). Its a limitation of some hardware (or a bug in firmware)
Hope my research helps.

@devconprodcutions
Copy link

I'm haveing a C200 with HomeAssistant 2021.9.7 aswell as an instance with 2021.10.0. Installation of the integration works so far. The motion detection sensor is also working but after ~24hrs the sensor is in state unavailable. I checked everything according to the FAQ but it does not help. The FW of the cam is 1.1.11

@bolderiz
Copy link

I'm haveing a C200 with HomeAssistant 2021.9.7 aswell as an instance with 2021.10.0. Installation of the integration works so far. The motion detection sensor is also working but after ~24hrs the sensor is in state unavailable. I checked everything according to the FAQ but it does not help. The FW of the cam is 1.1.11

Me too. I activated logger. I don't see any info of onvif component

@mcfly2283
Copy link

Same Problem here, but sometimes it will work several weeks.

@paqp
Copy link

paqp commented Nov 8, 2021

hi! after last firmware my c310 cameras (3 in total) are crashing every day twice a day.
I thought it was due to tapo app opened. But they are now under firewall, so not exposed to internet: same problem.
Every camera reboot itself at night (programmed).

I dunno if this could help.

`This error originated from a custom integration.

Logger: custom_components.tapo_control
Source: custom_components/tapo_control/utils.py:207
Integration: Tapo: Cameras Control (documentation, issues)
First occurred: November 8, 2021, 3:44:43 AM (15 occurrences)
Last logged: November 8, 2021, 3:51:28 AM

Unexpected error fetching Tapo resource status data: All connection attempts failed
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 61, in map_httpcore_exceptions
yield
File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 281, in handle_async_request
) = await self._pool.handle_async_request(
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 234, in handle_async_request
response = await connection.handle_async_request(
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 136, in handle_async_request
self.socket = await self._open_socket(timeout)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 163, in _open_socket
return await self._backend.open_tcp_stream(
File "/usr/local/lib/python3.9/site-packages/httpcore/_backends/auto.py", line 44, in open_tcp_stream
return await self.backend.open_tcp_stream(
File "/usr/local/lib/python3.9/site-packages/httpcore/_backends/anyio.py", line 154, in open_tcp_stream
stream = await TLSStream.wrap(
File "/usr/local/lib/python3.9/contextlib.py", line 137, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.9/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions
raise to_exc(exc) from None
httpcore.ConnectError: All connection attempts failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data
return await self.update_method()
File "/config/custom_components/tapo_control/init.py", line 186, in async_update_data
await syncTime(hass, entry)
File "/config/custom_components/tapo_control/utils.py", line 207, in syncTime
await device_mgmt.SetSystemDateAndTime(time_params)
File "/usr/local/lib/python3.9/site-packages/zeep/proxy.py", line 64, in call
return await self._proxy._binding.send_async(
File "/usr/local/lib/python3.9/site-packages/zeep/wsdl/bindings/soap.py", line 156, in send_async
response = await client.transport.post_xml(
File "/usr/local/lib/python3.9/site-packages/zeep/transports.py", line 230, in post_xml
response = await self.post(address, message, headers)
File "/usr/local/lib/python3.9/site-packages/zeep/transports.py", line 215, in post
response = await self.client.post(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1825, in post
return await self.request(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1494, in request
response = await self.send(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1586, in send
response = await self._send_handling_auth(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1616, in _send_handling_auth
response = await self._send_handling_redirects(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1655, in _send_handling_redirects
response = await self._send_single_request(request, timeout)
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1699, in _send_single_request
) = await transport.handle_async_request(
File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 276, in handle_async_request
(
File "/usr/local/lib/python3.9/contextlib.py", line 137, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 78, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError: All connection attempts failed
`

@liakjim
Copy link

liakjim commented Nov 22, 2021

Hello, user with a tapo c200. Sometimes this issue happens to me. It is always solved by a ha restart.

@JurajNyiri
Copy link
Owner

Responding me too does not help resolving this issue. Please see detailed instructions on what information to provide in my last comments.

@paqpal
Copy link

paqpal commented Nov 22, 2021

Responding me too does not help resolving this issue. Please see detailed instructions on what information to provide in my last comments.

Did my log help you? I'm not a le to handle python... I see that as much as I update HA, problem presents frequently, now 3 times a day with tapo c310 gen 1, 1 time with tapo v2.

@JurajNyiri
Copy link
Owner

Responding me too does not help resolving this issue. Please see detailed instructions on what information to provide in my last comments.

Did my log help you? I'm not a le to handle python... I see that as much as I update HA, problem presents frequently, now 3 times a day with tapo c310 gen 1, 1 time with tapo v2.

No, that log seems to be unrelated to this issue as this is not about camera being unresponsive, but about its motion sensor stopping changing state.

@rkkoszewski
Copy link

I'm having the same issue with a Tapo C110. In my case restarting HA does not solve the issue. It actually shows up after restarting HA. Maybe it stops working earlier, but the sensor shows as "Clear" and after HA restart it shows as "Unavailable". Any further restarts of HA (Even full OS reboot) have no effect and do not fix the issue. Disabling "Enable motion sensor" and then enabling it again seems to make the motion sensor work again (No HA restart necessary). I'll try to play with the integration's Debug options and how OVNIF is working here (Smells to me like a subscription to the motion event expires and is never refreshed, but I haven't yet looked how the integration works). I'll report back.

@barisozdag
Copy link

I was having this problem too. But I haven't encountered any "Unavailable" status for 2 days.

I have Tapo C200. My situation was different from what is written here. Previously, it was in the "Unavailable" state, but when motion was detected in front of the camera, it went into the "detected" state. After staying in the "Clear" state for a while when there was no movement, it would occasionally switch to the "unavailable" state. I've never had to restart the home assistant. So unfortunately I didn't get any debug logs.

Two days ago I both upgraded Home assistant to version 2021.11.5 and used "binary_sensor.c200_motion" as a trigger in an automation. When I look in History there are no "Unavailable" statuses since then.
image

@d99pli
Copy link

d99pli commented Jul 24, 2022

Having the same issue with both C200, C310 and C320:s becoming unavailable every now and then, have not been able to identify root cause. Video streams work flawlessly from the cameras to HA all the time, so only issue is with motion detection in HA via onvif. Motion detection with the Tapo app works without issues, it is the Onvif cell_motion_detection sensor that becomes unavailable. Sometimes a HA reboot solves the problem, but not always, very confusing behaviour. Happy to help with submitting logs, here is an example how it looks after HA startup. The three first cameras below have events = False as capability, they are also the cameras which are currently unavailable (but this differs between different times, so no static, i.e. sometimes it is other cameras becoming unavailable):

**2022-07-24 16:33:11 DEBUG (MainThread) [homeassistant.components.onvif] Camera Kamera tvrum C200 capabilities = Capabilities(snapshot=False, events=False, ptz=True) 2022-07-24 16:33:11 DEBUG (MainThread) [homeassistant.components.onvif] Camera Kamera huvudentre gång C320 capabilities = Capabilities(snapshot=False, events=False, ptz=False) 2022-07-24 16:33:18 DEBUG (MainThread) [homeassistant.components.onvif] Camera Kamera vattentank odlingslimpa C310 capabilities = Capabilities(snapshot=False, events=False, ptz=False)** 2022-07-24 16:33:31 DEBUG (MainThread) [homeassistant.components.onvif] Camera Kamera uppfart brevlåda C320 capabilities = Capabilities(snapshot=False, events=True, ptz=False) 2022-07-24 16:33:31 DEBUG (MainThread) [homeassistant.components.onvif] Camera Kamera tvättstuga C310 capabilities = Capabilities(snapshot=False, events=True, ptz=False) 2022-07-24 16:33:31 DEBUG (MainThread) [homeassistant.components.onvif] Camera Kamera parkering C310 capabilities = Capabilities(snapshot=False, events=True, ptz=False) 2022-07-24 16:33:31 DEBUG (MainThread) [homeassistant.components.onvif] Camera Kamera vattentank parkering C310 capabilities = Capabilities(snapshot=False, events=True, ptz=False)

See camera availability corresponding to the HA log above. Again, it might be different cameras that become unavailable another time.

image

@vsimanin
Copy link

vsimanin commented Sep 12, 2022

I have the same problem for the last month. Cameras C100 and C200. Approximately 1 time at 21-30 hours the motion sensor stops registering events. Rebooting HA helps. Please check my version, but this seems to happen when the wi-fi connection is disconnected. I tried turning the router off and on. The sensor stopped registering events.
Screenshot_20220912-153944

@reiserfs

This comment was marked as off-topic.

@baradetsky
Copy link

+1 the same issue with C100 (but C210 works properly)
2022-11-13_11-17-53

@vsimanin
Copy link

I have the same problem for the last month.

I stopped getting this error a very long time ago. I think I understood what it was connected with in my case. The router periodically gave the IP address of the camera to another device, but it remains fixed in the smart home integration. Registered the address static. The problem has not occurred for several months.

@pietronicoletti

This comment was marked as off-topic.

@fballiano

This comment was marked as off-topic.

@CoYoNq
Copy link

CoYoNq commented Dec 7, 2022 via email

@fballiano

This comment was marked as off-topic.

@CoYoNq
Copy link

CoYoNq commented Jan 4, 2023 via email

@fballiano

This comment was marked as off-topic.

@JurajNyiri
Copy link
Owner

All these comments are not helping to find the solution. Most of the time the issue is with users network and stability.
If there is an error with this integration, follow the steps I posted above, if you do not, your comment does not help in any way.

@CoYoNq
Copy link

CoYoNq commented Jan 4, 2023 via email

@andree182
Copy link

andree182 commented Jan 25, 2023

To try to debug this issue, I am currently running this HA-Tapo Control in parallel with the ONVIF component. In addition, it seems to me that restarting HA (and thus connection to the Tapo devices) helps, while restarting the devices doesn't seem to (curious, right?).

image

In the picture above (of two cameras), the top 2 rows is the HA-TC (motion and motion2), while the bottom two are from ONVIF. For whatever reason, I rarely see the "motion" sensor available for TC, and it seems always 'off' for ONVIF. The interesting part is the difference in the detected activity on the first camera... But as evident, sometimes ONVIF catches, sometimes HA-TC, sometimes both.

Also, in the picture @ 1:00 , HA was restarted.

So I'll be watching it for the coming few days, in the meantime I'm using both motion2 sources as triggers I guess.

@JurajNyiri
Copy link
Owner

Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests