IpCamera: New IP Camera Binding

@sl92656
That is normal and how HLS works, it buffers the stream to disk. You can reduce it by changing the HLS arguments by reading the ffmpeg options on their site. Reducing the number of segments has a trade off on slow CPU systems.

@techmike

Please read the important note in the first post of this thread.

@Gad_Ofir
You have the same error as @techmike so I will look into if this is a bug which will take me a few days. It appears the camera is closing the channel before the snapshot fully arrives. If it is the camera doing it, it would also explain why motionEye is blurry if only some of the data is sent.

2 Likes

Hi @matt1 thanks allot!

I can confirm this is a bug. Please either use this older version or use the below work around with the latest build. Either should workā€¦

http://pcmus.com/openhab/IpCameraBinding/OldVersions/ipcamera2019-06-28.zip

EDIT: Found it, just very late hereā€¦
if you add this to the thing file as one of the configs it works around the bug and you donā€™t need to change the jarā€¦

STREAM_URL_OVERRIDE="http://192.168.1.65/fakeurl"

Thats probably why it works fine for me. I dont use the newest binding.

It did not help, there are no errors, but the item is not updated.

2019-07-29 19:19:13.990 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera GET: http://192.168.1.13:80/webcapture.jpg?command=snap&channel=1
2019-07-29 19:19:14.004 [TRACE] [ipcamera.internal.MyNettyAuthHandler] - MyNettyAuthHandler is now setup for    GET:/webcapture.jpg?command=snap&channel=1
2019-07-29 19:19:14.005 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Have re-opened  the closed channel:0   GET:/webcapture.jpg?command=snap&channel=1
2019-07-29 19:19:14.517 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
HTTP/1.1 200 OK
Content-type: image/jpeg
Content-Transfer-Encoding: binary
Content-Length: 107558
Connection: close
2019-07-29 19:19:14.518 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 918, cap: 918/918, unwrapped: PooledUnsafeDirectByteBuf(ridx: 1024, widx: 1024, cap: 1024)), decoderResult: success)
2019-07-29 19:19:14.519 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 8192, widx: 12008, cap: 16384)), decoderResult: success)
2019-07-29 19:19:14.519 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 3816, cap: 3816/3816, unwrapped: PooledUnsafeDirectByteBuf(ridx: 12008, widx: 12008, cap: 16384)), decoderResult: success)
2019-07-29 19:19:14.522 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 5792, cap: 5792/5792, unwrapped: PooledUnsafeDirectByteBuf(ridx: 5792, widx: 5792, cap: 16384)), decoderResult: success)
2019-07-29 19:19:14.523 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 1448, cap: 1448/1448, unwrapped: PooledUnsafeDirectByteBuf(ridx: 1448, widx: 1448, cap: 16384)), decoderResult: success)
2019-07-29 19:19:14.524 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 7240, cap: 7240/7240, unwrapped: PooledUnsafeDirectByteBuf(ridx: 7240, widx: 7240, cap: 16384)), decoderResult: success)
2019-07-29 19:19:14.525 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 8192, widx: 11584, cap: 16384)), decoderResult: success)
2019-07-29 19:19:14.526 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 3392, cap: 3392/3392, unwrapped: PooledUnsafeDirectByteBuf(ridx: 11584, widx: 11584, cap: 16384)), decoderResult: success)
2019-07-29 19:19:14.527 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 4344, cap: 4344/4344, unwrapped: PooledUnsafeDirectByteBuf(ridx: 4344, widx: 4344, cap: 16384)), decoderResult: success)
2019-07-29 19:19:14.530 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 1448, cap: 1448/1448, unwrapped: PooledUnsafeDirectByteBuf(ridx: 1448, widx: 1448, cap: 16384)), decoderResult: success)
2019-07-29 19:19:14.531 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 8192, widx: 8192, cap: 8192)), decoderResult: success)
2019-07-29 19:19:14.531 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 3392, cap: 3392/3392, unwrapped: PooledUnsafeDirectByteBuf(ridx: 3392, widx: 3392, cap: 65536)), decoderResult: success)
2019-07-29 19:19:14.532 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 2896, cap: 2896/2896, unwrapped: PooledUnsafeDirectByteBuf(ridx: 2896, widx: 2896, cap: 65536)), decoderResult: success)
2019-07-29 19:19:14.532 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 4344, cap: 4344/4344, unwrapped: PooledUnsafeDirectByteBuf(ridx: 4344, widx: 4344, cap: 32768)), decoderResult: success)
2019-07-29 19:19:14.533 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 2896, cap: 2896/2896, unwrapped: PooledUnsafeDirectByteBuf(ridx: 2896, widx: 2896, cap: 32768)), decoderResult: success)
2019-07-29 19:19:14.533 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 4344, cap: 4344/4344, unwrapped: PooledUnsafeDirectByteBuf(ridx: 4344, widx: 4344, cap: 16384)), decoderResult: success)
2019-07-29 19:19:14.534 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 2896, cap: 2896/2896, unwrapped: PooledUnsafeDirectByteBuf(ridx: 2896, widx: 2896, cap: 16384)), decoderResult: success)
2019-07-29 19:19:14.535 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 7240, cap: 7240/7240, unwrapped: PooledUnsafeDirectByteBuf(ridx: 7240, widx: 7240, cap: 16384)), decoderResult: success)
2019-07-29 19:19:14.535 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 4344, cap: 4344/4344, unwrapped: PooledUnsafeDirectByteBuf(ridx: 4344, widx: 4344, cap: 16384)), decoderResult: success)
2019-07-29 19:19:14.536 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 5792, cap: 5792/5792, unwrapped: PooledUnsafeDirectByteBuf(ridx: 5792, widx: 5792, cap: 16384)), decoderResult: success)
2019-07-29 19:19:14.536 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 5792, cap: 5792/5792, unwrapped: PooledUnsafeDirectByteBuf(ridx: 5792, widx: 5792, cap: 16384)), decoderResult: success)
2019-07-29 19:19:14.537 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 4344, cap: 4344/4344, unwrapped: PooledUnsafeDirectByteBuf(ridx: 4344, widx: 4344, cap: 16384)), decoderResult: success)
2019-07-29 19:19:14.537 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 2896, cap: 2896/2896, unwrapped: PooledUnsafeDirectByteBuf(ridx: 2896, widx: 2896, cap: 16384)), decoderResult: success)
2019-07-29 19:19:14.538 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultLastHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 3408, cap: 3408/3408, unwrapped: PooledUnsafeDirectByteBuf(ridx: 3408, widx: 3408, cap: 8192)), decoderResult: success)
2019-07-29 19:19:14.538 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:0   URL:/webcapture.jpg?command=snap&channel=1

