Instar IN-9408 2K+ with ipcamera binding

Maybe some other users had the chance to buy the latest Instar outdoor camera IN-9408 2K+ and tried to get them working with OH 3.3 and the ipcamera binding.
I already have the Instar IN-9008 FullHD and though that the new camera will work similar to this one. Unfortunately, it seems like the camera has some errors in the Onvif info but the mjpeg stream and jpg images didn’t work out of the box.

Finally, I found out, that I had two more information to the camera setup to get the stream and image working properly:

Thing ipcamera:instar:cameraBack "Kamera Hinten" @ "Home"

The information about the mjpegUrl and the snapshotUrl made the difference.

Now the snapshot is available under http://192.168.178.yy:8080/ipcamera/cameraBack/ipcamera.jpg and the mjpeg stream under http://192.168.178.yy:8080/ipcamera/cameraBack/ipcamera.mjpeg.

Note: 192.168.178.yy is the IP of my OH server while 92.168.178.xx is the IP of the camera.

Can you send to me via PM the trace level logs of when the camera tries to connect and come online please? Pause your other cameras when doing this and the console command is at the very top of the page for the bindings documentation on how to get trace level.

Hi @matt1, sorry for the late reply. Unfortunately, I cannot do this as I don’t have remote access to my instance and its already 1000km away from me.
I’ll do this next time.

You already sent all the logs that I need, I just needed time to reply…

GetSystemDateAndTime is not working for ONVIF for some reason (check the onvif port is correct) and since it is required to not be password protected, my best guess is that the camera needs to be using HTTPS or something is different in the ONVIF handshake for this camera, but this is only a guess. The reply back from the camera is 400 Bad Request. Since this one request fails, the binding does not try to connect further via ONVIF. But this is only stopping ONVIF from connecting and it is only really needed for moving PTZ cameras and the alarms, the rest just makes setup of the camera easier and you have already found you can manually provide the URLS and get it working.

Some other things I noticed from the logs.

  1. The snapshot does not reply with the content-length header, so the binding can not allocate ram efficiently due to this, if the binding can supply a working snapshot, then this can be ignored. Worth confirming this with curl in case it is a bug in the binding.

  2. You should not need to include the user and pass in the URL, if it works when it is removed that would be preferred. Its more secure if your network is compromised to not use the password in clear text. Additionally the password will make it into the logs. The binding should handle it automatically for you if you leave it off the urls, if that is not the case then let me know.

  3. The binding fails to setup the alarm server, so my guess is this camera does not have the same API implemented in it, or it is not implemented yet due to being such a new camera. This will mean no alarms and since ONVIF is not working you can not fall back to using that for the alarms. You should find the ffmpeg motion and audio alarms can be used until this is resolved.

  4. You have not supplied the RTSP url that the camera has via the ffmegInputUrl (?) in your textual config. Once you supply that, then the camera will work with more features.

  5. I’m interested to know if you have tried to get it to connect with Onvif Device Manager software? If it works with that, then we can look at capturing the traffic to look at what is different.

  6. Did the binding auto find the camera as an INSTAR brand or did you just go straight to using a thing file?

@lagom are you interested in trying out some changes for your camera? EDIT: they are now in the latest milestone build. I have implemented the Person, Vehicle and Animal Object detection channels that your Instar camera has. The motion and audio alarms are working again in this newer build of the binding.

Lastly the URLS and setup for the camera are:

UID: ipcamera:instar:192168138
label: instar38
thingTypeUID: ipcamera:instar
  mjpegOptions: -q:v 5 -r 2 -vf scale=640:-2 -update 1
  updateImageWhen: "0"
  gifPreroll: 0
  onvifPort: 0
  ffmpegLocation: /usr/bin/ffmpeg
  ipWhitelist: DISABLE
  mp4OutOptions: -c:v copy -c:a copy
  pollTime: 1000
  password: password123
  port: 80
  snapshotOptions: -an -vsync vfr -q:v 2 -update 1
  ptzContinuous: true
  onvifMediaProfile: 0
  ffmpegInput: rtsp://
  gifOutOptions: -r 2 -filter_complex
  hlsOutOptions: -strict -2 -f lavfi -i aevalsrc=0 -acodec aac -vcodec copy
    -hls_flags delete_segments -hls_time 2 -hls_list_size 4
  username: admin

Cool, thank you. I’ll test as soon as I have physical access to this instance again and let you know