-
Notifications
You must be signed in to change notification settings - Fork 4
Description
onvif-python==0.2.10
zeep==4.3.2
requests==2.32.5
urllib3==2.6.2
Python 3.11.2
device tapo C210
firmware : 1.2.5 (last available version for C210)
I control and handle onvif camera events via a python script using the onvif-python module on a raspberry pi5. let's name OnvifClient on this machine as NVR
In the python script i implement the onvif real-time notification interface as you describe in your deepwiki.
i proceed in two test methods : creating the pullpoint subcription with no inital TerminationTime to test the subscription Renew or in the second way with a one year duration ("PT8274H") in order to never fall in subscription dismiss for a while
issues
i encounter several technical malfuntions i can't determine the origin preventing a live environnement implementation.
First of all, C210 camera always locally detects motion (i receive a phone notification by the TPlink Tapo app, alarm is raised)
the main problem is that an event is often not triggered towards pullpoint of the NVR after the camera detects a motion.
the event is triggred after the first time i launch the NVR python script and not triggered some time later, the Onvif client beeing still alive and subcription as well.
case 1 : i mention no initial TerminationTime in the pullpoint CreatePullPointSubscription request
i noticed in the pullmessage response that the message.CurrentTime is one hour late compared to the camera currenttime value i get with the onvif.client query devicemgmt_service. GetSystemDateAndTime ()
which is the correct currenttime as the Europe/brussel timezone declared for the camera in the Tplink Tapo app and the same time of the NVR one.
the TerminationTime returned by the pullmessage response is 10 minutes relative from the first message.CurrentTime returned.
this TerminationTime is not reevaluated till the pullmessage fails in expirated TerminationTime (the keep-alive mecanism is not supported)
I tried to do a subscription Renew taking in account the remainning difference between the message.TerminationTime and the message.CurrentTime
but the Renew statement (subscription.Renew (TerminationTime="PT10M")) fails with ONVIF operation 'Renew' failed: SOAP Error: code=SOAP-ENV:Sender, subcode=InvalidArgVal, msg=error
in case of motion triggered event detected by the pullmessages , the time of the detected IsMotion is also timestamped one hour later it really happened.
The pullmessage receives about one hundred messages with operationtype 'initialized' and 'IsMotion' data set to True. the last message has 'IsMotion' data set to False.
i launch a rtsp stream recording when IsMotion data becomes False in the last messages.
I asked the TPlink support what is the reason for such a big messages number for one motion detection. they reply that this beheavior looks like a Basic notification interface rather than a real-time notification interface. what do you think of?
case 2 : setting a one year absolute TerminateTime while creating pullpoint.
The camera doesn't refuse this duration, the pullmessages response returns a CurrentTime late of one hour as above case1.
the pullmessages returned a constant TerminationTime equal with the one i set. the camera stays inside subcription time.
I notice the same no triggered motion event during an elapsed time and the big number of IsMotion data at true value in case of event trigerred.
I need some candle light