Hi colleagues, I am having a problem with using the binding in relation with a Luowice camera (chinese product) which seems to be supporting ONVIF 2.04 according to the ONVIF manager.

I can also look at the snapshot directly in the browser and also show it directly in openhab with the image tag. When using the binding, I get the following error message. I am playing around with settings since couple of hours including Snapshot URL override etc. but no luck so far. Any help would be much appreciated:

> Blockquote
2019-07-31 10:00:55.879 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:XXX

2019-07-31 10:01:03.550 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Fetching the number of Media Profiles this camera supports.

2019-07-31 10:01:08.984 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Checking the selected Media Profile is a valid number.

2019-07-31 10:01:08.989 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Fetching a Token for the selected Media Profile.

2019-07-31 10:01:08.993 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Auto fetching the snapshot URL for the selected Media Profile.

2019-07-31 10:01:13.565 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - About to fetch some information about the Media Profiles from the camera

2019-07-31 10:01:13.567 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - *********** Media Profile 0 details reported by camera at IP:XXX ***********

2019-07-31 10:01:13.570 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Camera will use this Media Profile unless you change it in the bindings settings.

2019-07-31 10:01:13.572 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - This can be used to stream HLS with low CPU overhead

2019-07-31 10:01:13.574 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 0 is named:VideoStream0

