Hi there, I’ve not experience with ONVIF so this may be a mistake on my configuration.
I’m trying to integrate a cheap Chinese camera to openhab 3.4. The camera have ONVIF activated with user and password set. It send the video through rtsp://xxx.xxx.xxx.xxx:554/realmonitor?channel=0&stream=0.sdp and VLC can reproduce the stream with that exact link or with authorization: rtsp://usr:pass@xxx.xxx.xxx.xxx:554/ Both work ok. VLC can reproduce them even through a ssh bridge from outside the LAN (with rtsp://127.0.0.1:554/realmonitor?channel=0&stream=0.sdp)
But the binding is giving me a security error (see log). It does not matter if I set a user and password or not. The log only changes in the rtsp link and the log cycles through this error changing thing status from online-offline-online-offline… (communication_error).
Does anybody have an idea of how can this be solved?
Thanks in advance.
EDIT: I forgot to specify that I wrote the rtsp URL exactly like in VLC, directly in the advanced options, as I’m not sure if the binding found it or not. And saving the stream as mp4 directly from ffmpeg CLI works ok.
2023-01-18 10:38:18.830 [DEBUG] [era.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:xxx.xxx.xxx.xxx:8080
2023-01-18 10:38:18.831 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connecting xxx.xxx.xxx.xxx to ONVIF
2023-01-18 10:38:18.831 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:GetSystemDateAndTime
2023-01-18 10:38:18.832 [DEBUG] [era.internal.handler.IpCameraHandler] - Binding has no snapshot url. Will use your CPU and FFmpeg to create snapshots from the cameras RTSP.
2023-01-18 10:38:18.832 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:-rtsp_transport tcp -threads 1 -skip_frame nokey -hide_banner -i rtsp://xxx.xxx.xxx.xxx:554/realmonitor?channel=0&stream=0.sdp -an -vsync vfr -q:v 2 -update 1 http://127.0.0.1:8080/ipcamera/192168151/snapshot.jpg
2023-01-18 10:38:18.863 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xs="http://www.w3.org/2000/10/XMLSchema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">
<soap:Body>
<soap:Fault>
<soap:Code>
<soap:Value>soap:Sender</soap:Value><soap:Subcode>
<soap:Value>wsse:InvalidSecurity</soap:Value>
</soap:Subcode>
</soap:Code>
<soap:Reason>
<soap:Text xml:lang="en">An error was discovered processing the wsse:Security header.</soap:Text>
</soap:Reason>
<soap:Node>http://www.w3.org/2003/05/soap-envelope/node/ultimateReceiver</soap:Node>
<soap:Role>http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver</soap:Role>
</soap:Fault>
</soap:Body>
</soap:Envelope>