-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
ONVIF: TP-Link Tapo Camera Motion not working after firmware upgrade (port 1024 is unresponsive in newer firmware, webhook messages not delivered) #91661
Comments
Hey there @hunterjm, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) onvif documentation |
Make sure the custom component is up to date as older versions pin the onvif library to the wrong version If that’s not it try unplugging the camera for a minute and plugging it back in. Reasoning for this detailed here #91485 |
Thanks for the replies. As mentioned, the only difference between the camera that is working and the one that doesn't is the firmware version so the problem might be actually by TP-Link Tapo, but not sure if something can be done on ONVIF side also. Can you please let me know how can I set up the onvif custom integration after copying the files to custom_components/onvif ? I only get the original one while searching for Integrations. I found this in the logs though: |
This looks to be tied to the firmware version, I have a C210 with firmware 1.3.3 and my motion doesn't work. Edit: Interesting, I can now see errors are gone and I can see the motion working! |
I turned on the Diagnostics of the faulty camera and extracted this log that was generated while I was moving in front of the camera. If needed, I can run a full diagnostic on the camera, if you think this would tell something. |
I forgot to add the
Restart The |
Motion detection works reliably with this pull re. But, I get this error:
Looks somewhat related (both have Here are the full logs |
I tried this, had it run over night. Logs attached: Will try some HA/camera restarts to see if this changes. |
Thats not good. It looks like there might be a bug in the firmware |
Anything interesting in the camera diagnostics ? Its almost like the camera is crashing and restarting |
Performed the following steps:
First observation: the 'Starting ONVIF, not everything will be available until it is finished.' message was there for a while. After restart: Motion sensor is still unavailable for the new firmware, old one works good. At this point I tend to believe that it's a firmware issue that cannot be fixed on our side. |
Based on the above, I agree. |
I updated the firmware on my C320WS and now I have the same problem. If I find a workaround, I'll post it, but I think we have to wait for them to fix the firmware at this point. |
I have sent an email to local TP-Link support email support.ro@tp-link.com I'll get back if I get any replies. |
I have the same problem with my C320WS. Maybe you need some help with the investigation? |
From my emails to TP-Link, the Tapo developers are stating that there is no change on the ONVIF part of the cameras in the latest 1.3.x firmware. Given this, looks like it's an issue on Home Assistant side, as the ONVIF is working with other software like iSpy as per these instructions on the official TP-Link website https://www.tp-link.com/en/support/faq/2680/ |
Thats strange since all the 320s I have on the newer firmware throw 500 internal errors and returns back data that looks like its been corrupted in memory. |
Its certainly possible that the memory corruption has nothing to do with the onvif implementation in the camera and its happening deeper in the stack. |
If the issue is not in firmware, it will need to be fixed here -- in HA onvif. My last updates just implement the new onvif version introduced in the latest dev versions. If you would like to help further, enable debug logs for onvif with latest DEV version of HA and post them here. Make sure to disable tapo integration and use only onvif, to prevent noise or wrong implementation in Tapo custom integration. |
Also events do work fine for me on the 320s with pull point. Its only the notification subscriptions (webhooks) that throw the 500 errors. |
I don't have a 200 to test with so its possible there is another issue but without logs I can only tell you what I see with the 320 |
I've got a C200 a since yesterday and was stupid enough to update it out of the box to the latest firmware: 1.3.4 Build 230424 Rel.76394n(4555). I tried the custom Tapo component and ran into the same issue as others, motion detection not working. To maybe help debug the issue I updated to the dev branch of homeassistant, removed the tapo component and added the official ONVIF component. After a few minutes a binary_sensor.camera_cell_motion_detection sensor pops up, but it looks like it's stuck in "Detected" state. Here's a few snippets from the logs:
I removed the SOAP messages from the logs, let me know if you need more info. |
Open sanity checks:
Close sanity checks:
1024:
So I would say it is closed. Let me know if I should run something else. |
Working camera
So its pretty clear that they broke the service on port 1024 in the newer firmware |
At this point its clear we can't fix this with a code change in the lib or HA side, and its something tplink will have to fix in the firmware. |
Given that the port 1024 is closed on 1.3.4 and it still works... Just thinking out loud here, I do not know how onvif actually works under the hood. |
We really can't do anything about it. Tplink has to fix it. Its clearly broken too deep in the internals. @JurajNyiri Unrelated to this, but I'm going to make some changes onvif library to fix some I/O in the event loop. They will require I'm |
Can you get a wireshark dump on how iSpy is setting up the PullPoint / notify subscription? We might be able to change to do it that way if there isn't a risk of breaking other cameras. |
I got it. I can share privately through Discord, I have added you to friends. |
To close the loop on our discord conversation iSpy/Agent DVR doesn't appear to be using events and is doing local processing so thats a dead end. |
AFAICT the newer firmware errors on pull point subscription, the webhook subscription appears to be successful, but events never get delivered back to HA. While the onvif integration tries both ways to get the events, neither work on the new firmware. |
I received the 1.3.4 update on the C200 camera with hardware version 3 and everything is still working here with PR #92551. Tested with Pull Point and webhooks |
While PullPoint is still broken on 1.3.6 firmware, the webhooks should work after #92627 IMPORTANT: You need to make sure your internal HA url is not HTTPS for the webhooks to work. |
The above PRs are in 2023.5.2 |
For me, since the last updates (2023.5.0 -> 2023.5.1 -> 2023.5.2), none of the two cameras are working anymore. These are the sensors for C200: These are the sensors for C210: For further information, I'm attaching the log: I have removed and re-added both cameras in HA. C210: Detection cell but sometimes stuck on "Detected", sometimes "Unavailable" Enabled debugging and this is what I get: |
@mitzu2250 This issue is for onvif integration, logs posted are for tapo_control custom integration. Disable tapo_control, add camera through onvif integration and enable logs like so:
Make sure to specify also firmware of cameras and create, or find and update 2 issues which are specifying the same thing you are experincing, since these are 2 different problems. Optionally, go and read the release notes, or FAQ in the custom integration, both contain information to help you solve your issue. You most probably need to specify internal URL or fix network firewall rules if you are using vlans so that your camera can reach HA. Depending on camera firmwares, nonworking webhooks can cause even the working pullpoint to get stuck like on your C210. I assume your C200 is running 1.3.6 which has broken pullpoint, with only webhooks working - thus you will need to make sure your webhooks actually work. |
Hello, Attached the log: The ...201 camera is a C200 with 1.3.6 Build 230424 Rel.77225n(4555) Information in release notes and FAQ didn't solved the issue. The internal URL is ok in the network settings and I don't use vlans, camera is in the same network as the Home Assistant VM. |
The webhooks are not working & the pullpoint on 1.3.6 is timing out because of broken firmware as expected and the C210 gets stuck because it cannot handle both webhook and pullpoint subscription at the same time. Is your HA instance available at and responds at http://192.168.100.211:8123/ ? Make absolutely sure it does and that camera can reach it. |
Looks like something is wrong indeed with my network settings. While I try to access http://192.168.100.211:8123/ from host computer (where VMware is installed) it works. It's really strange because with my current network/router settings everything except this works. While writing this I tried one more thing, at some point I selected Static ip configuration and added manually the ip. Thanks for the hint! I'm not sure why I did this in the past, hope I didn't break anything doing this ... |
Working firmware table : JurajNyiri/HomeAssistant-Tapo-Control#312 (comment)
The problem
Hello.
I have 2 different cameras:
1 C200 running on 1.3.5 Build 230307 Rel.6847n(4555) contains string 'hol' in it's name
1 C210 running on 1.3.0 Build 220830 Rel.69909n(4555) contains string 'living' in it's name
For some time, the motion sensor from C200 is not working. Usually when I had this issue, it was fixed after a restart of HA or reboot of the camera.
The C210 one is still working as expected.
I have enabled the debug on the two entities and got the attached log.
I cannot see any ERRORS, maybe you can spot something that it shouldn't be there.
This has already been discussed in the Tapo Control issues : JurajNyiri/HomeAssistant-Tapo-Control#312
What version of Home Assistant Core has the issue?
core-2023.4.5
What was the last working version of Home Assistant Core?
core-2023.4.5
What type of installation are you running?
Home Assistant OS
Integration causing the issue
ONVIF
Link to integration documentation on our website
https://www.home-assistant.io/integrations/onvif/
Diagnostics information
home-assistant_2023-04-19T10-04-13.732Z.log
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
Might not be ONVIF fault, maybe it's a bad firmware from TP-Link?
The text was updated successfully, but these errors were encountered: