Neye3C configuration with ipcamera binding

  • Platform information:
    • Hardware: _Intel Core i5 -7400/RAM 8GB/700GB
    • OS: Windows 10 Pro
    • Java Runtime Environment: jre 1.8.0.181
    • openHAB version: openhab-2.5.3
  • Issue of the topic:
    I am trying to configure the Neye3C G6 model with ipcamera binding.
    I do not have documentation about this camera and what I have learnt was by trial and error.
    I am working in windows 10 and use Paper UI to configure Things and Items. I use HABPanel to create Panels.
    I have tried two solutions with different achievements and failures
    First trial with HTTPONLY type ID
    The configuration that I have:
    “SERVER_PORT”: 50011,
    “FFMPEG_LOCATION”: “C:\Program Files\ffmpeg-4.2.2-win64-static\bin\ffmpeg.exe”,
    “PORT”: 80,
    “FFMPEG_OUTPUT”: “c:\cameratmpfs\camera1\”,
    “IPADDRESS”: “192.168.0.20”,
    “IP_WHITELIST”: “DISABLE”,
    “UPDATE_IMAGE”: true,
    “GIF_POSTROLL”: 8,
    “FFMPEG_GIF_OUT_ARGUMENTS”: “-r 2 -filter_complex scale\u003d-2:360:flags\u003dlanczos,setpts\u003d0.5*PTS,split[o1][o2];[o1]palettegen[p];[o2]fifo[o3];[o3][p]paletteuse”,
    “GIF_PREROLL”: 0,
    “IMAGE_UPDATE_EVENTS”: 1,
    “FFMPEG_MJPEG_ARGUMENTS”: “-qscale:v 5 -r 6 -update 1”,
    “PASSWORD”: “xxxxxxx”,
    “FFMPEG_INPUT”: “rtsp://admin:xxxxxxx@192.168.0.20:8554/profile0”,
    “POLL_CAMERA_MS”: 2000,
    “USERNAME”: “admin”,
    “FFMPEG_HLS_OUT_ARGUMENTS”: “-strict -2 -f lavfi -i aevalsrc\u003d0 -acodec aac -vcodec copy -hls_flags delete_segments -hls_time 2 -hls_list_size 4”
    What works well:
  1. I have been able to configure the widget CameraFed whith the URL http://192.168.0.165:50011/ipcamera.mjpeg and I see the camera images, I see in the log that start ffmpeg whith the commad
18:21:23.064 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:C:\Program Files\ffmpeg-4.2.2-win64-static\bin\ffmpeg.exe -rtsp_transport tcp -i rtsp://admin:xxxxxxx@192.168.0.20:8554/profile0 -qscale:v 5 -r 6 -update 1 http://127.0.0.1:50011/ipcamera.jpg

And I see that stops when I leave the Panel , Great!!

  1. Update the Image functionality
    When I turn on this functionality a see that start ffmpeg, this is the command
18:34:23.812 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:C:\Program Files\ffmpeg-4.2.2-win64-static\bin\ffmpeg.exe -rtsp_transport tcp -threads 1 -skip_frame nokey -i rtsp://admin:xxxxxxxx@192.168.0.20:8554/profile0 -an -vsync vfr -update 1 http://127.0.0.1:50011/snapshot.jpg

And I am able to configure the widget Image with the URL http://localhost:50011/ipcamera.jpg. Also when I switch off, then ffmpeg stops. Great!!
Now what doesn’t work:
If I configure the Image widget with an update interval, i.e. 4 sec., I see the image, but after 4 seconds the image disappears, this is the log

18:39:57.617 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   GET:/ipcamera.jpg?_t=2020-04-10T16:39:57.610Z
18:39:57.619 [WARN ] [ipcamera.internal.StreamServerHandler] - Exception caught from stream server:{}
java.io.FileNotFoundException: c:\cameratmpfs\camera1\ipcamera.jpg?_t=2020-04-10T16:39:57.610Z (El nombre de archivo, el nombre de directorio o la sintaxis de la etiqueta del volumen no son correctos)

It seems that when the widget tries to refresh the image, it send the GET command to OpenHab WebServer, and it try to find the image at c:\cameratmpfs\camera1\ipcamera.jpg.
But in the directory there isn’t. In fact I don’t see any command at log file to order ffmpeg to store the image in this directory.
How can I get that the web server do not search the image at the file system, but at the RAM, as it does the first time?

  1. Motion Alarm
    If I move the Motion Alarm Timer, it starts again ffmpeg and this is the command
19:01:00.729 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:C:\Program Files\ffmpeg-4.2.2-win64-static\bin\ffmpeg.exe -rtsp_transport tcp -i rtsp://admin:xxxxxxx@192.168.0.20:8554/profile0 -an -vf select='gte(scene,0.0017)',metadata=print -f null –

And it detects the motion, and activate the Motion Alarm, Works well, Great!!!

  1. Create animated gif, works well, this is the commant in log file:
21:39:52.612 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:C:\Program Files\ffmpeg-4.2.2-win64-static\bin\ffmpeg.exe -y -t 8 -rtsp_transport tcp -i rtsp://admin:xxxxxxx@192.168.0.20:8554/profile0 -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 c:\cameratmpfs\camera1\ipcamera.gif
  1. Pan and tilt: With HTTPONLY type I do not have the possibility to move the camera. It doesn’t have this channels.

With type ID ONVIF
My camera doesn’t have snapshot functionality.
This is the configuration that I have

          "SERVER_PORT": 50012,
          "FFMPEG_LOCATION": "C:\\Program Files\\ffmpeg-4.2.2-win64-static\\bin\\ffmpeg.exe",
          "ONVIF_MEDIA_PROFILE": 0,
          "PORT": 80,
          "FFMPEG_OUTPUT": "C:\\cameratmpfs\\camera1\\",
          "IPADDRESS": "192.168.0.20",
          "IP_WHITELIST": "DISABLE",
          "UPDATE_IMAGE": false,
          "ONVIF_PORT": "80",
          "GIF_POSTROLL": 8,
          "FFMPEG_GIF_OUT_ARGUMENTS": "-r 2 -filter_complex scale\u003d-2:360:flags\u003dlanczos,setpts\u003d0.5*PTS,split[o1][o2];[o1]palettegen[p];[o2]fifo[o3];[o3][p]paletteuse",
          "GIF_PREROLL": 0,
          "IMAGE_UPDATE_EVENTS": 0,
          "FFMPEG_MJPEG_ARGUMENTS": "-qscale:v 5 -r 6 -update 1",
          "PASSWORD": "xxxxxxx",
          "SNAPSHOT_URL_OVERRIDE": "/onvif/",
          "POLL_CAMERA_MS": 2000,
          "USERNAME": "admin",
          "FFMPEG_HLS_OUT_ARGUMENTS": "-strict -2 -f lavfi -i aevalsrc\u003d0 -acodec aac -vcodec copy -hls_flags delete_segments -hls_time 2 -hls_list_size 4"

As the camera do not answer when the Thing try to initialize:
Status: OFFLINE - CONFIGURATION_ERROR Camera failed to report a valid Snaphot URL, try over-riding the Snapshot URL auto detection by entering a known URL.
I set the SNAPSHOT_URL_OVERRIDE: /onvif/
Although I now the camera will not answer.
What works well:

  1. It works the Pan and tilt. Great!!
21:33:33.096 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Trying to move with new PTZ Absolute move.
21:33:33.183 [DEBUG] [hab.binding.ipcamera.onvif.PTZRequest] - We got an ONVIF ptz response:<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:e="http://www.w3.org/2003/05/soap-encoding" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tr2="http://www.onvif.org/ver20/media/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:axt="http://www.onvif.org/ver20/analytics" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:wsrf-rw="http://docs.oasis-open.org/wsrf/rw-2" xmlns:wsntw="http://docs.oasis-open.org/wsn/bw-2" xmlns:ter="http://www.onvif.org/ver10/error" ><s:Body><tptz:AbsoluteMoveResponse /></s:Body></s:Envelope>
  1. Doesn’t work Image Update functionality
    As it understands that the camera has snapshot functionality, this is the result:
21:36:01.438 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.20/onvif/

But as I said, the camera doesn’t have this feature, so it will not answer.
Is there a way to configure the Thing with the same behaviour that the Type ID HTTPONLY, I mean, to use ffmpeg to achieve the rtsp thread and send the snapshot to the web server, similar to this command?

18:34:23.812 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:C:\Program Files\ffmpeg-4.2.2-win64-static\bin\ffmpeg.exe -rtsp_transport tcp -threads 1 -skip_frame nokey -i rtsp://admin:xxxxxxxx@192.168.0.20:8554/profile0 -an -vsync vfr -update 1 http://127.0.0.1:50011/snapshot.jpg
  1. Create animated gif, works well, this is the command in log file:
21:49:00.788 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:C:\Program Files\ffmpeg-4.2.2-win64-static\bin\ffmpeg.exe -y -t 8 -rtsp_transport tcp -i rtsp://admin:xxxxxxx@192.168.0.20:8554/profile0 -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 C:\cameratmpfs\camera1\ipcamera.gif
  1. Motion Alarm doesn’t work: the command has a mistake
    This is the command that create, and it has an error
21:50:39.091 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:C:\Program Files\ffmpeg-4.2.2-win64-static\bin\ffmpeg.exe -rtsp_transport tcp -i rtsp://admin:xxxxxxx@192.168.0.20:8554/profile0 -an -vf select='gte(scene,0.0013)',metadata=printnull -f null –

The correct one should be: metadata=print -f null –
So the result is this:

21:50:42.264 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Error reinitializing filters!
21:50:42.264 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Failed to inject frame into filter network: Invalid argument
21:50:42.264 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Error while processing the decoded data for stream #0:0
21:50:42.264 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Conversion failed!

There is some way to solve this?

  1. Audio Alarm: doesn’t work
    This is the command that create, an it has an error
21:55:35.884 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:C:\Program Files\ffmpeg-4.2.2-win64-static\bin\ffmpeg.exe -rtsp_transport tcp -i rtsp://admin:xxxxxxx@192.168.0.20:8554/profile0 -af silencedetect=n=-12dB:d=2 -vnnull -f null –

So the result is:

21:55:35.982 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Unrecognized option 'vnnull'.
21:55:35.983 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Error splitting the argument list: Option not found

There is some way to solve this?

Sorry for the message so long but I understand that in this way you will understand better my questions.
I appreciate the help you could give me.

Sorry only just saw this post.

How did you add the camera? With paper ui or by textual config?

It is possible this is a bug
Or it may be necessary to delete and re-add the camera if you used paperUI due to the addition of the extra arguments and the way paperUI stores things in the database. Textual config is easier when changes like that occur as it is automatic and a delete and re add is not needed.

Hi matt1
Thank you for your answer.
I added the camera by Paper UI.
Do you recommend me to do it by textual config, things and items?

Yes I recommend textual otherwise this is the kind of issue you can see whenever a new config is added and you don’t delete and readd all your cameras. When the binding stops changing there won’t be any issue using paperUI. This is written at least two times in the readme.

Your issue stems from the new config that was added in the last build.

@Manuel_Alonso
I have not tested the features so it could be a bug, or by moving to textual config your issue will be solved which will prove it was the database storage did not match the bindings config parameters. Either way by moving to textual config it will make it far easier to move to the previous build where it wont be an issue, and then easier to move forward once the cause has been found should it be a bug.

@matt1
Thanks for your advise, I’ll try to use the textual config and check if I have the same results.
I’ll put the results asap.