2019-07-31 10:01:13.576 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 0 uses video encoder	:H_264

2019-07-31 10:01:13.578 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 0 uses video quality	:6.0

2019-07-31 10:01:13.580 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 0 uses video resoltion	:1920 x 1080

2019-07-31 10:01:13.582 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 0 uses video bitrate	:1536

2019-07-31 10:01:13.584 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - *********** Media Profile 1 details reported by camera at IP:XXX ***********

2019-07-31 10:01:13.586 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - This can be used to stream HLS with low CPU overhead

2019-07-31 10:01:13.588 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 1 is named:VideoStream1

2019-07-31 10:01:13.590 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 1 uses video encoder	:H_264

2019-07-31 10:01:13.592 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 1 uses video quality	:6.0

2019-07-31 10:01:13.594 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 1 uses video resoltion	:640 x 352

2019-07-31 10:01:13.596 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 1 uses video bitrate	:384

2019-07-31 10:01:13.598 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - About to interrogate the camera to see if it supports PTZ.

2019-07-31 10:01:20.085 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Camera is reporting that it supports PTZ control with Absolute movement via ONVIF

2019-07-31 10:01:20.094 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Checking Pan now.

2019-07-31 10:01:26.800 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Checking Tilt now.

2019-07-31 10:01:32.555 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Checking Zoom now.

2019-07-31 10:01:45.342 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Camera has reported the range of movements it supports via PTZ.

2019-07-31 10:01:45.346 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - The camera can Pan  from -1.0 to 1.0

2019-07-31 10:01:45.349 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - The camera can Tilt from -1.0 to 1.0

2019-07-31 10:01:45.351 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - The camera can Zoom from -1.0 to 1.0

2019-07-31 10:01:45.354 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Fetching the cameras current position.

2019-07-31 10:01:48.028 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Finished with PTZ with no errors, now fetching the Video URL for RTSP from the camera.

2019-07-31 10:01:53.300 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera GET: http://XXX/tmpfs/auto.jpg

2019-07-31 10:01:53.345 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Have  opened  a  brand NEW channel:0 	GET:/tmpfs/auto.jpg

2019-07-31 10:01:53.352 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - IP Camera at XXX is now online.

2019-07-31 10:01:53.358 [DEBUG] [ipcamera.internal.MyNettyAuthHandler] - 401: Mark as closing, the  channel:0 	GET:/tmpfs/auto.jpg

2019-07-31 10:01:53.361 [DEBUG] [ipcamera.internal.MyNettyAuthHandler] - Setting up the camera to use Basic Auth and resending last request with correct auth.

2019-07-31 10:01:53.364 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera GET: http://XXX/tmpfs/auto.jpg

2019-07-31 10:01:53.415 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Have  opened  a  brand NEW channel:1 	GET:/tmpfs/auto.jpg

2019-07-31 10:01:53.420 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - !!!! Camera has closed the channel 	URL:/tmpfs/auto.jpg Cause reported is: {}

java.lang.NullPointerException: null

	at java.net.URI$Parser.parse(URI.java:3042) ~[?:?]

	at java.net.URI.<init>(URI.java:588) ~[?:?]

	at org.openhab.binding.ipcamera.handler.IpCameraHandler.getCorrectUrlFormat(IpCameraHandler.java:278) ~[?:?]

	at org.openhab.binding.ipcamera.handler.IpCameraHandler.access$2(IpCameraHandler.java:274) ~[?:?]

	at org.openhab.binding.ipcamera.handler.IpCameraHandler$CommonCameraHandler.channelRead(IpCameraHandler.java:712) ~[?:?]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) [197:io.netty.transport:4.1.34.Final]

	at org.openhab.binding.ipcamera.internal.MyNettyAuthHandler.channelRead(MyNettyAuthHandler.java:235) [198:org.openhab.binding.ipcamera:2.5.0.201907161048]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438) [197:io.netty.transport:4.1.34.Final]

	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:323) [193:io.netty.codec:4.1.34.Final]

	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:297) [193:io.netty.codec:4.1.34.Final]

	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337) [197:io.netty.transport:4.1.34.Final]

	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) [192:io.netty.handler:4.1.34.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1408) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:677) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:612) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:529) [197:io.netty.transport:4.1.34.Final]

	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:491) [197:io.netty.transport:4.1.34.Final]

	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905) [194:io.netty.common:4.1.34.Final]

	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [194:io.netty.common:4.1.34.Final]

	at java.lang.Thread.run(Thread.java:748) [?:?]

