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

Feature Request: Add multiple events detections #304

Open
AndreiArdelean1 opened this issue Mar 30, 2023 · 204 comments
Open

Feature Request: Add multiple events detections #304

AndreiArdelean1 opened this issue Mar 30, 2023 · 204 comments
Assignees
Labels
Enhancement New feature or request Help wanted Extra attention is needed

Comments

@AndreiArdelean1
Copy link

AndreiArdelean1 commented Mar 30, 2023

Is your feature request related to a problem? Please describe.
I want to be able to detect multiple event types.
I'm not interested in actually highlighting/retrieving the rectangle where this was detected on the camera, just the detection event.

Describe the solution you'd like
I want to be able to detect and distinguish between:

  • Motion
  • AI: Person, Pet, Vehicle, Baby Crying, Glass Break, Dog Barks, Cat Meows
  • Line-Crossing
  • Camera Tampering

These notifications are sent to the native app.

Describe alternatives you've considered

  1. Create a different sensor for each event type. This has the benefit of also tracking (either now, or maybe in future updates of the camera) the duration that the event was on.
  2. Add attributes to the motion detection sensor binary_sensor that indicate the type of the event

A clear and concise description of any alternative solutions or features you've considered.

Additional context
These features are available on 3MP+ cameras for free, and on 1080p cameras using the paid subscription

Here is the response from GetEventProperties of the ONVIF endpoint on Tapo C225 camera:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:hikwsd="http://www.onvifext.com/onvif/ext/ver10/wsdl" xmlns:hikxsd="http://www.onvifext.com/onvif/ext/ver10/schema">
    <SOAP-ENV:Header>
        <wsa5:Action SOAP-ENV:mustUnderstand="true">http://www.onvif.org/ver10/events/wsdl/EventPortType/GetEventPropertiesResponse</wsa5:Action>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <tev:GetEventPropertiesResponse>
            <tev:TopicNamespaceLocation>http://www.onvif.org/onvif/ver10/topics/topicns.xml</tev:TopicNamespaceLocation>
            <wsnt:FixedTopicSet>true</wsnt:FixedTopicSet>
            <wstop:TopicSet>
                <tns1:RuleEngine>
                    <CellMotionDetector>
                        <Motion wstop:topic="true">
                            <tt:MessageDescription IsProperty="true">
                                <tt:Source>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoSourceConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoAnalyticsConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="xsd:string" Name="Rule"></tt:SimpleItemDescription>
                                </tt:Source>
                                <tt:Data>
                                    <tt:SimpleItemDescription Type="xsd:boolean" Name="IsMotion"></tt:SimpleItemDescription>
                                </tt:Data>
                            </tt:MessageDescription>
                        </Motion>
                    </CellMotionDetector>
                    <TamperDetector>
                        <Tamper wstop:topic="true">
                            <tt:MessageDescription IsProperty="true">
                                <tt:Source>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoSourceConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoAnalyticsConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="xsd:string" Name="Rule"></tt:SimpleItemDescription>
                                </tt:Source>
                                <tt:Data>
                                    <tt:SimpleItemDescription Type="xsd:boolean" Name="IsTamper"></tt:SimpleItemDescription>
                                </tt:Data>
                            </tt:MessageDescription>
                        </Tamper>
                    </TamperDetector>
                    <LineCrossDetector>
                        <LineCross wstop:topic="true">
                            <tt:MessageDescription IsProperty="true">
                                <tt:Source>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoSourceConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoAnalyticsConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="xsd:string" Name="Rule"></tt:SimpleItemDescription>
                                </tt:Source>
                                <tt:Data>
                                    <tt:SimpleItemDescription Type="xsd:boolean" Name="IsLineCross"></tt:SimpleItemDescription>
                                </tt:Data>
                            </tt:MessageDescription>
                        </LineCross>
                    </LineCrossDetector>
                    <PeopleDetector>
                        <People wstop:topic="true">
                            <tt:MessageDescription IsProperty="true">
                                <tt:Source>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoSourceConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoAnalyticsConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="xsd:string" Name="Rule"></tt:SimpleItemDescription>
                                </tt:Source>
                                <tt:Data>
                                    <tt:SimpleItemDescription Type="xsd:boolean" Name="IsPeople"></tt:SimpleItemDescription>
                                </tt:Data>
                            </tt:MessageDescription>
                        </People>
                    </PeopleDetector>
                    <TPSmartEventDetector>
                        <TPSmartEvent wstop:topic="true">
                            <tt:MessageDescription IsProperty="true">
                                <tt:Source>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoSourceConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="tt:ReferenceToken" Name="VideoAnalyticsConfigurationToken"></tt:SimpleItemDescription>
                                    <tt:SimpleItemDescription Type="xsd:string" Name="Rule"></tt:SimpleItemDescription>
                                </tt:Source>
                                <tt:Data>
                                    <tt:SimpleItemDescription Type="xsd:boolean" Name="IsTPSmartEvent"></tt:SimpleItemDescription>
                                </tt:Data>
                            </tt:MessageDescription>
                        </TPSmartEvent>
                    </TPSmartEventDetector>
                </tns1:RuleEngine>
            </wstop:TopicSet>
            <wsnt:TopicExpressionDialect>http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet</wsnt:TopicExpressionDialect>
            <wsnt:TopicExpressionDialect>http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete</wsnt:TopicExpressionDialect>
            <tev:MessageContentFilterDialect>http://www.onvif.org/ver10/tev/messageContentFilter/ItemFilter</tev:MessageContentFilterDialect>
            <tev:MessageContentSchemaLocation>http://www.onvif.org/onvif/ver10/schema/onvif.xsd</tev:MessageContentSchemaLocation>
        </tev:GetEventPropertiesResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Currently, motion detection doesn't work on Tapo C225 #303, but this feature would be nice to have once it is working.

@JurajNyiri
Copy link
Owner

