Finally, I borrowed a Dahua camera DH-IPC-HDW2431TP-AS-S2 to test. As manufacturer said itās an Onvif Profile S/Profile G/Profile T compliant device. In the binding this camera can be recognized and work as both Onvif and Dahua thing types, and I tried both.
In the things file I have:
Thing ipcamera:dahua:Dahua_Test @ "Livingroom" [
ipAddress="192.168.0.234",
username="admin",
password="secret",
snapshotUrl="http://192.168.0.234/cgi-bin/snapshot.cgi?Channel=1"
]
I switch between ādahuaā and āonvifā thing, with each thing I test the camera alarm, record GIF, unplug then re-plug the power, and the results are:
With Onvif thing: When camera is working, if connection is lost (at 2022-09-08 21:27:40 in the log) then binding will try to re-connect and camera will go alive again (at 2022-09-08 21:28:48), but camera cannot trigger alarm and recording anymore.
==> /var/log/openhab/openhab.log <==
2022-09-08 21:26:38.028 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:PullMessages
2022-09-08 21:26:44.526 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><tev:PullMessagesResponse><tev:CurrentTime>2022-09-08T13:26:34Z</tev:CurrentTime><tev:TerminationTime>2022-09-08T13:27:29Z</tev:TerminationTime></tev:PullMessagesResponse></s:Body></s:Envelope>
2022-09-08 21:26:44.527 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:Renew
2022-09-08 21:26:44.542 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><wsnt:RenewResponse><wsnt:TerminationTime>2022-09-08T13:27:35Z</wsnt:TerminationTime><wsnt:CurrentTime>2022-09-08T13:26:35Z</wsnt:CurrentTime></wsnt:RenewResponse></s:Body></s:Envelope>
2022-09-08 21:26:44.543 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:PullMessages
2022-09-08 21:26:49.776 [DEBUG] [ipcamera.internal.MyNettyAuthHandler] - Camera at IP:192.168.0.234 gave a reply with a response code of :500
2022-09-08 21:26:51.036 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><tev:PullMessagesResponse><tev:CurrentTime>2022-09-08T13:26:41Z</tev:CurrentTime><tev:TerminationTime>2022-09-08T13:27:35Z</tev:TerminationTime></tev:PullMessagesResponse></s:Body></s:Envelope>
2022-09-08 21:26:51.037 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:Renew
2022-09-08 21:26:51.049 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><wsnt:RenewResponse><wsnt:TerminationTime>2022-09-08T13:27:42Z</wsnt:TerminationTime><wsnt:CurrentTime>2022-09-08T13:26:42Z</wsnt:CurrentTime></wsnt:RenewResponse></s:Body></s:Envelope>
2022-09-08 21:26:51.051 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:PullMessages
==> /var/log/openhab/openhab.log <==
2022-09-08 21:26:57.546 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><tev:PullMessagesResponse><tev:CurrentTime>2022-09-08T13:26:47Z</tev:CurrentTime><tev:TerminationTime>2022-09-08T13:27:42Z</tev:TerminationTime></tev:PullMessagesResponse></s:Body></s:Envelope>
2022-09-08 21:26:57.548 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:Renew
2022-09-08 21:26:57.561 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><wsnt:RenewResponse><wsnt:TerminationTime>2022-09-08T13:27:48Z</wsnt:TerminationTime><wsnt:CurrentTime>2022-09-08T13:26:48Z</wsnt:CurrentTime></wsnt:RenewResponse></s:Body></s:Envelope>
2022-09-08 21:26:57.563 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:PullMessages
2022-09-08 21:26:58.396 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><tev:PullMessagesResponse><tev:CurrentTime>2022-09-08T13:26:49Z</tev:CurrentTime><tev:TerminationTime>2022-09-08T13:27:48Z</tev:TerminationTime><wsnt:NotificationMessage><wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/CellMotionDetector/Motion</wsnt:Topic><wsnt:Message><tt:Message UtcTime="2022-09-08T13:26:49Z" PropertyOperation="Changed"><tt:Source><tt:SimpleItem Name="VideoSourceConfigurationToken" Value="00000"/><tt:SimpleItem Name="VideoAnalyticsConfigurationToken" Value="00000"/><tt:SimpleItem Name="Rule" Value="00000"/></tt:Source><tt:Data><tt:SimpleItem Name="IsMotion" Value="true"/></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></tev:PullMessagesResponse></s:Body></s:Envelope>
2022-09-08 21:26:58.397 [DEBUG] [amera.internal.onvif.OnvifConnection] - Onvif Event Topic:RuleEngine/CellMotionDetector/Motion, Data:IsMotion, Value:true
2022-09-08 21:26:58.399 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:Renew
2022-09-08 21:26:58.412 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><wsnt:RenewResponse><wsnt:TerminationTime>2022-09-08T13:27:49Z</wsnt:TerminationTime><wsnt:CurrentTime>2022-09-08T13:26:49Z</wsnt:CurrentTime></wsnt:RenewResponse></s:Body></s:Envelope>
2022-09-08 21:26:58.415 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:PullMessages
2022-09-08 21:26:58.429 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><tev:PullMessagesResponse><tev:CurrentTime>2022-09-08T13:26:49Z</tev:CurrentTime><tev:TerminationTime>2022-09-08T13:27:49Z</tev:TerminationTime><wsnt:NotificationMessage><wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:VideoSource/MotionAlarm</wsnt:Topic><wsnt:Message><tt:Message UtcTime="2022-09-08T13:26:49Z" PropertyOperation="Changed"><tt:Source><tt:SimpleItem Name="Source" Value="00000"/></tt:Source><tt:Data><tt:SimpleItem Name="State" Value="true"/></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></tev:PullMessagesResponse></s:Body></s:Envelope>
2022-09-08 21:26:58.431 [DEBUG] [amera.internal.onvif.OnvifConnection] - Onvif Event Topic:VideoSource/MotionAlarm, Data:State, Value:true
2022-09-08 21:26:58.432 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:Renew
==> /var/log/openhab/events.log <==
2022-09-08 21:26:58.438 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'DahuaMotionAlarm' changed from OFF to ON
==> /var/log/openhab/openhab.log <==
2022-09-08 21:26:58.447 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><wsnt:RenewResponse><wsnt:TerminationTime>2022-09-08T13:27:49Z</wsnt:TerminationTime><wsnt:CurrentTime>2022-09-08T13:26:49Z</wsnt:CurrentTime></wsnt:RenewResponse></s:Body></s:Envelope>
2022-09-08 21:26:58.449 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:PullMessages
2022-09-08 21:26:59.024 [DEBUG] [ng.ipcamera.internal.IpCameraActions] - Recording ipcamera.gif for 5 seconds.
2022-09-08 21:26:59.026 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:-y -t 5 -hide_banner -loglevel warning -rtsp_transport tcp -i rtsp://admin:********@192.168.0.234:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif -r 2 -filter_complex scale=-2:360:flags=lanczos,setpts=0.5*PTS,split[o1][o2];[o1]palettegen[p];[o2]fifo[o3];[o3][p]paletteuse /var/lib/openhab/ipcamera/Dahua_Test/ipcamera.gif
==> /var/log/openhab/events.log <==
2022-09-08 21:26:59.033 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'DahuaRecordingGif' changed from 0 to 5
==> /var/log/openhab/openhab.log <==
2022-09-08 21:27:00.735 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Guessed Channel Layout for Input Stream #0.1 : mono
2022-09-08 21:27:01.010 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [swscaler @ 0x1e778e0] deprecated pixel format used, make sure you did set range correctly
2022-09-08 21:27:04.944 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><tev:PullMessagesResponse><tev:CurrentTime>2022-09-08T13:26:55Z</tev:CurrentTime><tev:TerminationTime>2022-09-08T13:27:49Z</tev:TerminationTime></tev:PullMessagesResponse></s:Body></s:Envelope>
2022-09-08 21:27:04.947 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:Renew
2022-09-08 21:27:04.970 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><wsnt:RenewResponse><wsnt:TerminationTime>2022-09-08T13:27:55Z</wsnt:TerminationTime><wsnt:CurrentTime>2022-09-08T13:26:55Z</wsnt:CurrentTime></wsnt:RenewResponse></s:Body></s:Envelope>
2022-09-08 21:27:04.972 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:PullMessages
2022-09-08 21:27:04.998 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><tev:PullMessagesResponse><tev:CurrentTime>2022-09-08T13:26:55Z</tev:CurrentTime><tev:TerminationTime>2022-09-08T13:27:55Z</tev:TerminationTime><wsnt:NotificationMessage><wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/CellMotionDetector/Motion</wsnt:Topic><wsnt:Message><tt:Message UtcTime="2022-09-08T13:26:55Z" PropertyOperation="Changed"><tt:Source><tt:SimpleItem Name="VideoSourceConfigurationToken" Value="00000"/><tt:SimpleItem Name="VideoAnalyticsConfigurationToken" Value="00000"/><tt:SimpleItem Name="Rule" Value="00000"/></tt:Source><tt:Data><tt:SimpleItem Name="IsMotion" Value="false"/></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></tev:PullMessagesResponse></s:Body></s:Envelope>
2022-09-08 21:27:05.000 [DEBUG] [amera.internal.onvif.OnvifConnection] - Onvif Event Topic:RuleEngine/CellMotionDetector/Motion, Data:IsMotion, Value:false
2022-09-08 21:27:05.002 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:Renew
2022-09-08 21:27:05.041 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><wsnt:RenewResponse><wsnt:TerminationTime>2022-09-08T13:27:56Z</wsnt:TerminationTime><wsnt:CurrentTime>2022-09-08T13:26:56Z</wsnt:CurrentTime></wsnt:RenewResponse></s:Body></s:Envelope>
2022-09-08 21:27:05.043 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:PullMessages
2022-09-08 21:27:05.072 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><tev:PullMessagesResponse><tev:CurrentTime>2022-09-08T13:26:56Z</tev:CurrentTime><tev:TerminationTime>2022-09-08T13:27:56Z</tev:TerminationTime><wsnt:NotificationMessage><wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:VideoSource/MotionAlarm</wsnt:Topic><wsnt:Message><tt:Message UtcTime="2022-09-08T13:26:55Z" PropertyOperation="Changed"><tt:Source><tt:SimpleItem Name="Source" Value="00000"/></tt:Source><tt:Data><tt:SimpleItem Name="State" Value="false"/></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></tev:PullMessagesResponse></s:Body></s:Envelope>
2022-09-08 21:27:05.075 [DEBUG] [amera.internal.onvif.OnvifConnection] - Onvif Event Topic:VideoSource/MotionAlarm, Data:State, Value:false
2022-09-08 21:27:05.078 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:Renew
==> /var/log/openhab/events.log <==
2022-09-08 21:27:05.080 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'DahuaMotionAlarm' changed from ON to OFF
==> /var/log/openhab/openhab.log <==
2022-09-08 21:27:05.106 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><wsnt:RenewResponse><wsnt:TerminationTime>2022-09-08T13:27:56Z</wsnt:TerminationTime><wsnt:CurrentTime>2022-09-08T13:26:56Z</wsnt:CurrentTime></wsnt:RenewResponse></s:Body></s:Envelope>
2022-09-08 21:27:05.108 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:PullMessages
==> /var/log/openhab/openhab.log <==
2022-09-08 21:27:11.615 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><tev:PullMessagesResponse><tev:CurrentTime>2022-09-08T13:27:01Z</tev:CurrentTime><tev:TerminationTime>2022-09-08T13:27:56Z</tev:TerminationTime></tev:PullMessagesResponse></s:Body></s:Envelope>
2022-09-08 21:27:11.617 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:Renew
2022-09-08 21:27:11.630 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><wsnt:RenewResponse><wsnt:TerminationTime>2022-09-08T13:28:02Z</wsnt:TerminationTime><wsnt:CurrentTime>2022-09-08T13:27:02Z</wsnt:CurrentTime></wsnt:RenewResponse></s:Body></s:Envelope>
2022-09-08 21:27:11.632 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:PullMessages
==> /var/log/openhab/openhab.log <==
2022-09-08 21:27:16.163 [DEBUG] [amera.internal.servlet.CameraServlet] - GET:/ipcamera.gif, received from 192.168.0.206
2022-09-08 21:27:16.173 [DEBUG] [amera.internal.servlet.CameraServlet] - GET:/ipcamera.gif, received from 192.168.0.206
2022-09-08 21:27:18.125 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><tev:PullMessagesResponse><tev:CurrentTime>2022-09-08T13:27:08Z</tev:CurrentTime><tev:TerminationTime>2022-09-08T13:28:02Z</tev:TerminationTime></tev:PullMessagesResponse></s:Body></s:Envelope>
2022-09-08 21:27:18.128 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:Renew
2022-09-08 21:27:18.147 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><wsnt:RenewResponse><wsnt:TerminationTime>2022-09-08T13:28:09Z</wsnt:TerminationTime><wsnt:CurrentTime>2022-09-08T13:27:09Z</wsnt:CurrentTime></wsnt:RenewResponse></s:Body></s:Envelope>
2022-09-08 21:27:18.149 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:PullMessages
==> /var/log/openhab/openhab.log <==
2022-09-08 21:27:24.644 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><tev:PullMessagesResponse><tev:CurrentTime>2022-09-08T13:27:14Z</tev:CurrentTime><tev:TerminationTime>2022-09-08T13:28:09Z</tev:TerminationTime></tev:PullMessagesResponse></s:Body></s:Envelope>
2022-09-08 21:27:24.648 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:Renew
2022-09-08 21:27:24.661 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><wsnt:RenewResponse><wsnt:TerminationTime>2022-09-08T13:28:15Z</wsnt:TerminationTime><wsnt:CurrentTime>2022-09-08T13:27:15Z</wsnt:CurrentTime></wsnt:RenewResponse></s:Body></s:Envelope>
2022-09-08 21:27:24.664 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:PullMessages
==> /var/log/openhab/openhab.log <==
2022-09-08 21:27:28.559 [DEBUG] [amera.internal.servlet.CameraServlet] - GET:/ipcamera.gif, received from 192.168.0.206
2022-09-08 21:27:28.559 [DEBUG] [amera.internal.servlet.CameraServlet] - GET:/ipcamera.gif, received from 192.168.0.206
==> /var/log/openhab/openhab.log <==
2022-09-08 21:27:31.167 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><tev:PullMessagesResponse><tev:CurrentTime>2022-09-08T13:27:21Z</tev:CurrentTime><tev:TerminationTime>2022-09-08T13:28:15Z</tev:TerminationTime></tev:PullMessagesResponse></s:Body></s:Envelope>
2022-09-08 21:27:31.169 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:Renew
2022-09-08 21:27:31.182 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header/><s:Body><wsnt:RenewResponse><wsnt:TerminationTime>2022-09-08T13:28:22Z</wsnt:TerminationTime><wsnt:CurrentTime>2022-09-08T13:27:22Z</wsnt:CurrentTime></wsnt:RenewResponse></s:Body></s:Envelope>
2022-09-08 21:27:31.184 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:PullMessages
==> /var/log/openhab/openhab.log <==
2022-09-08 21:27:40.227 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:Unsubscribe
2022-09-08 21:27:40.233 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connecting 192.168.0.234 to ONVIF
2022-09-08 21:27:40.235 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:GetSystemDateAndTime
==> /var/log/openhab/events.log <==
2022-09-08 21:27:40.241 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'ipcamera:onvif:Dahua_Test' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached.
==> /var/log/openhab/openhab.log <==
2022-09-08 21:27:40.282 [DEBUG] [amera.internal.onvif.OnvifConnection] - Camera is not reachable on ONVIF port:80 or the port may be wrong.
2022-09-08 21:27:42.301 [DEBUG] [amera.internal.onvif.OnvifConnection] - Eventloop is shutdown:true
2022-09-08 21:27:44.240 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:27:50.264 [DEBUG] [amera.internal.onvif.OnvifConnection] - Camera is not reachable on ONVIF port:80 or the port may be wrong.
==> /var/log/openhab/openhab.log <==
2022-09-08 21:27:52.243 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:28:00.245 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:28:08.248 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:28:16.251 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:28:24.252 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:28:32.254 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:28:40.255 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
2022-09-08 21:28:48.257 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
2022-09-08 21:28:48.268 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.234:80/cgi-bin/snapshot.cgi?Channel=1
==> /var/log/openhab/events.log <==
2022-09-08 21:28:48.269 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'ipcamera:onvif:Dahua_Test' changed from OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached. to ONLINE
==> /var/log/openhab/openhab.log <==
2022-09-08 21:28:48.870 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.234:80/cgi-bin/snapshot.cgi?Channel=1
==> /var/log/openhab/openhab.log <==
2022-09-08 21:29:03.919 [DEBUG] [ipcamera.internal.MyNettyAuthHandler] - Camera at IP:192.168.0.234 gave a reply with a response code of :500
==> /var/log/openhab/openhab.log <==
2022-09-08 21:29:25.517 [DEBUG] [amera.internal.servlet.CameraServlet] - GET:/ipcamera.gif, received from 192.168.0.206
2022-09-08 21:29:25.521 [DEBUG] [amera.internal.servlet.CameraServlet] - GET:/ipcamera.gif, received from 192.168.0.206
2022-09-08 21:29:49.307 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'PZEM_Power' changed from 335 to 305
2022-09-08 21:29:49.309 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'PZEM_Today_Consumption' changed from 7.178 to 7.179
2022-09-08 21:29:49.312 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'PZEM_Power_Factor' changed from 0.92 to 0.94
2022-09-08 21:29:49.314 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'PZEM_Total_Consumption' changed from 278.773 to 278.774
2022-09-08 21:29:49.316 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'PZEM_Current' changed from 1.626 to 1.441
2022-09-08 21:29:49.341 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'This_Month_Power_Cost' changed from 617509.79424 to 617512.53312
2022-09-08 21:29:52.560 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Linh_Lastseen' changed from 2022-09-08T21:29:22.234+0700 to 2022-09-08T21:29:52.554+0700
2022-09-08 21:29:53.105 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Binh_Lastseen' changed from 2022-09-08T21:29:22.879+0700 to 2022-09-08T21:29:53.098+0700
^C
With Dahua thing: The same situation as Onvif, when camera lost connection (at 2022-09-08 21:19:21) binding re-connected (2022-09-08 21:21:01) and camera can trigger alarm and recording as normal.
==> /var/log/openhab/openhab.log <==
:
2022-09-08 21:18:18.991 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Guessed Channel Layout for Input Stream #0.1 : mono
2022-09-08 21:18:19.232 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [swscaler @ 0x268d2e0] deprecated pixel format used, make sure you did set range correctly
2022-09-08 21:18:21.691 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:41
Code=VideoMotionInfo;action=State;index=0
:
2022-09-08 21:18:22.741 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:41
Code=VideoMotionInfo;action=State;index=0
:
2022-09-08 21:18:26.311 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:41
Code=VideoMotionInfo;action=State;index=0
:
2022-09-08 21:18:26.521 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:41
Code=VideoMotionInfo;action=State;index=0
:
2022-09-08 21:18:26.941 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:41
Code=VideoMotionInfo;action=State;index=0
:
2022-09-08 21:18:28.202 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:41
Code=VideoMotionInfo;action=State;index=0
:
==> /var/log/openhab/openhab.log <==
2022-09-08 21:18:31.561 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:41
Code=VideoMotionInfo;action=State;index=0
:
2022-09-08 21:18:31.980 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:41
Code=VideoMotionInfo;action=State;index=0
:
2022-09-08 21:18:33.451 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:41
Code=VideoMotionInfo;action=State;index=0
:
2022-09-08 21:18:37.634 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:95
Code=VideoMotion;action=Stop;index=0;data={
"Id" : [ 0 ],
"RegionName" : [ "Region1" ]
}
:
==> /var/log/openhab/events.log <==
2022-09-08 21:18:37.639 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'DahuaMotionAlarm' changed from ON to OFF
==> /var/log/openhab/openhab.log <==
2022-09-08 21:18:47.724 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:148
Code=RtspSessionDisconnect;action=Start;index=0;data={
"Device" : "192.168.0.206",
"StreamType" : "Main",
"UserAgent" : " Lavf58.20.100"
}
:
==> /var/log/openhab/openhab.log <==
2022-09-08 21:19:03.228 [DEBUG] [amera.internal.servlet.CameraServlet] - GET:/ipcamera.gif, received from 192.168.0.206
2022-09-08 21:19:03.233 [DEBUG] [amera.internal.servlet.CameraServlet] - GET:/ipcamera.gif, received from 192.168.0.206
==> /var/log/openhab/openhab.log <==
2022-09-08 21:19:21.030 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connecting 192.168.0.234 to ONVIF
==> /var/log/openhab/events.log <==
2022-09-08 21:19:21.031 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'ipcamera:dahua:Dahua_Test' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached.
==> /var/log/openhab/openhab.log <==
2022-09-08 21:19:21.032 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:GetSystemDateAndTime
2022-09-08 21:19:21.036 [INFO ] [era.internal.handler.IpCameraHandler] - The alarm stream was not running for camera 192.168.0.234, re-starting it now
2022-09-08 21:19:21.101 [DEBUG] [amera.internal.onvif.OnvifConnection] - Eventloop is shutdown:true
2022-09-08 21:19:25.036 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:19:31.059 [DEBUG] [amera.internal.onvif.OnvifConnection] - Camera is not reachable on ONVIF port:80 or the port may be wrong.
2022-09-08 21:19:33.038 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:19:41.039 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:19:49.041 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:19:57.043 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:20:05.045 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:20:13.047 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:20:21.049 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
2022-09-08 21:20:29.051 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:20:37.053 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:20:45.055 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:20:53.057 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
==> /var/log/openhab/openhab.log <==
2022-09-08 21:21:01.059 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.234:80
2022-09-08 21:21:01.069 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.234:80/cgi-bin/snapshot.cgi?Channel=1
==> /var/log/openhab/events.log <==
2022-09-08 21:21:01.070 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'ipcamera:dahua:Dahua_Test' changed from OFFLINE (COMMUNICATION_ERROR): Connection Timeout: Check your IP and PORT are correct and the camera can be reached. to ONLINE
==> /var/log/openhab/openhab.log <==
2022-09-08 21:21:01.166 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.234:80/cgi-bin/snapshot.cgi?Channel=1
2022-09-08 21:21:02.075 [INFO ] [era.internal.handler.IpCameraHandler] - The alarm stream was not running for camera 192.168.0.234, re-starting it now
2022-09-08 21:21:02.083 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.234:80/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2022-09-08 21:21:02.126 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.234:80/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2022-09-08 21:21:06.476 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:69
Code=SystemState;action=Pulse;index=0;data={
"State" : "Active"
}
:
2022-09-08 21:21:06.480 [DEBUG] [era.internal.handler.IpCameraHandler] - Unrecognised Dahua event, Code=SystemState, action=Pulse
==> /var/log/openhab/openhab.log <==
2022-09-08 21:21:15.004 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:41
Code=VideoMotionInfo;action=State;index=0
:
2022-09-08 21:21:15.098 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:96
Code=VideoMotion;action=Start;index=0;data={
"Id" : [ 0 ],
"RegionName" : [ "Region1" ]
}
:
==> /var/log/openhab/events.log <==
2022-09-08 21:21:15.102 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'DahuaMotionAlarm' changed from OFF to ON
==> /var/log/openhab/openhab.log <==
2022-09-08 21:21:15.109 [DEBUG] [ng.ipcamera.internal.IpCameraActions] - Recording ipcamera.gif for 5 seconds.
2022-09-08 21:21:15.111 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:-y -t 5 -hide_banner -loglevel warning -rtsp_transport tcp -i rtsp://admin:********@192.168.0.234:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif -r 2 -filter_complex scale=-2:360:flags=lanczos,setpts=0.5*PTS,split[o1][o2];[o1]palettegen[p];[o2]fifo[o3];[o3][p]paletteuse /var/lib/openhab/ipcamera/Dahua_Test/ipcamera.gif
==> /var/log/openhab/events.log <==
2022-09-08 21:21:15.115 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'DahuaRecordingGif' changed from 0 to 5
==> /var/log/openhab/openhab.log <==
2022-09-08 21:21:16.351 [DEBUG] [ipcamera.internal.MyNettyAuthHandler] - Camera at IP:192.168.0.234 gave a reply with a response code of :500
2022-09-08 21:21:16.418 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:41
Code=VideoMotionInfo;action=State;index=0
:
==> /var/log/openhab/openhab.log <==
2022-09-08 21:21:17.528 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Guessed Channel Layout for Input Stream #0.1 : mono
2022-09-08 21:21:17.774 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - [swscaler @ 0x120c4a0] deprecated pixel format used, make sure you did set range correctly
==> /var/log/openhab/openhab.log <==
2022-09-08 21:21:21.188 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:95
Code=VideoMotion;action=Stop;index=0;data={
"Id" : [ 0 ],
"RegionName" : [ "Region1" ]
}
:
==> /var/log/openhab/events.log <==
2022-09-08 21:21:21.194 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'DahuaMotionAlarm' changed from ON to OFF
==> /var/log/openhab/openhab.log <==
2022-09-08 21:21:33.105 [DEBUG] [amera.internal.servlet.CameraServlet] - GET:/ipcamera.gif, received from 192.168.0.206
2022-09-08 21:21:33.107 [DEBUG] [amera.internal.servlet.CameraServlet] - GET:/ipcamera.gif, received from 192.168.0.206
==> /var/log/openhab/openhab.log <==
2022-09-08 21:21:39.404 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:75
Code=InterVideoAccess;action=Pulse;index=0;data={
"Type" : "WebLogin"
}
:
2022-09-08 21:21:39.405 [DEBUG] [era.internal.handler.IpCameraHandler] - Unrecognised Dahua event, Code=InterVideoAccess, action=Pulse
2022-09-08 21:21:44.106 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result back from camera is :--myboundary
Content-Type: text/plain
Content-Length:148
Code=RtspSessionDisconnect;action=Start;index=0;data={
"Device" : "192.168.0.206",
"StreamType" : "Main",
"UserAgent" : " Lavf58.20.100"
}
:
2022-09-08 21:21:44.587 [DEBUG] [amera.internal.servlet.CameraServlet] - GET:/ipcamera.gif, received from 192.168.0.206
2022-09-08 21:21:44.590 [DEBUG] [amera.internal.servlet.CameraServlet] - GET:/ipcamera.gif, received from 192.168.0.206
==> /var/log/openhab/events.log <==
2022-09-08 21:21:44.881 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'DahuaRecordingGif' changed from 5 to 0
^C
So the issue seems to happen only with Onvif thing, not with Dahua thing? Or am I missing some Onvif configuration? Thank you for your patience