I have deleted the previus Things (HTTPONLY and ONVIF)
I have created by textual config files Things and Items this are my files

ipcamera.things

Thing ipcamera:HTTPONLY:Neye3CHTTPONLY "Neye3CHTTPONLY" @ "Camaras"
[
    IPADDRESS="192.168.0.20",
    PASSWORD="XXXXXXX",
    USERNAME="admin",
    PORT=80,
    POLL_CAMERA_MS=1000,
    SERVER_PORT=50013,
    UPDATE_IMAGE=false,
    GIF_PREROLL=0,
    GIF_POSTROLL=6,
    //SNAPSHOT_URL_OVERRIDE="http://192.168.1.181/capture",
    //STREAM_URL_OVERRIDE="http://192.168.0.20:80/stream",
    FFMPEG_OUTPUT="c:\\cameratmpfs\\camera1\\",
    FFMPEG_INPUT="rtsp://admin:XXXXXX@192.168.0.20:8554/profile0",
    FFMPEG_LOCATION="C:\\Program Files\\ffmpeg-4.2.2-win64-static\\bin\\ffmpeg.exe",
    IMAGE_UPDATE_EVENTS=1
]

ipcamera.items

// Neye3CHTTPONLY "Neye3CHTTPONLY" @ "Camaras"

Image Neye3CHTTPONLYImage "Snaphot" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:HTTPONLY:Neye3CHTTPONLY:image" }
Dimmer Neye3CHTTPONLYMotionControl "Motion Threshold [%d]" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:HTTPONLY:Neye3CHTTPONLY:controlMotionAlarm" }
Switch Neye3CHTTPONLYMotionAlarm "Motion detected" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:HTTPONLY:Neye3CHTTPONLY:motionAlarm" }
Dimmer Neye3CHTTPONLYAudioThreshold "Audio Threshold [%d]" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:HTTPONLY:Neye3CHTTPONLY:thresholdAudioAlarm" }
Switch Neye3CHTTPONLYAudioAlarm "Audio detected" (Camaras) ["Camaras"] { channel="ipcamera:HTTPONLY:Neye3CHTTPONLY:audioAlarm" }
Switch Neye3CHTTPONLYCreateGif "Create animated GIF" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:HTTPONLY:Neye3CHTTPONLY:updateGif" }
String Neye3CHTTPONLYMjpegStreamUrl "Mjpeg Stream" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:HTTPONLY:Neye3CHTTPONLY:streamUrl" }
String Neye3CHTTPONLYRTSPStreamUrl "RTSP Stream" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:HTTPONLY:Neye3CHTTPONLY:rtspUrl" }
String Neye3CHTTPONLYHlsStreamUrl "HLS Stream" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:HTTPONLY:Neye3CHTTPONLY:hlsUrl" }
String Neye3CHTTPONLYImageUrl "Image Url" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:HTTPONLY:Neye3CHTTPONLY:imageUrl" }
Switch Neye3CHTTPONLYUpdateImageNow "Update Image Now" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:HTTPONLY:Neye3CHTTPONLY:updateImageNow" }
String Neye3CHTTPONLYLastMotionType "Last Motion Type" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:HTTPONLY:Neye3CHTTPONLY:lastMotionType" }
Switch Neye3CHTTPONLYStartHLS "Start HLS" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:HTTPONLY:Neye3CHTTPONLY:startStream" }

I am analysing the first problem I had with widget Image at HABPanel and the refresh problem
I have the same result that I had with the previus configuration with PanelUI
The configuration of Image Widget
URL: http://192.168.0.165:50013/ipcamera.jpg
Update Interval: 4 sg
No cache utilization

What I can see at log file (Karaf):

Initialy I can see the image in the widget, this is the log:

17:51:52.378 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   GET:/ipcamera.jpg
17:51:52.389 [DEBUG] [ipcamera.internal.StreamServerHandler] - Closing a StreamServerHandler.
17:51:52.932 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - frame=   11 fps=0.1 q=24.8 size=N/A time=00:02:05.12 bitra

But 4 seconds later, this is the result:

17:51:56.382 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   GET:/ipcamera.jpg?_t=2020-04-19T15:51:56.369Z
17:51:56.391 [WARN ] [ipcamera.internal.StreamServerHandler] - Exception caught from stream server:{}
java.io.FileNotFoundException: c:\cameratmpfs\camera1\ipcamera.jpg?_t=2020-04-19T15:51:56.369Z (El nombre de archivo, el nombre de directorio o la sintaxis de la etiqueta del volumen no son correctos)
        at java.io.RandomAccessFile.open0(Native Method) ~[?:1.8.0_181]
        at java.io.RandomAccessFile.open(Unknown Source) ~[?:1.8.0_181]
        at java.io.RandomAccessFile.<init>(Unknown Source) ~[?:1.8.0_181]

My questions are:

  1. Why the request after the first one has this other format?
    GET:/ipcamera.jpg?_t=2020-04-19T15:51:56.369Z

What does it means? Is it requesting the ipcarmera.jpg with a timestamp update?
I am at Spain TimeZone, as you can see in the log when arrives the request, the local hour is 17:51:56.382
I suppose the request is UTC time.

  1. Why the server try to find the image at file system and not in the RAM as it does the first time?

  2. My I change in same way this behaviour?

Regarding the topic:

With textual config the problem is solved, now the command is created correctly:

19:34:38.280 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:C:\Program Files\ffmpeg-4.2.2-win64-static\bin\ffmpeg.exe -rtsp_transport tcp -i rtsp://admin:XXXXXXX@192.168.0.20:8554/profile0 -an -vf select='gte(scene,0.0012)',metadata=print -f null -

and it work correctly.
Even the Audio Alarm works well.