> Blockquote

First off, thanks for your hard work and continued support of this binding. Well done.

Iā€™m using Amcrest models, configured as Dahua, as you suggested, and they work well. Currently only polling snapshots, cameras themselves configured at 1 sec intervals, camera Things configured at 2000 ms. Havenā€™t tried the streaming yet (Iā€™m using a Pi3, and not certain if itā€™ll be able to handle multiple streams). Also using motion alarm notifications, very robust.

Amcrest IP2M-841EW POE
Amcrest IP2M-841B Wireless
Amcrest IP8M-2493EW POE

how to add video feed to HABPanel? which widget to use? sorry im totally new to this.

@techmike
Did you try the older version or use the work around? What is the contents of your things file?

@piowork
You have hit the same bug that has been discussed the last few posts, the answer is in my last post on what to do. Please ensure you clean the cache and temp folders out whenever you change the files in your addons location, search this forum for how this is done.

@Diogenes
There are different types of streams and some are easier then others to achieve. mjpeg works well but cameras usually limit the quality they can supply in this format so HLS is needed for better quality.

@Gayanll
I donā€™t use Habpanel much, perhaps someone else can post how they do it. Snapshots at 1fps work via the image widget, mjpeg from memory works I just have not fully worked out how to do HLS streams just yet. You would need to use the template widget and add some code for the HLS to display and I half got it working a while back and would need to take a look at my notes.

1 Like

I tried both options.

  1. Added to things STING STREAM_URL_OVERRIDE
  2. Copied in addons version of ipcamera2019-06-28.zip

after all the changes restarted OH2. The version of ipcamera2019-06-28.zip is now installed, the logs are already without errors, but the item is not updated.

current things:

Thing ipcamera:ONVIF:Bedroom
[
    IPADDRESS="192.168.1.13",
    PASSWORD="",
    USERNAME="admin",
    ONVIF_PORT=8899,
    PORT=80,
    SERVER_PORT=-1,
    POLL_CAMERA_MS=2000,
    IP_WHITELIST="DISABLE",
    ONVIF_MEDIA_PROFILE=0,
    STREAM_URL_OVERRIDE="http://192.168.1.13/webcapture.jpg?command=snap&channel=1"
]

New build 2019-08-01 has these changes.

  • Bug fix for recent issue when STREAM_URL_OVERRIDE is null. No need to provide any URL, the binding will handle having none supplied. @techmike my guess is your issue is caused by having used the snapshot url in the STREAM_URL_OVERRIDE config, even this build may have issues if you do that. Remove it completely or give it a valid mjpeg stream url and this build should work.
  • INSTAR cameras can now turn the irLED off and to auto. Bugs get attracted to IR light so it can be handy to turn off.
  • INSTAR cameras can now overlay text on top of the video stream/snapshot. If you want to display temperature, door status and any info at all the binding gives a way to overlay and change the text on top of the video.
  • INSTAR cameras now use a new url for higher res snapshots by default.
  • INSTAR cameras now auto detect the mjpeg url.

Didnā€™t find a new build at http://www.pcmus.com/openhab/IpCameraBinding/
Removed from thing STINGAM_URL_OVERRIDE, on the assembly ipcamera2019-06-28 nothing happened and did not change. I installed the ipcamera2019-07-16 assembly, the same errors appeared

things:

Thing ipcamera:ONVIF:Bedroom
[
    IPADDRESS="192.168.1.13",
    PASSWORD="",
    USERNAME="admin",
    ONVIF_PORT=8899,
    PORT=80,
    SERVER_PORT=-1,
    POLL_CAMERA_MS=2000,
    IP_WHITELIST="DISABLE",
    ONVIF_MEDIA_PROFILE=0
]

log in trace:

2019-08-01 15:55:06.694 [DEBUG] [org.openhab.binding.ipcamera        ] - BundleEvent STARTING - org.openhab.binding.ipcamera
2019-08-01 15:55:06.695 [DEBUG] [org.openhab.binding.ipcamera        ] - BundleEvent STARTED - org.openhab.binding.ipcamera
2019-08-01 15:55:06.708 [DEBUG] [org.openhab.binding.ipcamera        ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=384, service.bundleid=241, service.scope=bundle, component.name=org.openhab.binding.ipcamera.internal.IpCameraHandlerFactory, component.id=235} - org.openhab.binding.ipcamera
2019-08-01 15:55:06.887 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - initialize() called.
2019-08-01 15:55:07.893 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.1.13:8899
2019-08-01 15:55:09.517 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Fetching the number of Media Profiles this camera supports.
2019-08-01 15:55:10.373 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Checking the selected Media Profile is a valid number.
2019-08-01 15:55:10.374 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Fetching a Token for the selected Media Profile.
2019-08-01 15:55:10.374 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Auto fetching the snapshot URL for the selected Media Profile.
2019-08-01 15:55:11.046 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - About to fetch some information about the Media Profiles from the camera
2019-08-01 15:55:11.050 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - *********** Media Profile 0 details reported by camera at IP:192.168.1.13 ***********
2019-08-01 15:55:11.052 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Camera will use this Media Profile unless you change it in the bindings settings.
2019-08-01 15:55:11.054 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - This can be used to stream HLS with low CPU overhead
2019-08-01 15:55:11.054 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 0 is named:VideoE_000
2019-08-01 15:55:11.055 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 0 uses video encoder     :H_264
2019-08-01 15:55:11.058 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 0 uses video quality     :4.0
2019-08-01 15:55:11.059 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 0 uses video resoltion   :1920 x 1080
2019-08-01 15:55:11.060 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 0 uses video bitrate     :2707
2019-08-01 15:55:11.060 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - *********** Media Profile 1 details reported by camera at IP:192.168.1.13 ***********
2019-08-01 15:55:11.064 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - This can be used to stream HLS with low CPU overhead
2019-08-01 15:55:11.065 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 1 is named:VideoE_001
2019-08-01 15:55:11.065 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 1 uses video encoder     :H_264
2019-08-01 15:55:11.066 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 1 uses video quality     :3.0
2019-08-01 15:55:11.066 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 1 uses video resoltion   :704 x 576
2019-08-01 15:55:11.067 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 1 uses video bitrate     :676
2019-08-01 15:55:11.068 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - *********** Media Profile 2 details reported by camera at IP:192.168.1.13 ***********
2019-08-01 15:55:11.069 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - This can be used to stream MJPEG if it is reachable with a HTTP url.
2019-08-01 15:55:11.069 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 2 is named:VideoE_002
2019-08-01 15:55:11.070 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 2 uses video encoder     :JPEG
2019-08-01 15:55:11.070 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 2 uses video quality     :4.0
2019-08-01 15:55:11.071 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 2 uses video resoltion   :704 x 576
2019-08-01 15:55:11.071 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Media Profile 2 uses video bitrate     :512
2019-08-01 15:55:11.072 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - About to interrogate the camera to see if it supports PTZ.
2019-08-01 15:55:12.482 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Camera is reporting that it does NOT support Absolute PTZ controls via ONVIF
2019-08-01 15:55:12.483 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Finished with PTZ with no errors, now fetching the Video URL for RTSP from the camera.
2019-08-01 15:55:13.634 [ERROR] [ing.saaj.soap.ver1_2.SOAPPart1_2Impl] - SAAJ0415: InputStream does not represent a valid SOAP 1.2 Message
2019-08-01 15:55:13.716 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera GET: http://192.168.1.13:80/webcapture.jpg?command=snap&channel=1
2019-08-01 15:55:13.817 [TRACE] [ipcamera.internal.MyNettyAuthHandler] - MyNettyAuthHandler is now setup for    GET:/webcapture.jpg?command=snap&channel=1
2019-08-01 15:55:13.818 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Have  opened  a  brand NEW channel:0   GET:/webcapture.jpg?command=snap&channel=1
2019-08-01 15:55:13.828 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - IP Camera at 192.168.1.13:80 is now online.
2019-08-01 15:55:14.378 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
HTTP/1.1 200 OK
Content-type: image/jpeg
Content-Transfer-Encoding: binary
Content-Length: 133114
Connection: close
2019-08-01 15:55:14.389 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 901, cap: 901/901, unwrapped: PooledUnsafeDirectByteBuf(ridx: 1024, widx: 1024, cap: 1024)), decoderResult: success)
2019-08-01 15:55:14.394 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - !!!! Camera has closed the channel     URL:/webcapture.jpg?command=snap&channel=1 Cause reported is: {}
java.lang.NullPointerException: null
        at java.net.URI$Parser.parse(URI.java:3042) ~[?:?]
        at java.net.URI.<init>(URI.java:588) ~[?:?]
        at org.openhab.binding.ipcamera.handler.IpCameraHandler.getCorrectUrlFormat(IpCameraHandler.java:278) ~[?:?]
        at org.openhab.binding.ipcamera.handler.IpCameraHandler.access$2(IpCameraHandler.java:274) ~[?:?]
        at org.openhab.binding.ipcamera.handler.IpCameraHandler$CommonCameraHandler.channelRead(IpCameraHandler.java:712) ~[?:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) [239:io.netty.transport:4.1.34.Final]
        at org.openhab.binding.ipcamera.internal.MyNettyAuthHandler.channelRead(MyNettyAuthHandler.java:235) [241:org.openhab.binding.ipcamera:2.5.0.201907161048]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438) [239:io.netty.transport:4.1.34.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:323) [236:io.netty.codec:4.1.34.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:297) [236:io.netty.codec:4.1.34.Final]
        at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337) [239:io.netty.transport:4.1.34.Final]
        at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) [235:io.netty.handler:4.1.34.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1408) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:677) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:612) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:529) [239:io.netty.transport:4.1.34.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:491) [239:io.netty.transport:4.1.34.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905) [237:io.netty.common:4.1.34.Final]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [237:io.netty.common:4.1.34.Final]
        at java.lang.Thread.run(Thread.java:748) [?:?]