This integration reuses onvif from Home Assistant. Adding detectors for these would require to expand on it or handlers to be added into https://github.com/home-assistant/core/blob/dev/homeassistant/components/onvif/parsers.py .

@JurajNyiri
Copy link
Owner

JurajNyiri commented Mar 31, 2023

  1. Install https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/tree/expand_onvif
  2. You should see a lot more warning messages now on onvif events trigger
  3. Unsupported entities should come up as "No registered handler for event from" or "Unable to parse event from"

Please report them here.

I tested on C200 with my Person Detection enabled and I have not received any events...

@NEVdataDyne
Copy link

NEVdataDyne commented Mar 31, 2023

I would like to help as I need my tapo cameras to trigger automations in HA when a person is detected. Until now the only way I could achieve that is to use Alexa between the cameras and HA. With this solution the cameras need to access internet which is not ideal. Using the video stream to detect people on another system is also not a solution because it uses the WiFi so much that it interferes with my Philips Hue remotes.

Could you please tell me how to install https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/tree/expand_onvif ?

@NEVdataDyne
Copy link

NEVdataDyne commented Mar 31, 2023

I downloaded the zip
I updated the Tapo custom component to 5.0
Then I replaced all the files custom_components\tapo_control by the ones from the zip using samba share and restarted HA
I didn't see any new entities so I installed the onvif integration and connected it to one of my C225 camera
I didn't see any new entities either (besides the onvif related entities that I was expecting)
In the logs there doesn't seem to be a message like "No registered handler for event from" or "Unable to parse event from"

I am not sure what I should do?

@JurajNyiri
Copy link
Owner

JurajNyiri commented Mar 31, 2023

The code in the branch above doesnt have any new entities. However, it will catch any previously uncought events with an error message. If you are not seeing any other events then it looks like the camera is not issueing those events. I will do some more testing later with the subscription.

@NEVdataDyne

This comment was marked as off-topic.

@AndreiArdelean1
Copy link
Author

AndreiArdelean1 commented Apr 1, 2023

@NEVdataDyne It looks like you are having the issue #303 (the last error in your comment). Is your motion sensor (classic one) working/triggered in Homeassistant?

@JurajNyiri I'm not seeing any of the errors you mentioned. Could it be that the integration needs to subscribe explicitly for certain events? Something like "on event PERSON_DETECTED post to WEBHOOK".

Also, because of #303 I'm having issues at the moment. I'm changing the file manually inside onvif-zeep-async but it sometimes gets overwritten or some other issue, but the motion detection (classic one) is not very stable for me. This could be the cause I'm not getting any of the new errors.

@NEVdataDyne
Copy link

@AndreiArdelean1 No motion sensor doesn't seem to work. It doesn't seem to work even with my C110 camera so I am not really sure if I am doing somethng wrong. (I have C225, C320WS and one C110 camera)

@AndreiArdelean1
Copy link
Author

I've gotten the integration to work by modifying tapo_control to use a local version of onvif-zeep-async and only motion events are triggered. I've also verified this using Postman and observing the sent events.

Also, the ONVIF integration declares CellMotionDetector, TamperDetector, LineCrossDetector, PeopleDetector, TPSmartEventDetector. All of this should be just boolean values. But, I've only been able to trigger only CellMotionDetector. Since the camera supports other types of detection events/notifications (like pet detection, glass break, vehicle, etc., within the official app) + boundary boxes of the detection inside the video feed, (apparently) are not exposed through ONVIF, I'm guessing the camera uses some Tapo specific API for this. The TamperDetector, LineCrossDetector, and PeopleDetector are most likely discontinued from the ONVIF API or something else is going on.

I'll investigate this further and post updates if I find something else.

@AndreiArdelean1
Copy link
Author

AndreiArdelean1 commented Apr 3, 2023

I didn't manage to find a way of getting the special detection events, but the following will help with integrating the configuration of these events (enabling and sensitivity) into HA and pytapo.

Here is the request the app makes on start:
{"method":"multipleRequest","params":{"requests":[{"method":"getDetectionConfig","params":{"motion_detection":{"name":"motion_det"}}},{"method":"getDetectionRegion","params":{"motion_detection":{"table":["region_info"]}}},{"method":"getBCDConfig","params":{"sound_detection":{"name":["bcd"]}}},{"method":"getPersonDetectionConfig","params":{"people_detection":{"name":["detection"]}}},{"method":"getVehicleDetectionConfig","params":{"vehicle_detection":{"name":["detection"]}}},{"method":"getPetDetectionConfig","params":{"pet_detection":{"name":["detection"]}}},{"method":"getBarkDetectionConfig","params":{"bark_detection":{"name":["detection"]}}},{"method":"getMeowDetectionConfig","params":{"meow_detection":{"name":["detection"]}}},{"method":"getGlassDetectionConfig","params":{"glass_detection":{"name":["detection"]}}},{"method":"getTargetTrackConfig","params":{"target_track":{"name":["target_track_info"]}}},{"method":"getAlertConfig","params":{"msg_alarm":{"name":["chn1_msg_alarm_info","capability"]}}},{"method":"getAlertPlan","params":{"msg_alarm_plan":{"name":"chn1_msg_alarm_plan"}}},{"method":"getAlertTypeList","params":{"msg_alarm":{"name":"alert_type"}}},{"method":"getAlertEventType","params":{"msg_alarm":{"table":["msg_alarm_type"]}}},{"method":"getAlertConfig","params":{"msg_alarm":{"table":["usr_def_audio"]}}},{"method":"getMsgPushConfig","params":{"msg_push":{"name":"chn1_msg_push_info"}}},{"method":"getMsgPushPlan","params":{"msg_push_plan":{"name":"chn1_msg_push_plan"}}},{"method":"getTamperDetectionConfig","params":{"tamper_detection":{"name":"tamper_det"}}},{"method":"getLinecrossingDetectionConfig","params":{"linecrossing_detection":{"name":["detection","arming_schedule"]}}},{"method":"getLinecrossingDetectionRegion","params":{"linecrossing_detection":{"table":["region_info"]}}},{"method":"getMsgPushEventList","params":{"msg_push":{"table":["msg_push_event"]}}}]}}