19:45:27.435 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:C:\Program Files\ffmpeg-4.2.2-win64-static\bin\ffmpeg.exe -rtsp_transport tcp -i rtsp://admin:XXXXXXX@192.168.0.20:8554/profile0 -af silencedetect=n=-17dB:d=2 -vn -f null -

Thanks @matt1 for the suggestion.

I appreciate any help you could give me regarding the snapshop update problem.

Thanks for confirming it was the way openhab stores the configs in a database. That is why textual config is better IMHO.

The first half of your post is a bug that requires a change in the code, easily fixed as it is a regression. The time code is the browser asking for a refresh, not all browsers do that but it needs to be supported. Thank you for reporting it.

EDIT:
@Manuel_Alonso
New build is now uploaded for you to test if this is fixed.

Do you mean OH 2.5.4 ?
I have upgraded to this version but I have the same result

16:46:26.305 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   GET:/ipcamera.jpg
16:46:26.315 [DEBUG] [ipcamera.internal.StreamServerHandler] - Closing a StreamServerHandler.
16:46:30.294 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   GET:/ipcamera.jpg?_t=2020-04-23T14:46:30.277Z
16:46:30.311 [WARN ] [ipcamera.internal.StreamServerHandler] - Exception caught from stream server:{}
java.io.FileNotFoundException: c:\cameratmpfs\camera1\ipcamera.jpg?_t=2020-04-23T14:46:30.277Z (El nombre de archivo, el nombre de directorio o la sintaxis de la etiqueta del volumen no son correctos)
        at java.io.RandomAccessFile.open0(Native Method) ~[?:1.8.0_251]
        at java.io.RandomAccessFile.open(Unknown Source) ~[?:1.8.0_251]
        at java.io.RandomAccessFile.<init>(Unknown Source) ~[?:1.8.0_251]

The link to the jar is found in this post along with the readme.

Thank you, I didn’t remind to have done to install the binding.
Now it works well :ok_hand:

23:07:57.019 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   GET:/ipcamera.jpg?_t=2020-04-23T21:07:57.011Z
23:07:57.030 [DEBUG] [ipcamera.internal.StreamServerHandler] - Closing a StreamServerHandler.
23:08:05.375 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   POST:/snapshot.jpg
23:08:05.377 [DEBUG] [ipcamera.internal.StreamServerHandler] - Closing a StreamServerHandler.
23:08:09.018 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   GET:/ipcamera.jpg?_t=2020-04-23T21:08:09.003Z
23:08:09.031 [DEBUG] [ipcamera.internal.StreamServerHandler] - Closing a StreamServerHandler.
23:08:17.948 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   POST:/snapshot.jpg
23:08:17.948 [DEBUG] [ipcamera.internal.StreamServerHandler] - Closing a StreamServerHandler.
2

I consider the problem is solved. Thank you very much.
Only one more question, how I can change the frecuency that ffmpeg ejecutes the POST? I see that it does every 12 seconds. It is possible to change this frecuency?
I can’t identify any parameter in the Thing about that.
this is the command I see when ffmpeg is started:

23:03:54.567 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:C:\Program Files\ffmpeg-4.2.2-win64-static\bin\ffmpeg.exe -rtsp_transport tcp -threads 1 -skip_frame nokey -hide_banner -loglevel warning -i rtsp://admin:XXXXX@192.168.0.20:8554/profile0 -an -vsync vfr -update 1 http://127.0.0.1:50013/snapshot.jpg
23:03:55.001 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - [hevc @ 000001f68e5bf180] Invalid NAL unit 0, skipping.
23:03:57.106 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   GET:/ipcamera.jpg?_t=2020-04-23T21:03:57.106Z
23:03:57.121 [DEBUG] [ipcamera.internal.StreamServerHandler] - Closing a StreamServerHandler.
23:03:57.793 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] -     Last message repeated 5 times
23:03:57.824 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Guessed Channel Layout for Input Stream #0.1 : mono
23:03:57.855 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - [hevc @ 000001f68e5d5d00] Invalid NAL unit 0, skipping.
23:03:57.871 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] -     Last message repeated 2 times
23:03:57.871 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - [swscaler @ 000001f68e84d440] deprecated pixel format used, make sure you did set range correctly
23:03:57.918 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   POST:/snapshot.jpg
23:03:57.918 [DEBUG] [ipcamera.internal.StreamServerHandler] - Closing a StreamServerHandler.

Regarding the model and condiguration:
My model is Neye3C Q6
and I have post the textual config files for Thing HTTPONLY,
I’ll post the files for ONVIF type
Thing:

Thing ipcamera:ONVIF:Neye3CONVIF "Neye3CONVIF" @ "Camaras"
[
    IPADDRESS="192.168.0.20",
    PASSWORD="XXXXXX",
    USERNAME="admin",
    ONVIF_PORT=80,
    PORT=80,
    UPDATE_IMAGE=false,
    SERVER_PORT=50014,
    POLL_CAMERA_MS=2000,
    IMAGE_UPDATE_EVENTS=0,
    UPDATE_IMAGE=false,
    SNAPSHOT_URL_OVERRIDE="http://192.168.0.20/capture",
    FFMPEG_HLS_OUT_ARGUMENTS="-f lavfi -i aevalsrc=0 -acodec aac -vcodec copy -hls_flags delete_segments -segment_list_flags live -flags -global_header",
    FFMPEG_GIF_OUT_ARGUMENTS="-filter_complex fps=4,scale=480:-2:flags=lanczos,setpts=0.25*PTS,split[o1][o2];[o1]palettegen[p];[o2]fifo[o3];[o3][p]paletteuse",
    GIF_PREROLL=0,
    GIF_POSTROLL=8,
    FFMPEG_OUTPUT="c:\\cameratmpfs\\camera2\\",
    FFMPEG_LOCATION = "C:\\Program Files\\ffmpeg-4.2.2-win64-static\\bin\\ffmpeg.exe"
]

Items