2019-08-01 15:55:14.401 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:0   URL:/webcapture.jpg?command=snap&channel=1

[details="Summary"]
This text will be hidden
[/details]

I was just uploading it so check again. Also if PASSWORD is empty delete it fully as a config.

things modifed:

Thing ipcamera:ONVIF:Bedroom
[
    IPADDRESS="192.168.1.13",
    USERNAME="admin",
    ONVIF_PORT=8899,
    PORT=80,
    SERVER_PORT=-1,
    POLL_CAMERA_MS=2000,
    IP_WHITELIST="DISABLE",
    ONVIF_MEDIA_PROFILE=0
]


binding apdate to ipcamera2019-08-01.zip
logs:

2019-08-01 16:35:08.694 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.13http://192.168.1.13/webcapture.jpg?command=snap&channel=1
2019-08-01 16:35:08.701 [TRACE] [ipcamera.internal.MyNettyAuthHandler] - MyNettyAuthHandler is now setup for    GET:http://192.168.1.13/webcapture.jpg?command=snap&channel=1
2019-08-01 16:35:08.702 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Have re-opened  the closed channel:0   GET:http://192.168.1.13/webcapture.jpg?command=snap&channel=1
2019-08-01 16:35:09.207 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
HTTP/1.1 200 OK
Content-type: image/jpeg
Content-Transfer-Encoding: binary
Content-Length: 136580
Connection: close
2019-08-01 16:35:09.209 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 918, cap: 918/918, unwrapped: PooledUnsafeDirectByteBuf(ridx: 1024, widx: 1024, cap: 1024)), decoderResult: success)
2019-08-01 16:35:09.210 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 8192, widx: 16384, cap: 16384)), decoderResult: success)
2019-08-01 16:35:09.212 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 16384, widx: 16384, cap: 16384)), decoderResult: success)
2019-08-01 16:35:09.213 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 8192, widx: 52096, cap: 65536)), decoderResult: success)
2019-08-01 16:35:09.214 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 16384, widx: 52096, cap: 65536)), decoderResult: success)
2019-08-01 16:35:09.215 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 24576, widx: 52096, cap: 65536)), decoderResult: success)
2019-08-01 16:35:09.217 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 32768, widx: 52096, cap: 65536)), decoderResult: success)
2019-08-01 16:35:09.218 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 40960, widx: 52096, cap: 65536)), decoderResult: success)
2019-08-01 16:35:09.219 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 49152, widx: 52096, cap: 65536)), decoderResult: success)
2019-08-01 16:35:09.220 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 2944, cap: 2944/2944, unwrapped: PooledUnsafeDirectByteBuf(ridx: 52096, widx: 52096, cap: 65536)), decoderResult: success)
2019-08-01 16:35:09.221 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 8192, widx: 65536, cap: 65536)), decoderResult: success)
2019-08-01 16:35:09.222 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 16384, widx: 65536, cap: 65536)), decoderResult: success)
2019-08-01 16:35:09.222 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 24576, widx: 65536, cap: 65536)), decoderResult: success)
2019-08-01 16:35:09.223 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 32768, widx: 65536, cap: 65536)), decoderResult: success)
2019-08-01 16:35:09.223 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 40960, widx: 65536, cap: 65536)), decoderResult: success)
2019-08-01 16:35:09.223 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 49152, widx: 65536, cap: 65536)), decoderResult: success)
2019-08-01 16:35:09.224 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 57344, widx: 65536, cap: 65536)), decoderResult: success)
2019-08-01 16:35:09.224 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 8192, cap: 8192/8192, unwrapped: PooledUnsafeDirectByteBuf(ridx: 65536, widx: 65536, cap: 65536)), decoderResult: success)
2019-08-01 16:35:09.225 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultLastHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 1646, cap: 1646/1646, unwrapped: PooledUnsafeDirectByteBuf(ridx: 1646, widx: 1646, cap: 65536)), decoderResult: success)
2019-08-01 16:35:09.225 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Snapshot recieved: Binding will now close the channel.
2019-08-01 16:35:09.226 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:0   URL:http://192.168.1.13/webcapture.jpg?command=snap&channel=1