A few examples of setting detection configs:

  • baby cry
    {"method":"multipleRequest","params":{"requests":[{"method":"setBCDConfig","params":{"sound_detection":{"bcd":{"enabled":"on","sensitivity":"medium"}}}}]}}

  • person
    {"method":"multipleRequest","params":{"requests":[{"method":"setPersonDetectionConfig","params":{"people_detection":{"detection":{"enabled":"off","sensitivity":"60"}}}}]}}

  • pet
    {"method":"multipleRequest","params":{"requests":[{"method":"setPetDetectionConfig","params":{"pet_detection":{"detection":{"enabled":"off","sensitivity":"60"}}}}]}}

  • bark
    {"method":"multipleRequest","params":{"requests":[{"method":"setBarkDetectionConfig","params":{"bark_detection":{"detection":{"enabled":"on","sensitivity":"50"}}}}]}}

  • glass break
    {"method":"multipleRequest","params":{"requests":[{"method":"setGlassDetectionConfig","params":{"glass_detection":{"detection":{"enabled":"on","sensitivity":"60"}}}}]}}

  • tamper
    {"method":"multipleRequest","params":{"requests":[{"method":"setTamperDetectionConfig","params":{"tamper_detection":{"tamper_det":{"enabled":"on","sensitivity":"medium"}}}}]}}

@JurajNyiri
Copy link
Owner

Updated the code in https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/tree/expand_onvif

  1. Download https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/archive/refs/heads/expand_onvif.zip
  2. Follow https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/tree/expand_onvif#installation

You should now see:

  1. Warn message for "async_parse_messages" every time any event is detected
  2. Warn Message Found Event when it found an event it recognizes
  3. Error message "No registered handler for event from" or "Unable to parse event from" when event is found which is not recognized
2023-04-03 08:49:23.920 WARNING (MainThread) [custom_components.tapo_control] async_parse_messages

2023-04-03 08:49:23.921 WARNING (MainThread) [custom_components.tapo_control] Found event ba835a1edb0d0cdf5bcbafab8b732021_tapo_events: {

    'SubscriptionReference': None,

    'Topic': {

        '_value_1': 'tns1:RuleEngine/CellMotionDetector/Motion',

        'Dialect': 'http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet',

        '_attr_1': {

    }

    },

    'ProducerReference': None,

    'Message': {

        '_value_1': {

            'Source': {

                'SimpleItem': [

                    {

                        'Name': 'VideoSourceConfigurationToken',

                        'Value': 'vsconf'

                    },

                    {

                        'Name': 'VideoAnalyticsConfigurationToken',

                        'Value': 'VideoAnalyticsToken'

                    },

                    {

                        'Name': 'Rule',

                        'Value': 'MyMotionDetectorRule'

                    }

                ],

                'ElementItem': [],

                'Extension': None,

                '_attr_1': None

            },

            'Key': None,

            'Data': {

                'SimpleItem': [

                    {

                        'Name': 'IsMotion',

                        'Value': 'true'

                    }

                ],

                'ElementItem': [],

                'Extension': None,

                '_attr_1': None

            },

            'Extension': None,

            'UtcTime': datetime.datetime(1970, 1, 1, 0, 0, tzinfo=<isodate.tzinfo.Utc object at 0x7f663048c580>),

            'PropertyOperation': 'Changed',

            '_attr_1': {

        }

        }

    }

}

@AndreiArdelean1
Copy link
Author

I've already done something similar, but the only thing that changed was the Data.SimpleItem.Value (+ UtcTime). No new event was received by tapo_control, even though the notification was sent to the app. Probably the camera doesn't sent any of the new events using ONVIF.

@JurajNyiri
Copy link
Owner

JurajNyiri commented Apr 3, 2023

I have added to main branch (not yet released to pypi):

  • get/set VehicleDetection
  • get/set Cruise
  • get/set MeowDetection
  • get/set BarkDetection
  • get/set PetDetection
  • get/set BabyCryDetection
  • get/set TamperDetection
  • get/set GlassBreakDetection

I was not able to test:

setBarkDetection
setPetDetection
setGlassBreakDetection
setMeowDetection
setVehicleDetection
getBarkDetection
getPetDetection
getGlassBreakDetection
getMeowDetection
getVehicleDetection
getCruise

@AndreiArdelean1 could you please test above?

Edit: Released as pytapo 3.1.8.

@JurajNyiri
Copy link
Owner

@AndreiArdelean1 now released in https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/releases/tag/5.1.0.beta.1 Please test above, my devices do not support it.

@AndreiArdelean1
Copy link
Author

They all work except for getCruise. getCruise always is {'patrol': {'patrol': {'action': 'idle'}}} regardless if it is idle or doing the cruise. The HA integrations also works. 🎉

@AndreiArdelean1
Copy link
Author

AndreiArdelean1 commented Apr 7, 2023

I've been investigating this issue and here is what I've found so far:

ONVIF:

  • the ONVIF endpoint declares IsMotion, IsTamper, IsLineCross, IsPeople, IsTPSmartEvent
  • for IsTamper, IsLineCross I'm not sure if they are triggered (I don't remember if I tested this), but IsPeople is not triggered
  • Pet, Vehicle, Baby Crying, Glass Break, Dog Barks, Cat Meows, are not even declared in the ONVIF endpoint