// Neye3CONVIF "Neye3CONVIF" @ "Camaras"

Image Neye3CONVIFImage "Snaphot" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:image" }
Dimmer Neye3CONVIFMotionControl "Motion Threshold [%d]" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:controlMotionAlarm" }
Dimmer Neye3CONVIFPan "Pan [%d]" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:pan" }
Dimmer Neye3CONVIFTilt "Tilt [%d]" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:tilt" }
Dimmer Neye3CONVIFZoom "Zoom [%d]" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:zoom" }
Number Neye3CONVIFGotoPreset "Goto Preset [%d]" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:gotoPreset" }
Switch Neye3CONVIFMotionAlarm "Motion detected" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:motionAlarm" }
Switch Neye3CONVIFExternalMotion "External Motion" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:externalMotion" }
Dimmer Neye3CONVIFAudioThreshold "Audio Threshold [%d]" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:thresholdAudioAlarm" }
Switch Neye3CONVIFAudioAlarm "Audio detected" (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:audioAlarm" }
Switch Neye3CONVIFCreateGif "Create animated GIF" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:updateGif" }
String Neye3CONVIFMjpegStreamUrl "Mjpeg Stream" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:streamUrl" }
String Neye3CONVIFRTSPStreamUrl "RTSP Stream" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:rtspUrl" }
String Neye3CONVIFHlsStreamUrl "HLS Stream" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:hlsUrl" }
String Neye3CONVIFImageUrl "Image Url" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:imageUrl" }
Switch Neye3CONVIFUpdateImageNow "Update Image Now" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:updateImageNow" }
String Neye3CONVIFLastMotionType "Last Motion Type" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:lastMotionType" }
Switch Neye3CONVIFStartHLS "Start HLS" <ipcamera> (Camaras) ["Camaras"] { channel="ipcamera:ONVIF:Neye3CONVIF:startStream" }

Regarding the ONVIF, it works Pan, Tilt. (not zoom)
Do not work the update Image Now, as I said previously, I have to put SNAPSHOT_URL_OVERRIDE=“http://192.168.0.20/capture”, because it does not have this functionality to allow to Initialize the Thing. Perharps could be an option to initialize the thing even when the Thing do not respont to auto discover the URL, in this way it would be possible to use ffmpeg to obtain snapshot as Httponly does. (only to suggest an improvement in the binding). :wink:

Thank you very much for your contribution to this big project!!!

It depends… Does your camera allow you to change how often a KEYFRAME aka iFRAME is produced? The binding will only use keyframes to keep the cpu load as low as possible and some cameras don’t allow this to be changed. The cameras control panel and manual should be check for this setting. This also has an effect on HLS streams so if your camera is above 1 keyframe every 2 seconds the HLS probably wont work.

Yes that is a good idea as not all cameras follow onvif 100%. I consider that a bug in your camera as it is a requirement to have snapshots if you call a camera ONVIF. I would need to add the ability to force the use of ffmpeg and that should be easy to do.

Hi @matt1

I am sorry but I do not have technical information of the camera, I am not able to answer this question.

If you decide to add this feature, please, let me know, I would be willing to test it.

It is already added and is not tested so would be great to hear if it does or does not work. It is NOT uploaded yet, I should upload a new build over the next few days once I have made a few more changes to make a build worth while.

SNAPSHOT_URL_OVERRIDE="ffmpeg"

Use that to force the use of ffmpeg when setting up as an ONVIF thing type.

I have instaled the new version but seems it doesn’t work.

I have this configuration

Thing ipcamera:ONVIF:Neye3CONVIF "Neye3CONVIF" @ "Camaras"
[
    IPADDRESS="192.168.0.20",
    PASSWORD="xxxxxxx",
    USERNAME="admin",
    ONVIF_PORT=80,
    PORT=80,
    UPDATE_IMAGE=false,
    SERVER_PORT=50014,
    POLL_CAMERA_MS=2000,
    IMAGE_UPDATE_EVENTS=0,
    UPDATE_IMAGE=false,
    SNAPSHOT_URL_OVERRIDE="ffmpeg",
    FFMPEG_HLS_OUT_ARGUMENTS="-f lavfi -i aevalsrc=0 -acodec aac -vcodec copy -hls_flags delete_segments -segment_list_flags live -flags -global_header",
    FFMPEG_GIF_OUT_ARGUMENTS="-filter_complex fps=4,scale=480:-2:flags=lanczos,setpts=0.25*PTS,split[o1][o2];[o1]palettegen[p];[o2]fifo[o3];[o3][p]paletteuse",
    GIF_PREROLL=0,
    GIF_POSTROLL=8,
    FFMPEG_OUTPUT="c:\\cameratmpfs\\camera2\\",
    FFMPEG_LOCATION = "C:\\Program Files\\ffmpeg-4.2.2-win64-static\\bin\\ffmpeg.exe"
]

When I open the HABPanel with the widget Image with this configuration
URL = http://192.168.0.165:50014/ipcamera.jpg
interval = 4 seconds

This is the log

20:57:00.386 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.20ffmpeg
20:57:02.019 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   GET:/ipcamera.jpg
20:57:02.021 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.20ffmpeg
20:57:02.032 [DEBUG] [ipcamera.internal.StreamServerHandler] - No jpg in ram to send
20:57:02.388 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.20ffmpeg
20:57:04.392 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.20ffmpeg
20:57:06.037 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   GET:/ipcamera.jpg?_t=2020-04-29T18:57:06.029Z
20:57:06.039 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.20ffmpeg
20:57:06.045 [DEBUG] [ipcamera.internal.StreamServerHandler] - No jpg in ram to send

it seems is not starting ffmpeg

Make that equal 1 or remove the line asn1 is default.

@matt1
I changed the configuration removing the line IMAGE_UPDATE_EVENTS and making it equal 1 with the same result
I copy the new log

18:45:20.307 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
18:45:22.318 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
18:45:24.307 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
18:45:26.306 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
18:45:27.962 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   GET:/ipcamera.jpg
18:45:28.155 [DEBUG] [ipcamera.internal.StreamServerHandler] - Closing a StreamServerHandler.
18:45:28.308 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
18:45:30.315 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
18:45:31.952 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   GET:/ipcamera.jpg?_t=2020-04-30T16:45:31.940Z
18:45:31.961 [DEBUG] [ipcamera.internal.StreamServerHandler] - Closing a StreamServerHandler.
18:45:32.315 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
18:45:34.319 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg

I can’t see the a command to start ffmpeg in the log as in other features

  1. Make sure you do have the latest JAR version
  2. clean the cache and tmp, search forum for how.
  3. Restart openhab 3 times.
  4. Retest.

I have tested it and it works here. I suspect you are not using the latest jar or the old jar is running from cache as I am 99% sure it is impossible for that to occur as I have read the code over multiple times looking for a bug.

1 Like

@matt1 Thanks for the response.

I have version org.openhab.binding.ipcamera-2.5.4-SNAPSHOT.jar 28/04/2020 22:09
I cleaned cache and tmp and restarted 3 times

I’ll try to explain what I have seen.
The new version works well but only under some conditions.
When I start OpenHAB and I have “Update Image Now=True”, then the behabiour is correct, this is the log:

18:57:35.306 [INFO ] [ding.ipcamera.handler.IpCameraHandler] - Binding has no snapshot url. Using your CPU and Ffmpeg to create snapshots.
18:57:35.306 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:C:\Program Files\ffmpeg-4.2.2-win64-static\bin\ffmpeg.exe -rtsp_transport tcp -threads 1 -skip_frame nokey -hide_banner -loglevel warning -i rtsp://admin:xxxxx@192.168.0.16:8554/profile0 -an -vsync vfr -update 1 http://127.0.0.1:50014/snapshot.jpg
18:57:35.685 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - [hevc @ 000001c0189df140] Invalid NAL unit 0, skipping.
18:57:38.525 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] -     Last message repeated 5 times
18:57:38.525 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Guessed Channel Layout for Input Stream #0.1 : mono
18:57:38.540 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - [hevc @ 000001c018a6c4c0] Invalid NAL unit 0, skipping.
18:57:38.587 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] -     Last message repeated 2 times
18:57:38.587 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - [swscaler @ 000001c018c7a2c0] deprecated pixel format used, make sure you did set range correctly
18:57:38.650 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   POST:/snapshot.jpg
18:57:38.681 [DEBUG] [ipcamera.internal.StreamServerHandler] - Closing a StreamServerHandler.
18:57:48.509 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   POST:/snapshot.jpg
18:57:48.509 [DEBUG] [ipcamera.internal.StreamServerHandler] - Closing a StreamServerHandler.