Maybe I want too much from OH2 and the whole story is wrong. How to check with third-party programs or something else that my camera (I have 4 of them from one manufacturer) can send motion events?
From the ONVIF Device Manager application, I see that the camera displays a motion event, but I understand how to handle this for OH2.

Hi Mattā€¦
I just installed the latest binding on my Odroid C2, hoping I could use the same config which I have running on my Rpi using a rather old Rpiā€¦
But for some reason it doesnt seem to work (same configuration file with the newste binding from today).

This is my config file:

Thing ipcamera:HTTPONLY:001 [ 
IPADDRESS="10.4.28.202",
PASSWORD="xxxxxxxx",
USERNAME="xxxxxxxx",
SNAPSHOT_URL_OVERIDE="http://10.4.28.202/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=openhab&password=openhab0101",
PORT=80]

This is the binding version I use on the Rpi:

openhab> bundle:list -s |grep -i ipcam
195 x Active   x  80 x 2.5.0.201901260300     x org.openhab.binding.ipcamera
openhab> ^C
openhab>

When using the latest binding, (from today) on the Odroid with the same config. I get an error:

2019-08-02 00:15:53.173 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'ipcamera.things'
==> /var/log/openhab2/events.log <==
2019-08-02 00:15:53.218 [hingStatusInfoChangedEvent] - 'ipcamera:HTTPONLY:001' changed from UNINITIALIZED (HANDLER_CONFIGURATION_PENDING) to UNINITIALIZED (HANDLER_MISSING_ERROR)
2019-08-02 00:15:53.239 [me.event.ThingUpdatedEvent] - Thing 'ipcamera:HTTPONLY:001' has been updated.

The camera is a Reolink RCL410.
IĀ“m not really sure what to do here. I sat the log level to debug, but there isnĀ“t much info coming.

This part from your logs shows it is working, if you are not seeing the image update try this in your things file. The other way is to enable the SERVER_PORT and use the url as explained in the readme on how to get a snapshot in the alternative method. Try to only get 1 camera working first then add the extra cameras 1 by one.

Thing ipcamera:ONVIF:Bedroom
[
    IPADDRESS="192.168.1.13",
    IMAGE_UPDATE_EVENTS=1,
    UPDATE_IMAGE=true,
    ONVIF_PORT=8899,
    PORT=80,
    SERVER_PORT=-1,
    POLL_CAMERA_MS=2000,
    IP_WHITELIST="DISABLE",
    ONVIF_MEDIA_PROFILE=0
]

@Kim_Andersen
Thanks for reporting, you must have been using a very old version because there was a breaking change. I made this occur when I added streaming and gif features so a lot has changed since your older binding. One thing to note is that you halve the CPU load when you disable the image channel from updating.

One of the breaking changes that are effecting you is thisā€¦

SNAPSHOT_URL_OVERIDE
make it
SNAPSHOT_URL_OVERRIDE

Note the extra R. The other changes are explained in this postā€¦

Also make sure if you change anything in your addons folder that you clean the cache and temp folders and restart openhab.

Hi @Gayanll, I use the ā€œFrame Widgetā€.
07%20PM
Just select the ā€œStatic URLā€ setting and type the URL in there, in my setup it is: http://192.168.1.200:37777/ipcamera.m3u8
Please note, in order to get this to work you have to match the port setting in the IpCamera thing:

	SERVER_PORT=37777,

with your TCP port setting in the camera (shown is my Amcrest setup screen):

Hope this helps :wink:

After changing things the error, I get the error:

2019-08-02 09:39:12.255 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'ipcamera.things'
2019-08-02 09:39:12.261 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.thingUpdated()' on 'org.openhab.binding.ipcamera.handler.IpCameraHandler@3dd55bb4': java.math.BigDecimal cannot be cast to java.lang.Boolean
java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.Boolean
        at org.openhab.binding.ipcamera.handler.IpCameraHandler.initialize(IpCameraHandler.java:1657) ~[?:?]
        at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.thingUpdated(BaseThingHandler.java:208) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
        at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240]
        at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [102:org.eclipse.smarthome.core:0.10.0.oh240]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?]
Thing ipcamera:ONVIF:Bedroom
[
    IPADDRESS="192.168.1.13",
    IMAGE_UPDATE_EVENTS=0,
    UPDATE_IMAGE=1,
    ONVIF_PORT=8899,
    PORT=80,
    SERVER_PORT=-1,
    POLL_CAMERA_MS=2000,
    IP_WHITELIST="DISABLE",
    ONVIF_MEDIA_PROFILE=0
]

problen in UPDATE_IMAGE=0, must bee UPDATE_IMAGE=true

Sorry my mistake, I have edited my reply above so people dont copy wrong examplesā€¦
It should be the following.

Thing ipcamera:ONVIF:Bedroom
[
    IPADDRESS="192.168.1.13",
    IMAGE_UPDATE_EVENTS=1,
    UPDATE_IMAGE=true,
    ONVIF_PORT=8899,
    PORT=80,
    SERVER_PORT=-1,
    POLL_CAMERA_MS=2000,
    IP_WHITELIST="DISABLE",
    ONVIF_MEDIA_PROFILE=0
]