UDP:

  • There aren't any multicast packets sent when an event is triggered
  • The app has the option to highlight people, pets, etc. in the live stream. The only place where this could take place (from the network packets received by the app) is inside the video/mp2t in the live stream from port 8800 (https://md.depau.eu/s/r1Ys_oWoP#Live-streaming, https://drmnsamoliu.github.io/video.html). There are no additional application/json received besides the initial ones (informing of the privacy mode overlay). I've not been able to decode the sent JSON packets, only the received ones, as they are encrypted. Most likely the highlighted zones are already included in the video.

API:

  • the App has a feature to view recordings where it also indicates the type of event triggered.
  • when the app enters that screen, here are the calls made:
{"method":"multipleRequest","params":{"requests":[{"method":"searchDateWithVideo","params":{"playback":{"search_year_utility":{"channel":[0],"end_date":"20230431","start_date":"20230401"}}}}]}}
{"method":"multipleRequest","params":{"requests":[{"method":"getSdCardStatus","params":{"harddisk_manage":{"table":["hd_info"]}}},{"method":"getCircularRecordingConfig","params":{"harddisk_manage":{"name":"harddisk"}}}]}}
{"method":"multipleRequest","params":{"requests":[{"method":"getClockStatus","params":{"system":{"name":"clock_status"}}},{"method":"getDstRule","params":{"system":{"name":"dst"}}},{"method":"getTimezone","params":{"system":{"name":["basic"]}}}]}}
{"method":"multipleRequest","params":{"requests":[{"method":"searchDateWithVideo","params":{"playback":{"search_year_utility":{"channel":[0],"end_date":"20230331","start_date":"20230301"}}}}]}}
{"method":"multipleRequest","params":{"requests":[{"method":"searchVideoWithUTC","params":{"playback":{"search_video_with_utc":{"id":1,"start_index":0,"channel":0,"start_time":1680555600,"end_time":1680641999,"end_index":99}}}}]}}
{"method":"multipleRequest","params":{"requests":[{"method":"searchDetectionList","params":{"playback":{"search_detection_list":{"start_index":0,"channel":0,"start_time":1680555600,"end_time":1680641999,"end_index":99}}}}]}}
{"method":"multipleRequest","params":{"requests":[{"method":"searchDateWithVideo","params":{"playback":{"search_year_utility":{"channel":[0],"end_date":"20230231","start_date":"20230201"}}}}]}}

What can be used, for event detection is the call:

{"method":"searchDetectionList","params":{"playback":{"search_detection_list":{"start_index":0,"channel":0,"start_time":1680555600,"end_time":1680641999,"end_index":99}}}}

and returning:

{'playback': {'snapshot_enable': True, 'search_detection_list': [{'start_time': 1680725544, 'end_time': 1680725662, 'alarm_type': 6}, {'start_time': 1680725693, 'end_time': 1680725802, 'alarm_type': 6}, {'start_time': 1680725826, 'end_time': 1680725856, 'alarm_type': 6}, {'start_time': 1680725917, 'end_time': 1680725947, 'alarm_type': 6}], 'total_num': 4}}

A few things to note here:

  • the end time extends if multiple events are triggered in quick succession
  • the alarm type also updates. People, pet detection is preferred over motion events.
  • the start_time and end_time define a range and the camera returns the events that have at least 1s within that range (event.start_time can be before request.start_time, and the same for end_time)

I've written this python script to get the events from the last 10 min to test it:

secondsFrom1970 = tapo.executeFunction(
            "getClockStatus", {"system":{"name":"clock_status"}}
          )["system"]["clock_status"]["seconds_from_1970"]
print(secondsFrom1970)
searchStart = secondsFrom1970 - (10 * 60) # 10 min
searchEnd = secondsFrom1970 + 10
print(tapo.executeFunction(
  "searchDetectionList", {"playback":{"search_detection_list":{"start_index":0,"channel":0,"start_time":searchStart,"end_time":searchEnd,"end_index":99}}}
))

Maybe this method of detection motion could be used to detect motion on #273.
This could be done by:

  1. making the above call every 0.5-1s and getting the last event (named here lastEvent) from the list and later storing it to savedLastEvent.
  2. if the start_time of lastEvent and savedLastEvent are not the same, a new event was triggered
  3. if the alarm_type of lastEvent and savedLastEvent are not the same, a new event was triggered
  4. if savedLastEvent has completed, a new event was triggered
  5. if secondsFrom1970 is within 30s (this is the default/minimum duration of an event) or 10s from the end_time, the event could still be active, otherwise the lastEvent can be marked as completed

Instead of making a call periodically, the ONVIF motion event could be used to trigger the call to searchDetectionList. BUT, the motion event is not triggered if only an AI event is detected. If the motion sensitivity is set high enough, the 2 events would be triggered in close succession and this would probably work.

Probably the best solution would be a combination of making a call periodically and watching for ONVIF motion events.

Other possible methods not yet discovered/implemented on the camera:

  • adding the missing events to ONVIF
  • the camera to emit a multicast broadcast (preferably encrypted) whenever something changes or just on events triggered
  • a way to register a webhook from the camera API for this
  • a way to register a webhook from the Tapo server to HA. Something similar to https://ifttt.com/tplink_tapo/details, but from what I could find, the API is only available to select developers.
  • opening a socket connection to the camera for events (not likely to be done in the future, or to already exist)
  • intercept the calls made by the camera to Tapo servers for notification (if possible, too complicated for the average user for the purpose of this integration)
  • register webhooks with IFTTT (tested and working). The only problem here is that the free plan only allows 5 automations.
  • register webhooks with Alexa

@NEVdataDyne
Copy link

Maybe in "Other possible methods not yet discovered/implemented" you can add "intercept the calls made by the camera to Alexa servers for notification" (for people detection). For some reason Alex seems to be the only service other than Tapo to get notified when a person is detected (and this is the only event Alexa can get).

@AndreiArdelean1
Copy link
Author

I've written this script (attached) to pull events from the camera. It works really well. I'd implement a proof of concept for Tapo-Control, but I'm not very familiar with HomeAssistant integrations. Maybe this method could be used alogside the existing ONVIF events for detecting motion.
Notes: The 2 files need to be under the same directory.
Archive.zip

@JurajNyiri
Copy link
Owner

JurajNyiri commented Apr 13, 2023

Thank you @AndreiArdelean1 . I played with the script, it had a bug where it was calculating incorrect start time for cameras in different timezone to UTC-0. I adjusted a couple of things and released new function getEvents to pytapo 3.1.11.

I am testing with following script:

from pytapo import Tapo
import time
from datetime import datetime
import os

# Camera
user = os.environ.get("user")  # admin user
password = os.environ.get("password")  # cloud password
host = os.environ.get("ip")  # ip of the camera, example: 192.168.1.52

tapo = Tapo(host, user, password, password)

epoch_time = int(time.time())
secondsFrom1970 = epoch_time

minSearchStart = secondsFrom1970 - (60 * 60)

searchStart = minSearchStart # can be used as opt parameter in tapo.getEvents()
searchEnd = secondsFrom1970 + 60  # maybe add a few seconds? # can be used as opt parameter in tapo.getEvents()

while True:
    events = tapo.getEvents()
    if events:
        lastEvent = events[-1]

        newLastEventDictionary = {
            'startTime': lastEvent["start_time"],
            'endTime': lastEvent["end_time"],
            'alarmType': lastEvent["alarm_type"],
        }
        print(datetime.now())
        print(lastEvent)
        print(datetime.fromtimestamp(newLastEventDictionary['startTime']))
        print(datetime.fromtimestamp(newLastEventDictionary['endTime']))
        print("")
    else:
        print("none")
    time.sleep(1)

I tested on 2 C200s. One HW V1.0 and another one 3.0. The 3.0 also has tapo cloud subscription.
I found that:

  • Events are not reported reliably, even if they are visible in the timeline of recordings.
  • Events are reported with start time in the future

I tested also with your script only to verify I haven't made any mistakes when writing the new function.

Could you try it and let me know if it works with your cameras?

@AndreiArdelean1
Copy link
Author

AndreiArdelean1 commented Apr 13, 2023

I get something like:

2023-04-13 15:57:14.501225
{'start_time': 1681390629, 'end_time': 1681390659, 'alarm_type': 2, 'startRelative': 4.0, 'endRelative': -26.0}
2023-04-13 15:57:09
2023-04-13 15:57:39
  • start time is always in the past (startRelative > 0)
  • for me, the events are received reliably. An event being a change in either start_time, end_time, or alarm_type of the last event

What I've noticed, if multiple sources (script and Tapo app) are requesting the events at once, one of them could return an empty list.

@AndreiArdelean1
Copy link
Author

Off-topic, but I'm not sure where I should post this:
All the possible values for alarm_type from searchDetectionList:

allKnownAlarmTypes = {
    1: "Timing",
    2: "Motion",
    3: "TAMPER",
    4: "Line Crossing",
    5: "Area Intrusion", 
    6: "Person",
    7: "Baby Cry",
    8: "Vehicle",
    9: "Pet",
    10: "Ring Alarm",
    11: "Dog Bark",
    12: "Cat Meow",
    13: "Alarm Glass",
    14: "Alarm Smoke",
    15: "Deliver Package",
    16: "Pickup Package",
    17: "Dollbell Ring Missed",
    18: "Dollbell Ring Answered",
    19: "Anti Theft",
}

I'm not sure which work, which don't, or what they mean. I've extracted them from the Android app.
The raw values:

1: TIMING 
2: MOTION 
3: TAMPER 
4: LINECROSS 
5: AREAINTRUSION 
6: HUMAN 
7: BABYCRY 
8: VEHICLE 
9: PET 
10: RINGALARM 
11: ALARMBARK 
12: ALARMMEOW 
13: ALARMGLASS 
14: ALARMSMOKE 
15: DELIVERPACKAGE 
16: PICKUPPACKAGE 
17: DOLLBELLRINGMISSED 
18: DOLLBELLRINGANSWERED 
19: ANTITHEFT 

@JurajNyiri
Copy link
Owner

@AndreiArdelean1 could you please test this script with the pytapo 3.1.13 to verify it still works? I think I managed to fix the timezone issue and it seems to be working fairly well now for me.

@AndreiArdelean1
Copy link
Author

It works!

@fightforlife
Copy link

fightforlife commented May 7, 2023

When I try to run the script above on the latest python docker image I get the following error:
File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 517, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='192.168.1.81', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1002)')))