In this case I can switch on and off “Update image now” and it works well.
But when I start openHAB with Update Image Now=false, this is the result

19:11:11.025 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Possible NIC/IP match found:192.168.0.14
19:11:11.027 [INFO ] [ding.ipcamera.handler.IpCameraHandler] - IpCamera file server for camera 192.168.0.16 has started on port 50014 for all NIC's.
19:11:11.040 [INFO ] [ding.ipcamera.handler.IpCameraHandler] - IP Camera at 192.168.0.16 is now online.
19:11:11.244 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   GET:/ipcamera.jpg?_t=2020-05-02T17:11:10.270Z
19:11:11.244 [WARN ] [ipcamera.internal.StreamServerHandler] - Exception caught from stream server:{}
java.io.FileNotFoundException: c:\cameratmpfs\camera2\ipcamera.jpg?_t=2020-05-02T17:11:10.270Z (El nombre de archivo, el nombre de directorio o la sintaxis de la etiqueta del volumen no son correctos)
        at java.io.RandomAccessFile.open0(Native Method) ~[?:1.8.0_251]
        at java.io.RandomAccessFile.open(Unknown Source) ~[?:1.8.0_251]
        at java.io.RandomAccessFile.<init>(Unknown Source) ~[?:1.8.0_251]

And then I have the behaviour previously described

19:11:11.290 [DEBUG] [ipcamera.internal.StreamServerHandler] - Closing a StreamServerHandler.
19:11:15.040 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
19:11:15.155 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   GET:/ipcamera.jpg?_t=2020-05-02T17:11:15.149Z
19:11:15.155 [WARN ] [ipcamera.internal.StreamServerHandler] - Exception caught from stream server:{}
java.io.FileNotFoundException: c:\cameratmpfs\camera2\ipcamera.jpg?_t=2020-05-02T17:11:15.149Z (El nombre de archivo, el nombre de directorio o la sintaxis de la etiqueta del volumen no son correctos)
        at java.io.RandomAccessFile.open0(Native Method) ~[?:1.8.0_251]
        at java.io.RandomAccessFile.open(Unknown Source) ~[?:1.8.0_251]
        at java.io.RandomAccessFile.<init>(Unknown Source) ~[?:1.8.0_251]

I needed to clean cache and tmp again and to put again Update Image Now=true to achieve it works well another time.

Another issue that I have seen in the log, but I don’t know if it is a camera problem or not, it is that when the camera is initialised there is an error (We got a ONVIF PTZ ERROR 400)
This is the log

