No motion detection through ONVIF configuration in OpenHAB 5

The Tapo camera Modell C320WS is sending an IsMotion event to OpenHAB 5.0.2, but the rule for producing an .mp4 file is not processed.

With the same configuration I succeed to have a proper processing with my Tapo Modell C225 camera.

I had contacted the TP-Link Support already who analyzed my log files. Thjey came back with the result, that both Tapo Cameras do support the ONVIF Profile S protocol. Also they stated, that my cameras are functioning properly.

They recommended to contact the OpenHAB support for further help.

Attached I’m sending you the event- and Logfiles from OpenHAB for both cameras.

For each camera I provoked a motion event.

Camera with failure:

251106_14:00_debug_events_Tapo_Aussen_Cam1_fail.pdf (12.9 KB)

251106_14:00_debug_log_Tapo_Aussen_Cam1_fail.pdf (257.2 KB)

Camera with success:

251106_debug_events_Tapo_Innen_Cam1_success.pdf (14.3 KB)

251106_debug_log_Tapo_Innen_Cam1_success.pdf (90.7 KB)

In case of failure the event-log shows an immediate status change of the MotionAlarm from NULL to OFF and no more status changes:

Event Log:
2025-11-06 14:00:24.710 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item
‘Aussen_Cam1_ffmpegMotionAlarm’ changed from NULL to OFF

OpenHAB Log File

2025-11-06 14:00:40.774 [DEBUG] [amera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/CellMotionDetector/Motion, Data name: IsMotion, Data value: true
2025-11-06 14:00:40.774 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: PullMessages to http://192.168.178.157:1024/event-1024_1024
2025-11-06 14:00:40.794 [TRACE] [amera.internal.onvif.OnvifConnection] - ONVIF PullMessages reply is:

No execution of rule !

#####################################################################################################################################################################

Positive Camera with execution of rules:
Event Log
2025-11-06 14:37:46.101 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Innen_Cam1_ffmpegMotionAlarm’ changed from NULL to OFF
2025-11-06 14:37:49.656 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Innen_Cam1_ffmpegMotionAlarm’ changed from OFF to ON
2025-11-06 14:37:51.097 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Date’ changed from 2025-11-06T14:36:51.092+0100 to 2025-11-06T14:37:51.093+0100
2025-11-06 14:37:56.171 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Innen_Cam1_ffmpegMotionAlarm’ changed from ON to OFF

OpenHAB Log
2025-11-06 14:37:49.713 [INFO ] [org.openhab.core.model.script.Test ] - Alarm Innen Camera 1
2025-11-06 14:37:49.715 [TRACE] [amera.internal.onvif.OnvifConnection] - ONVIF PullMessages reply is:
<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=“Search - Microsoft Bing 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”>SOAP-ENV:Header<wsa5:To SOAP-ENV:mustUnderstand=“true”>http://192.168.178.159:1024/event-1024_1024</wsa5:To><wsa5:Action SOAP-ENV:mustUnderstand=“true”>http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesResponse</wsa5:Action></SOAP-ENV:Header>SOAP-ENV:Bodytev:PullMessagesResponsetev:CurrentTime2025-11-06T13:37:48Z</tev:CurrentTime>tev:TerminationTime2025-11-06T13:47:46Z</tev:TerminationTime>wsnt:NotificationMessagewsnt:SubscriptionReferencewsa5:Address</wsa5:Address></wsnt:SubscriptionReference><wsnt:Topic Dialect=“http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet”>tns1:RuleEngine/CellMotionDetector/Motion</wsnt:Topic>wsnt:Message<tt:Message PropertyOperation=“Initialized” UtcTime=“2025-11-06T13:37:48Z”>tt:Source<tt:SimpleItem Value=“vsconf” Name=“VideoSourceConfigurationToken”></tt:SimpleItem><tt:SimpleItem Value=“VideoAnalyticsToken” Name=“VideoAnalyticsConfigurationToken”></tt:SimpleItem><tt:SimpleItem Value=“MyMotionDetectorRule” Name=“Rule”></tt:SimpleItem></tt:Source>tt:Data<tt:SimpleItem Value=“true” Name=“IsMotion”></tt:SimpleItem></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></tev:PullMessagesResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

2025-11-06 14:37:49.716 [DEBUG] [amera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/CellMotionDetector/Motion, Data name: IsMotion, Data value: true
2025-11-06 14:37:49.717 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: PullMessages to http://192.168.178.159:1024/event-1024_1024
2025-11-06 14:37:49.721 [DEBUG] [ng.ipcamera.internal.IpCameraActions] - Recording 25-11-06_14-37-49.mp4 for 5 seconds.
2025-11-06 14:37:49.722 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now: -y -t 5 -hide_banner -loglevel warning -rtsp_transport tcp -i rtsp://TapoCamIn1:********@192.168.178.159:554/stream2 -t 20 -vcodec copy /var/tmp/TapoInnen1Camera/25-11-06_14-37-49.mp4

Configuration Information:

251106_Tapo_Cameras_Configuration.pdf (15.6 KB)

Reply from TP_Link:

We would like to confirm that Tapo Cameras do support the ONVIF Profile S protocol. However, please note that compatibility may vary depending on the specific ONVIF client being used. Based on our analysis, the Tapo Camera is functioning properly.

In the logs around timestamps 17:20:53 and 17:20:54, we observed the following:

An ONVIF motion start event was successfully sent by the camera and received by openHAB:

ONVIF Event Topic: RuleEngine/CellMotionDetector/Motion, Data name: IsMotion, Data value: true

tt:Data<tt:SimpleItem Value=“true” Name=“IsMotion”></tt:SimpleItem></tt:Data>

- Event Topic: RuleEngine/CellMotionDetector/Motion

- Data: IsMotion = true

A subsequent motion stop event was also sent and recognized:

tt:Data<tt:SimpleItem Value=“false” Name=“IsMotion”></tt:SimpleItem></tt:Data>

ONVIF Event Topic: RuleEngine/CellMotionDetector/Motion, Data name: IsMotion, Data value: false

- Event Topic: RuleEngine/CellMotionDetector/Motion

- Data: IsMotion = false

This indicates that the camera is correctly sending motion detection events via ONVIF.

Since the camera is operating as expected, we recommend reaching out to the openHAB support team with the relevant logs for further investigation on their side.

Please let us know if you need any additional assistance.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.