Do you have a tip? Maybe it has something todo with the IP not being a hostname? Is there a way to set the request to insecure?

@rmtrane
Copy link

rmtrane commented Jun 6, 2023

@AndreiArdelean1 Just to clarify, you were able to extract the AI detected events (person, pet, vehicle, baby crying, etc.)? I was playing around for a minute with the getEvents function, but couldn't get it to work. Just wanted to make sure it would be worth the time to actually dive in... Thank you!

@AndreiArdelean1
Copy link
Author

AndreiArdelean1 commented Jun 7, 2023

Hey, yes, it is working. It did work for motion, person, and pet, but it wasn't working for tamper detection (Or I didn't manage to get it in my testing as that type of detection was a bit hard to trigger). Sounds detection (meow, bark, baby, glass break) I couldn't trigger the actual event during testing so I can't say if it is working. But, if an event is shown with the correct icon in the playback list in the official app, then you should also be able to detect it with this function.

You could:

  1. every x seconds request the most recent events. The downside is that it introduces a load on the camera, and since the camera has limited resources (CPU, memory, etc.) the official app may become unresponsive, and it may cause other unknown issues
  2. when an event is detected with ONVIF, wait for 1s (or a smaller amount of time to make sure the event registers) and request the latest event from the camera to get the actual event type.

I've only tested method 1. When investigating I had some issues with ONVIF so I couldn't test method 2.

@rmtrane
Copy link

rmtrane commented Jun 7, 2023

Thank you for letting me know! I'm mainly interested in the sounds detection, so might try to get this to work.

