You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
first, thanks for this software, luckily i found it!
My issue is similar as in #567 , same Tapo camera C530WS ( my other Tapo, TC47 works fine). It was working around 0.30, but later got an firmware upgrade.
Error in the log: 2026-09-12 14:30:49.147ERRORONVIF Detection: curl_easy_perform() failed: Server returned nothing (no headers, no data) 2026-09-12 14:30:49.147ERRORFailed to pull messages from subscription 2026-09-12 14:30:49.147WARN[udvar] ONVIF thread: detect_motion_onvif error -1 – backing off 5 s before retry 2026-09-12 14:30:47.490INFO[Detection] [udvar] Running detection (interval=3s, elapsed=4s, model=onvif)
ODM works, lightNVR detection does not ( works about twice a day). I'm on version 0.41.17.
The 15 ms curl=52 means the camera accepts the TCP connection and closes it without any HTTP response. libcurl already retries a dead keep-alive connection on a fresh one before reporting that, so this is the camera dropping fresh connections, and the pull point itself stays valid. The clients that work with Tapo (Home Assistant's ONVIF integration, tapo-onvif-events) simply re-issue PullMessages on the same subscription a few times per second; enough attempts get through. LightNVR made one attempt per poll and then backed off five seconds, which on a camera that drops most fresh connections gives roughly the "twice a day" you see.
On main, subscription requests that hit a transport drop are retried up to six times, 250 ms apart, on the same subscription. Please try the next release. If it still misses events, run once with LIGHTNVR_ONVIF_CURL_TRACE=1 (logs curl notes and HTTP headers only, never bodies or credentials) and attach a few minutes of log, plus the Successfully created ONVIF subscription ... at <address> line, the C530WS firmware version, and whether ONVIF Device Manager or the Tapo app was connected at the same time (Tapo has a low subscription cap).
The retry change above shipped in 0.42.5; the current release is 0.42.8. Please retest on that, and if events are still missed, the LIGHTNVR_ONVIF_CURL_TRACE=1 log described above is the next step.
Thanks, the trace is exactly what was needed. What it shows over the five minutes:
The C530WS (192.168.0.80) closed 60 of 91 PullMessages connections without a response; the camera at 192.168.0.81 answered all 66 of its requests. So this is specific to the Tapo, as suspected.
Most drops have a pattern: the request sent right after a response is dropped almost every time, and the retry 250 ms later gets through (e.g. 19:48:44.748 dropped, 19:48:45.018 answered after a normal 5.7 s hold). That is the retry from 0.42.5 doing its job.
There are also windows of 1.5 to 9 s where the camera drops every connection (19:47:16, 19:47:43, 19:48:23, 19:49:14 to 19:49:24, the last one during a motion event). Those exhaust the six retries and cost a 5 s backoff.
Even so, udvar reported motion three times in the window (19:48:09, 19:49:05, 19:50:30) and each produced a detection recording. So on this firmware events are getting through. Did you see motion during those five minutes that did not produce a recording? If yes, the times would help.
The trace also exposed a problem on my side. All cameras shared one HTTP connection, so udvar's poll waited behind the other cameras' 5 s long polls: for much of the trace it was polled only every 11 to 25 s (nothing between 19:47:18 and 19:47:43, for example), and the short windows in which the C530WS accepts a connection were missed more often than they needed to be. Fixed on main: each subscription now has its own connection, so the Tapo is polled continuously and a retry burst no longer holds up the other cameras. It will be in the next release; please leave the trace off in normal operation, it is verbose.
Hi @matteius , thanks for checking.
The "udvar" is placed in the courtyard, and my app is set to only warn me for person detection, but i've noticed not all event gets recorded (with older version of lightnvr). As i see the current version records much frequently, as i remember the 0.41 was the worst, only 4-5 recording a day for some reason.
I'll try to test the detection-sync tomorrow.
thanks
@rav1ne checking in: the change that gives each ONVIF subscription its own connection (so the Tapo is polled continuously instead of waiting behind the other cameras) is in the current release, 0.43.2. How has the C530WS been since? Are motion/person events being recorded reliably now, or are you still seeing missed events? If it's still missing some, the approximate times of missed events plus a few minutes of log with LIGHTNVR_ONVIF_CURL_TRACE=1 would help. If I don't hear back in about two weeks, I'll close this, and you can reopen anytime.
Hi @matteius , upgraded to 0.43.4, still getting error:
2026-10-20 15:41:01.682INFORunning periodic service check (32 max streams)
2026-10-20 15:41:01.682INFOService check for stream udvar: enabled=1, record=0, streaming_enabled=1
2026-10-20 15:41:01.540ERRORFailed to pull messages from subscription
2026-10-20 15:41:01.540WARN[udvar] ONVIF thread: detect_motion_onvif error -1 – backing off 5 s before retry
2026-10-20 15:41:01.539ERRORONVIF request http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesRequest failed after 6 attempts (last attempt: curl=52, HTTP=0, elapsed=0.011s, new connections=1): Server returned nothing (no headers, no data)
Still missing events, just tried it. I'll turn back on the debug.
Activity
matteius commentedon Sep 13, 2026
Please recheck the latest release.
rav1ne commentedon Sep 13, 2026
Hi, installed 0.41.18, now this is the error:
2026-09-13 17:03:14.805INFO[Detection] [udvar] Running detection (interval=3s, elapsed=4s, model=onvif)
2026-09-13 17:03:14.691INFO[Detection] [utca2] Running detection (interval=3s, elapsed=4s, model=onvif)
2026-09-13 17:03:14.625INFO[Detection] [utca1] Running detection (interval=3s, elapsed=4s, model=onvif)
2026-09-13 17:03:13.544ERRORONVIF request http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesRequest failed (curl=52, HTTP=0, elapsed=0.015s): Server returned nothing (no headers, no data)
2026-09-13 17:03:13.544ERRORFailed to pull messages from subscription
2026-09-13 17:03:13.544WARN[udvar] ONVIF thread: detect_motion_onvif error -1 – backing off 5 s before retry
2026-09-13 17:03:10.815INFO[Detection] [udvar] Running detection (interval=3s, elapsed=4s, model=onvif)
2026-09-13 17:03:10.665INFO[Detection] [utca2] Running detection (interval=3s, elapsed=4s, model=onvif)
thanks
fix(onvif): retry pull-point requests that a camera drops without a r…
matteius commentedon Sep 25, 2026
The 15 ms
curl=52means the camera accepts the TCP connection and closes it without any HTTP response. libcurl already retries a dead keep-alive connection on a fresh one before reporting that, so this is the camera dropping fresh connections, and the pull point itself stays valid. The clients that work with Tapo (Home Assistant's ONVIF integration, tapo-onvif-events) simply re-issue PullMessages on the same subscription a few times per second; enough attempts get through. LightNVR made one attempt per poll and then backed off five seconds, which on a camera that drops most fresh connections gives roughly the "twice a day" you see.On main, subscription requests that hit a transport drop are retried up to six times, 250 ms apart, on the same subscription. Please try the next release. If it still misses events, run once with
LIGHTNVR_ONVIF_CURL_TRACE=1(logs curl notes and HTTP headers only, never bodies or credentials) and attach a few minutes of log, plus theSuccessfully created ONVIF subscription ... at <address>line, the C530WS firmware version, and whether ONVIF Device Manager or the Tapo app was connected at the same time (Tapo has a low subscription cap).matteius commentedon Sep 30, 2026
The retry change above shipped in 0.42.5; the current release is 0.42.8. Please retest on that, and if events are still missed, the
LIGHTNVR_ONVIF_CURL_TRACE=1log described above is the next step.rav1ne commentedon Sep 30, 2026
Hi @matteius
attaching the logs.
Firmware is 1.4.1 Build 260612
Normally i use the tapo app on my phone, this time it was off.
thanks!
5min.zip
matteius commentedon Sep 30, 2026
Thanks, the trace is exactly what was needed. What it shows over the five minutes:
udvarreported motion three times in the window (19:48:09, 19:49:05, 19:50:30) and each produced a detection recording. So on this firmware events are getting through. Did you see motion during those five minutes that did not produce a recording? If yes, the times would help.The trace also exposed a problem on my side. All cameras shared one HTTP connection, so
udvar's poll waited behind the other cameras' 5 s long polls: for much of the trace it was polled only every 11 to 25 s (nothing between 19:47:18 and 19:47:43, for example), and the short windows in which the C530WS accepts a connection were missed more often than they needed to be. Fixed on main: each subscription now has its own connection, so the Tapo is polled continuously and a retry burst no longer holds up the other cameras. It will be in the next release; please leave the trace off in normal operation, it is verbose.rav1ne commentedon Sep 30, 2026
Hi @matteius , thanks for checking.
The "udvar" is placed in the courtyard, and my app is set to only warn me for person detection, but i've noticed not all event gets recorded (with older version of lightnvr). As i see the current version records much frequently, as i remember the 0.41 was the worst, only 4-5 recording a day for some reason.
I'll try to test the detection-sync tomorrow.
thanks
fix(onvif): give each PullPoint subscription its own connection
matteius commentedon Oct 17, 2026
@rav1ne checking in: the change that gives each ONVIF subscription its own connection (so the Tapo is polled continuously instead of waiting behind the other cameras) is in the current release, 0.43.2. How has the C530WS been since? Are motion/person events being recorded reliably now, or are you still seeing missed events? If it's still missing some, the approximate times of missed events plus a few minutes of log with
LIGHTNVR_ONVIF_CURL_TRACE=1would help. If I don't hear back in about two weeks, I'll close this, and you can reopen anytime.rav1ne commentedon Oct 20, 2026
Hi @matteius , upgraded to 0.43.4, still getting error:
Still missing events, just tried it. I'll turn back on the debug.
thanks