19:11:10.103 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - We sucessfully connected to a ONVIF SERVICE:/onvif/device_service
19:11:10.355 [DEBUG] [hab.binding.ipcamera.onvif.PTZRequest] - We got an ONVIF ptz response:<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:e="http://www.w3.org/2003/05/soap-encoding" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tr2="http://www.onvif.org/ver20/media/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:axt="http://www.onvif.org/ver20/analytics" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:wsrf-rw="http://docs.oasis-open.org/wsrf/rw-2" xmlns:wsntw="http://docs.oasis-open.org/wsn/bw-2" xmlns:ter="http://www.onvif.org/ver10/error" ><s:Header><wsa:Action>http://www.onvif.org/ver20/ptz/wsdl/GetNodesResponse</wsa:Action></s:Header><s:Body><tptz:GetNodesResponse><tptz:PTZNode token="NODE_000" FixedHomePosition="false"><tt:Name>PTZNode</tt:Name><tt:SupportedPTZSpaces><tt:AbsolutePanTiltPositionSpace><tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace</tt:URI><tt:XRange><tt:Min>-1.0</tt:Min><tt:Max>1.0</tt:Max></tt:XRange><tt:YRange><tt:Min>-1.0</tt:Min><tt:Max>1.0</tt:Max></tt:YRange></tt:AbsolutePanTiltPositionSpace><tt:AbsoluteZoomPositionSpace><tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace</tt:URI><tt:XRange><tt:Min>0.0</tt:Min><tt:Max>1.0</tt:Max></tt:XRange></tt:AbsoluteZoomPositionSpace><tt:RelativePanTiltTranslationSpace><tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace</tt:URI><tt:XRange><tt:Min>-1.0</tt:Min><tt:Max>1.0</tt:Max></tt:XRange><tt:YRange><tt:Min>-1.0</tt:Min><tt:Max>1.0</tt:Max></tt:YRange></tt:RelativePanTiltTranslationSpace><tt:RelativeZoomTranslationSpace><tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace</tt:URI><tt:XRange><tt:Min>-1.0</tt:Min><tt:Max>1.0</tt:Max></tt:XRange></tt:RelativeZoomTranslationSpace><tt:ContinuousPanTiltVelocitySpace><tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace</tt:URI><tt:XRange><tt:Min>-1.0</tt:Min><tt:Max>1.0</tt:Max></tt:XRange><tt:YRange><tt:Min>-1.0</tt:Min><tt:Max>1.0</tt:Max></tt:YRange></tt:ContinuousPanTiltVelocitySpace><tt:ContinuousZoomVelocitySpace><tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace</tt:URI><tt:XRange><tt:Min>-1.0</tt:Min><tt:Max>1.0</tt:Max></tt:XRange></tt:ContinuousZoomVelocitySpace><tt:PanTiltSpeedSpace><tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace</tt:URI><tt:XRange><tt:Min>0.0</tt:Min><tt:Max>1.0</tt:Max></tt:XRange></tt:PanTiltSpeedSpace><tt:ZoomSpeedSpace><tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace</tt:URI><tt:XRange><tt:Min>0.0</tt:Min><tt:Max>1.0</tt:Max></tt:XRange></tt:ZoomSpeedSpace></tt:SupportedPTZSpaces><tt:MaximumNumberOfPresets>16</tt:MaximumNumberOfPresets><tt:HomeSupported>true</tt:HomeSupported></tptz:PTZNode></tptz:GetNodesResponse></s:Body></s:Envelope>
19:11:10.364 [DEBUG] [hab.binding.ipcamera.onvif.PTZRequest] - ptzNodeToken=NODE_000
19:11:10.431 [DEBUG] [hab.binding.ipcamera.onvif.PTZRequest] - We got a ONVIF PTZ ERROR 400:<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:e="http://www.w3.org/2003/05/soap-encoding" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tr2="http://www.onvif.org/ver20/media/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:axt="http://www.onvif.org/ver20/analytics" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:wsrf-rw="http://docs.oasis-open.org/wsrf/rw-2" xmlns:wsntw="http://docs.oasis-open.org/wsn/bw-2" xmlns:ter="http://www.onvif.org/ver10/error" ><s:Body><s:Fault><s:Code><s:Value>s:Receiver</s:Value><s:Subcode><s:Value>ter:ActionNotSupported</s:Value></s:Subcode></s:Code><s:Reason><s:Text xml:lang="en">Action Not Implemented</s:Text></s:Reason></s:Fault></s:Body></s:Envelope>
19:11:10.446 [DEBUG] [hab.binding.ipcamera.onvif.PTZRequest] - We got a ONVIF PTZ ERROR -1:unexpected end of stream on http://192.168.0.16/...

this is only a problem at the beginning and I don’t know if it is relevant, because the rest of the functionality work correctly.

Thank you for reporting, I ran some tests here and found multiple bugs which are now fixed and in the latest build. Can you download and retest please? The list of changes made is in the main ipcamera thread if interested…

I have installed the last version ipcamera-2.5.4-SNAPSHOT.jar 04/05/2020 12:15

I am sorry but I have the same results that with the previous one.
If I start OH with “update image Now=On” it works well, and I can switch off and on this parameter and works correctly.
Captura
But if I start OH with “Update image Now=off” then I have the same errors

19:02:22.960 [INFO ] [ding.ipcamera.handler.IpCameraHandler] - IP Camera at 192.168.0.16 is now online.
19:02:26.964 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
19:02:28.964 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
19:02:30.964 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
19:02:32.961 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
19:02:34.963 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
19:02:36.962 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
19:02:38.964 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
19:02:40.962 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
19:02:42.964 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
19:02:44.963 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
19:02:46.962 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
19:02:48.961 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
19:02:49.442 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   GET:/ipcamera.jpg
19:02:49.489 [DEBUG] [ipcamera.internal.StreamServerHandler] - Closing a StreamServerHandler.
19:02:50.961 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
19:02:52.971 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
19:02:53.441 [DEBUG] [ipcamera.internal.StreamServerHandler] - Stream Server recieved request   GET:/ipcamera.jpg?_t=2020-05-04T17:02:53.428Z
19:02:53.441 [WARN ] [ipcamera.internal.StreamServerHandler] - Exception caught from stream server:{}
java.io.FileNotFoundException: c:\cameratmpfs\camera2\ipcamera.jpg?_t=2020-05-04T17:02:53.428Z (El nombre de archivo, el nombre de directorio o la sintaxis de la etiqueta del volumen no son correctos)
        at java.io.RandomAccessFile.open0(Native Method) ~[?:1.8.0_251]
        at java.io.RandomAccessFile.open(Unknown Source) ~[?:1.8.0_251]
        at java.io.RandomAccessFile.<init>(Unknown Source) ~[?:1.8.0_251]

And still I have the error indicated when Thing is initialiced:

19:02:21.903 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.0.16:80
19:02:21.925 [INFO ] [.openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
19:02:21.975 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg
19:02:22.056 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - We sucessfully connected to a ONVIF SERVICE:/onvif/device_service
19:02:22.196 [DEBUG] [hab.binding.ipcamera.onvif.PTZRequest] - We got an ONVIF ptz response:<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:e="http://www.w3.org/2003/05/soap-encoding" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tr2="http://www.onvif.org/ver20/media/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:axt="http://www.onvif.org/ver20/analytics" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:wsrf-rw="http://docs.oasis-open.org/wsrf/rw-2" xmlns:wsntw="http://docs.oasis-open.org/wsn/bw-2" xmlns:ter="http://www.onvif.org/ver10/error" ><s:Header><wsa:Action>http://www.onvif.org/ver20/ptz/wsdl/GetNodesResponse</wsa:Action></s:Header><s:Body><tptz:GetNodesResponse><tptz:PTZNode token="NODE_000" FixedHomePosition="false"><tt:Name>PTZNode</tt:Name><tt:SupportedPTZSpaces><tt:AbsolutePanTiltPositionSpace><tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace</tt:URI><tt:XRange><tt:Min>-1.0</tt:Min><tt:Max>1.0</tt:Max></tt:XRange><tt:YRange><tt:Min>-1.0</tt:Min><tt:Max>1.0</tt:Max></tt:YRange></tt:AbsolutePanTiltPositionSpace><tt:AbsoluteZoomPositionSpace><tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace</tt:URI><tt:XRange><tt:Min>0.0</tt:Min><tt:Max>1.0</tt:Max></tt:XRange></tt:AbsoluteZoomPositionSpace><tt:RelativePanTiltTranslationSpace><tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace</tt:URI><tt:XRange><tt:Min>-1.0</tt:Min><tt:Max>1.0</tt:Max></tt:XRange><tt:YRange><tt:Min>-1.0</tt:Min><tt:Max>1.0</tt:Max></tt:YRange></tt:RelativePanTiltTranslationSpace><tt:RelativeZoomTranslationSpace><tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace</tt:URI><tt:XRange><tt:Min>-1.0</tt:Min><tt:Max>1.0</tt:Max></tt:XRange></tt:RelativeZoomTranslationSpace><tt:ContinuousPanTiltVelocitySpace><tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace</tt:URI><tt:XRange><tt:Min>-1.0</tt:Min><tt:Max>1.0</tt:Max></tt:XRange><tt:YRange><tt:Min>-1.0</tt:Min><tt:Max>1.0</tt:Max></tt:YRange></tt:ContinuousPanTiltVelocitySpace><tt:ContinuousZoomVelocitySpace><tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace</tt:URI><tt:XRange><tt:Min>-1.0</tt:Min><tt:Max>1.0</tt:Max></tt:XRange></tt:ContinuousZoomVelocitySpace><tt:PanTiltSpeedSpace><tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace</tt:URI><tt:XRange><tt:Min>0.0</tt:Min><tt:Max>1.0</tt:Max></tt:XRange></tt:PanTiltSpeedSpace><tt:ZoomSpeedSpace><tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace</tt:URI><tt:XRange><tt:Min>0.0</tt:Min><tt:Max>1.0</tt:Max></tt:XRange></tt:ZoomSpeedSpace></tt:SupportedPTZSpaces><tt:MaximumNumberOfPresets>16</tt:MaximumNumberOfPresets><tt:HomeSupported>true</tt:HomeSupported></tptz:PTZNode></tptz:GetNodesResponse></s:Body></s:Envelope>
19:02:22.306 [DEBUG] [hab.binding.ipcamera.onvif.PTZRequest] - ptzNodeToken=NODE_000
19:02:22.353 [DEBUG] [hab.binding.ipcamera.onvif.PTZRequest] - We got a ONVIF PTZ ERROR -1:unexpected end of stream on http://192.168.0.16/...
19:02:22.384 [DEBUG] [hab.binding.ipcamera.onvif.PTZRequest] - We got a ONVIF PTZ ERROR 400:<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:e="http://www.w3.org/2003/05/soap-encoding" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tr2="http://www.onvif.org/ver20/media/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:axt="http://www.onvif.org/ver20/analytics" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:wsrf-rw="http://docs.oasis-open.org/wsrf/rw-2" xmlns:wsntw="http://docs.oasis-open.org/wsn/bw-2" xmlns:ter="http://www.onvif.org/ver10/error" ><s:Body><s:Fault><s:Code><s:Value>s:Receiver</s:Value><s:Subcode><s:Value>ter:ActionNotSupported</s:Value></s:Subcode></s:Code><s:Reason><s:Text xml:lang="en">Action Not Implemented</s:Text></s:Reason></s:Fault></s:Body></s:Envelope>
19:02:22.944 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Possible NIC/IP match found:192.168.0.14
19:02:22.955 [INFO ] [ding.ipcamera.handler.IpCameraHandler] - IpCamera file server for camera 192.168.0.16 has started on port 50014 for all NIC's.
19:02:22.960 [INFO ] [ding.ipcamera.handler.IpCameraHandler] - IP Camera at 192.168.0.16 is now online.
19:02:26.964 [TRACE] [ding.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.0.16ffmpeg