(In case you're interested, I have had success in triggering the events resulting in notifications through the Tapo app by simply using youtube videos of baby crying, dog barking, etc.)

@JurajNyiri Any plans to implement something like this in the Home Assistant integration? I will probably try to do something ad-hoc, but would be really cool to have this in the integration 😊

@jterrace
Copy link

jterrace commented Feb 6, 2025

@distante do you see anything in home assistant logs for the C200? What we want to see are messages like "No registered handler for event from". Though I'd be surprised if C200 sends different events than C210.

@distante
Copy link

distante commented Feb 7, 2025

@distante do you see anything in home assistant logs for the C200? What we want to see are messages like "No registered handler for event from". Though I'd be surprised if C200 sends different events than C210.

@jterrace just the regular HA Core logs? There I see nothing. I enabled Debug logs on the Tapo Control integration and then I download and I also did not found any "No registered handler" log, but I saw something

As part of the "raw" log from getCamData the C200 gets this with person_detection_enabled: None

'user': 'admin', 'basic_info': {'device_type': 'SMART.IPCAMERA', 'device_model': 'C200', 'device_name': 'C200 1.0', 'device_info': 'C200 1.0 IPC', 'hw_version': '1.0', 'sw_version': '1.3.16 Build 240909 Rel.37802n(4555)', 'device_alias': 'Sala', 'avatar': 'Fireplace', 'longitude': 109466, 'latitude': 495923, 'has_set_location_info': 1, 'features': '3', 'barcode': '', 'mac': '__EDITED__', 'dev_id': ''__EDITED__', 'oem_id': ''__EDITED__', 'hw_desc': ''__EDITED__'
  }, 'motion_detection_enabled': 'on', 'motion_detection_sensitivity': 'normal', 'motion_detection_digital_sensitivity': '60', 'timezone_timezone': 'UTC+01: 00', 'alert_event_types': None, 'timezone_zone_id': 'Europe/Amsterdam', 'timezone_timing_mode': 'ntp', 'person_detection_enabled': None, 'person_detection_sensitivity': None, 'vehicle_detection_enabled': None, 'vehicle_detection_sensitivity': None, 'babyCry_detection_enabled': 'on', 'babyCry_detection_sensitivity': 'normal', 'pet_detection_enabled': None, 'pet_detection_sensitivity': None, 'bark_detection_enabled': None, 'bark_detection_sensitivity': None, 'meow_detection_enabled': None, 'meow_detection_sensitivity': None, 'glass_detection_enabled': None, 'glass_detection_sensitivity': None, 'tamper_detection_enabled': None, 'tamper_detection_sensitivity': None, 'privacy_mode': 'off', 'notifications': 'on', 'rich_notifications': 'on', 'lens_distrotion_correction': 'off', 'light_frequency_mode': 'auto', 'night_vision_mode': None, 'night_vision_capability': None, 'night_vision_mode_switching': 'auto', 'force_white_lamp_state': None, 'smartwtl_digital_level': None, 'flood_light_config': None, 'flood_light_status': None, 'flood_light_capability': None, 'flip': 'off', 'alarm_user_start_id': None, 'alarm_user_sounds': None, 'alarm_config': {'typeOfAlarm': 'getAlarm', 'mode': ['sound'
    ], 'automatic': 'off', 'light_type': '1', 'siren_type': '0'

while the C210 gets

 'user': 'admin', 'basic_info': {'device_type': 'SMART.IPCAMERA', 'device_info': 'C210 2.0 IPC', 'features': 3, 'barcode': '', 'device_model': 'C210', 'sw_version': '1.4.4 Build 241211 Rel.42339n', 'device_name': 'C210 2.0', 'hw_version': '2.0', 'device_alias': 'Hobbyraum', 'mobile_access': '0', 'mac': '48-22-54-54-0F-81', 'dev_id': '__EDITED__', 'hw_id': ''__EDITED__', 'oem_id': ''__EDITED__', 'hw_desc': '00000000000000000000000000000000', 'manufacturer_name': 'TP-LINK', 'region': 'EU', 'ffs': False, 'is_cal': True, 'avatar': 'Cat tree', 'has_set_location_info': 1, 'longitude': 109466, 'latitude': 495924
  }, 'motion_detection_enabled': 'on', 'motion_detection_sensitivity': 'normal', 'motion_detection_digital_sensitivity': '50', 'timezone_timezone': 'UTC+01: 00', 'alert_event_types': [
    {'name': 'people_detection', 'enabled': 'on'
    },
    {'name': 'sound_detection', 'enabled': 'off'
    },
    {'name': 'motion_detection', 'enabled': 'on'
    },
    {'name': 'tamper_detection', 'enabled': 'on'
    }

I have the exact same config on both cameras though (in the app)

@distante
Copy link

distante commented Feb 7, 2025

Ahh, what I see different is that in the app, is that the C200 just has toggles for the detection types (movement, person, baby cry)

SmartSelect_20250207_080850_Tapo.jpg

And the C210 has the same but also a "detection zone" image preview (painted in red) and a "camera manipulation" toggle (in blue)

Screenshot_20250207_081309_Samsung capture.jpg

@distante
Copy link

distante commented Feb 7, 2025

I enabled internet access for some minutes to on one of my C200 cameras and when I am moving around I get Tapo App notification about Person Detection and Motion Detection, so the camera does detects it.

Could it be that C200 Hardware version 1 Does not expose them? Is this a TPLink issue?

@GSzabados
Copy link
Contributor

@distante, what is your expectation from the C200. You should have Cell Motion Detection and Motion Alarm as entities.

Baby crying is not sending onvif event as it was discussed before. The camera does not support anything else.

If you do not see those sensors then look at the integrations read me page, and look for the troubleshooting section regarding the Motion Detection sensors and webhooks and pullPoint for ONVIF.

@distante
Copy link

distante commented Feb 7, 2025

@GSzabados the camera has local Person Detection (says the app options) but they are not being transfer to HA and (when internet enabled) I get Person notifications from the Native app. Baby crying is not important for me.

My expectation was that the C200 also get the Person sensor.

The camera does not support anything else.

From where does this info comes?

Regards

@GSzabados
Copy link
Contributor

but they are not being transfer to HA and (when internet enabled)

No, you don't need internet for this. This is a local integration.

I think, I get what you mean, that there is no separate Person detected sensor. There was never for these cameras. Only Cell Motion Alarm and Motion Alarm.

As the Baby Cry is not sent as an onvif event, I guess it doesn't send the person detection either. So, yes, likely it is a Tapo/TP-Link issue.

I am tagging @JurajNyiri, because he has a C200 as I remember, so he can confirm this.

@jterrace, if you change any further emails with Tapo, would you mind to include this as well regarding the onvif events for the C200? I believe that is the case with the C100 as well, but need to cross check it.

@jterrace
Copy link

jterrace commented Feb 7, 2025

I can let TP-Link know that person detection isn't working on the C200 too, but can we get one more person to confirm first? Once we confirm, we should also start a thread on the TP-Link forums like we did for baby crying detection.

@tvgriffith
Copy link

C200 (Hw 1.0), 1.3.16 - Tapo App support for Motion, Person and Baby Crying sound. Onvif only supports Motion (checked with Happytime onvif client)

@tvgriffith
Copy link

For info I have the following cameras available

  • C225 (Hw 1.0) 1.0.30
  • C225 (Hw 2.0) 1.0.11
  • C110 (Hw 1.0) 1.3.14
  • C110 (Hw 2.0) 1.4.3
  • C120 (Hw 1.0) 1.2.3
  • C200 (Hw 1.0) 1.3.16
  • TC70 (Hw 1.0) 1.3.9
  • TC60 (Hw 1.0) 1.3.9

Let me know if I can help with any testing.

@jterrace
Copy link

jterrace commented Feb 7, 2025

Thanks for confirming! Does someone want to file a post on the forum like we did for baby crying here?
https://community.tp-link.com/en/smart-home/forum/topic/740844

I guess we could re-use the same post, but I think a separate post for C200 person makes more sense. Once someone files that (and we can all upvote it), I'll link it in my email to tp-link.

@tvgriffith
Copy link

tvgriffith commented Feb 7, 2025

Feature request to tapo to enable ONVIF support for Person detection on supported cameras...
https://community.tp-link.com/en/smart-home/forum/topic/744580

@jterrace
Copy link

jterrace commented Feb 7, 2025

Upvoted and sent an email update to TP-Link

@DavidAtImpactCubed
Copy link

Thank you so much - this is the feature I've always wanted from this integration!

@Lukimator
Copy link

Lukimator commented Feb 10, 2025

Weird, I have one C200 and three C220 and person detection works in all of them

I'm guessing my C200 isn't hardware 1.0 (Edit: Ok it says 5.0 in the app)

@distante
Copy link

Weird, I have one C200 and three C220 and person detection works in all of them

I'm guessing my C200 isn't hardware 1.0 (Edit: Ok it says 5.0 in the app)

Also hardware version 1?

@Lukimator
Copy link

Weird, I have one C200 and three C220 and person detection works in all of them
I'm guessing my C200 isn't hardware 1.0 (Edit: Ok it says 5.0 in the app)

Also hardware version 1?

No, version 5 as I wrote on my Edit

@tvgriffith
Copy link

I have just checked my C110 Cameras and note that H/w v2.0 (Firmware 1.4.3) is supporting Person detection in HA 2025.2, however H/w v1.0 (Firmware 1.3.14) does not.

@fir3burn
Copy link

I have updated hassio to 2025.2.1 to test person detection in my Tapo cameras with 6.0.10 version of the integration.
After the update, my 4 C210 cameras haven't added person detection sensors and the Tapo app sent the notifications.
The motion sensor works well now, and before the update.

I have deleted all the cameras from the integration (but no the integration itself), and added all of them, with the same result.

Hardware: 2.0
Firmware: 1.4.4 Build 241211

Some clue to investigate why the person detection sensor does not appear?
Thnx

@simon-bd
Copy link

@fir3burn i have a similar issue. I have both my main install and a dev. On the dev install I get person detection and on my main I don't get any.

Is there a specific file or line I could check in the custom component @jterrace

@JurajNyiri
Copy link
Owner

JurajNyiri commented Feb 11, 2025

@simon-bd is your main instance running on https and dev on http? With webhooks based onvif it does not work with https last I was debugging this.
It’s also documented under FAQ

@simon-bd
Copy link

@JurajNyiri internal url is http and external is nabu casa on custom url

@simon-bd
Copy link

@JurajNyiri but seems to be on the right track. The dev install is http only

@jterrace
Copy link

@fir3burn @simon-bd enable debug logging for onvif integration (see #304 (comment) above) and make sure that the webhook setup is working. If it's not working, you'll see a message about it failing to be set up with a fallback to pullpoint. You don't want to be using pullpoint.

@simon-bd
Copy link

i do have it enabled and stuff seem to be like they used to, i just still only have the Cell Motion Detection
Image

@jterrace
Copy link

Your screenshot there shows it using pullpoint, not webhook. Try restarting home assistant and look at the log on startup. It should try to set up webhook and it must be failing.

@simon-bd
Copy link

you are right, sorry if this is super simple...

Image

@jterrace
Copy link

Yep that looks like the correct start, is there more in the log? You should see something like "Switching to PullPoint for events" after some sort of error that caused the webhook to fail.

@fir3burn
Copy link

fir3burn commented Feb 11, 2025

Yeah, my url is https too.

This is my logs:

2025-02-11 18:27:09.751 DEBUG (MainThread) [homeassistant.components.onvif] Camara Planta Alta: Starting PullPoint manager
2025-02-11 18:27:09.796 DEBUG (MainThread) [homeassistant.components.onvif] Salon: Starting PullPoint manager
2025-02-11 18:27:10.569 DEBUG (MainThread) [homeassistant.components.onvif] Camara Azotea: Starting PullPoint manager
2025-02-11 18:27:11.314 DEBUG (MainThread) [homeassistant.components.onvif] Camara Garaje: Starting PullPoint manager
2025-02-11 18:27:17.005 ERROR (MainThread) [aiohttp.server] Error handling request from 192.168.98.33
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py", line 380, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "aiohttp/_http_parser.pyx", line 558, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadHttpMessage: 400, message:
Data after Connection: close:
b'\x00'
^
2025-02-11 18:27:18.603 ERROR (MainThread) [aiohttp.server] Error handling request from 192.168.98.33
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py", line 380, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "aiohttp/_http_parser.pyx", line 558, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadHttpMessage: 400, message:
Data after Connection: close:
b'\x00'
^
2025-02-11 18:27:18.762 DEBUG (MainThread) [homeassistant.components.onvif] Salon: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:27:19.440 DEBUG (MainThread) [homeassistant.components.onvif] Camara Planta Alta: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:27:19.798 ERROR (MainThread) [aiohttp.server] Error handling request from 192.168.98.33
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py", line 380, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "aiohttp/_http_parser.pyx", line 558, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadHttpMessage: 400, message:
Data after Connection: close:
b'\x00'
^
2025-02-11 18:27:20.239 DEBUG (MainThread) [homeassistant.components.onvif] Camara Azotea: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:27:20.692 DEBUG (MainThread) [homeassistant.components.onvif] Camara Garaje: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:27:20.919 ERROR (MainThread) [aiohttp.server] Error handling request from 192.168.98.33
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py", line 380, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "aiohttp/_http_parser.pyx", line 558, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadHttpMessage: 400, message:
Data after Connection: close:
b'\x00'
^
2025-02-11 18:27:22.195 ERROR (MainThread) [aiohttp.server] Error handling request from 192.168.98.33
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py", line 380, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "aiohttp/_http_parser.pyx", line 558, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadHttpMessage: 400, message:
Data after Connection: close:
b'\x00'
^
2025-02-11 18:27:46.808 DEBUG (MainThread) [homeassistant.components.onvif] Salon: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:27:46.809 DEBUG (MainThread) [homeassistant.components.onvif] Camara Garaje: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:27:46.814 DEBUG (MainThread) [homeassistant.components.onvif] Camara Planta Alta: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:27:46.821 DEBUG (MainThread) [homeassistant.components.onvif] Camara Azotea: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:27:47.561 DEBUG (MainThread) [homeassistant.components.onvif] Salon: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:27:47.571 DEBUG (MainThread) [homeassistant.components.onvif] Camara Garaje: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:27:47.581 DEBUG (MainThread) [homeassistant.components.onvif] Camara Planta Alta: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:27:47.586 DEBUG (MainThread) [homeassistant.components.onvif] Camara Azotea: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:28:12.662 DEBUG (MainThread) [homeassistant.components.onvif] Camara Azotea: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:28:13.169 DEBUG (MainThread) [homeassistant.components.onvif] Camara Garaje: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:28:13.173 DEBUG (MainThread) [homeassistant.components.onvif] Camara Planta Alta: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:28:13.301 DEBUG (MainThread) [homeassistant.components.onvif] Salon: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:28:13.413 DEBUG (MainThread) [homeassistant.components.onvif] Camara Azotea: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:28:13.921 DEBUG (MainThread) [homeassistant.components.onvif] Camara Garaje: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:28:13.932 DEBUG (MainThread) [homeassistant.components.onvif] Camara Planta Alta: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:28:14.052 DEBUG (MainThread) [homeassistant.components.onvif] Salon: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:28:38.662 DEBUG (MainThread) [homeassistant.components.onvif] Camara Azotea: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:28:39.171 DEBUG (MainThread) [homeassistant.components.onvif] Camara Planta Alta: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:28:39.181 DEBUG (MainThread) [homeassistant.components.onvif] Camara Garaje: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:28:39.341 DEBUG (MainThread) [homeassistant.components.onvif] Salon: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:28:39.418 DEBUG (MainThread) [homeassistant.components.onvif] Camara Azotea: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:28:39.922 DEBUG (MainThread) [homeassistant.components.onvif] Camara Planta Alta: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:28:39.935 DEBUG (MainThread) [homeassistant.components.onvif] Camara Garaje: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:28:40.092 DEBUG (MainThread) [homeassistant.components.onvif] Salon: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:29:05.170 DEBUG (MainThread) [homeassistant.components.onvif] Camara Garaje: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:29:05.175 DEBUG (MainThread) [homeassistant.components.onvif] Camara Planta Alta: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:29:05.292 DEBUG (MainThread) [homeassistant.components.onvif] Salon: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:29:05.662 DEBUG (MainThread) [homeassistant.components.onvif] Camara Azotea: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:29:05.921 DEBUG (MainThread) [homeassistant.components.onvif] Camara Garaje: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:29:05.934 DEBUG (MainThread) [homeassistant.components.onvif] Camara Planta Alta: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:29:06.044 DEBUG (MainThread) [homeassistant.components.onvif] Salon: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:29:06.414 DEBUG (MainThread) [homeassistant.components.onvif] Camara Azotea: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:29:31.172 DEBUG (MainThread) [homeassistant.components.onvif] Camara Garaje: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:29:31.175 DEBUG (MainThread) [homeassistant.components.onvif] Camara Planta Alta: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:29:31.293 DEBUG (MainThread) [homeassistant.components.onvif] Salon: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:29:31.663 DEBUG (MainThread) [homeassistant.components.onvif] Camara Azotea: PullPoint subscription encountered a remote protocol error (this is normal for some cameras): Server disconnected without sending a response.
2025-02-11 18:29:31.923 DEBUG (MainThread) [homeassistant.components.onvif] Camara Garaje: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:29:31.936 DEBUG (MainThread) [homeassistant.components.onvif] Camara Planta Alta: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:29:32.045 DEBUG (MainThread) [homeassistant.components.onvif] Salon: Pulling PullPoint messages timeout=0:01:00 limit=100
2025-02-11 18:29:32.415 DEBUG (MainThread) [homeassistant.components.onvif] Camara Azotea: Pulling PullPoint messages timeout=0:01:00 limit=100
etc etc etc...

(Edited to improve format)

@simon-bd
Copy link

this is what i see it set ups the webhook but unregisters from it almost instantly
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests