Reolink ip camera Enable Motion Alarm do not work

Hi,

Item Enable Motion Alarm is not working for me when in change it from on to off or from of to on. No effect on camera setting.

My setup is Openhab 4.0.1 on ubuntu 22.04.02. Camera: Reolink Duo 2 WiFi. I’m using ipcamera binding with Reolink API.

Below is trace log when I switched Enable Motion Alarm form off to on.

21:25:49.305 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘Reolink_Kamera_Ogrod_Enable_Motion_Alarm’ received command ON
21:25:49.307 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item ‘Reolink_Kamera_Ogrod_Enable_Motion_Alarm’ predicted to become ON
21:25:49.309 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Reolink_Kamera_Ogrod_Enable_Motion_Alarm’ changed from OFF to ON
21:25:49.366 [TRACE] [mera.internal.handler.IpCameraHandler] - Sending camera: POST: http://192.168.1.94:80/api.cgi?cmd=SetMdAlarm&token=null
21:25:49.370 [WARN ] [o.netty.channel.ChannelOutboundBuffer] - Failed to mark a promise as success because it has failed already: DefaultChannelPromise@13c1f23b(failure: io.netty.handler.codec.EncoderException: io.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1), unnotified cause:
io.netty.handler.codec.EncoderException: io.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1
at io.netty.handler.codec.http.HttpObjectEncoder.write(HttpObjectEncoder.java:108) ~[?:?]
at io.netty.channel.CombinedChannelDuplexHandler.write(CombinedChannelDuplexHandler.java:346) ~[?:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:879) ~[?:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:940) ~[?:?]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:966) ~[?:?]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:934) ~[?:?]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:984) ~[?:?]
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1025) ~[?:?]
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:306) ~[?:?]
at org.openhab.binding.ipcamera.internal.handler.IpCameraHandler$2.operationComplete(IpCameraHandler.java:664) ~[?:?]
at org.openhab.binding.ipcamera.internal.handler.IpCameraHandler$2.operationComplete(IpCameraHandler.java:1) ~[?:?]
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:590) ~[?:?]
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:583) ~[?:?]
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:559) ~[?:?]
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:492) ~[?:?]
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:636) ~[?:?]
at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:625) ~[?:?]
at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:105) ~[?:?]
at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:84) ~[?:?]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:300) ~[?:?]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:335) ~[?:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776) ~[?:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[?:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[?:?]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[?:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[?:?]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[?:?]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: io.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1
at io.netty.util.internal.ReferenceCountUpdater.toLiveRealRefCnt(ReferenceCountUpdater.java:83) ~[?:?]
at io.netty.util.internal.ReferenceCountUpdater.release(ReferenceCountUpdater.java:148) ~[?:?]
at io.netty.buffer.AbstractReferenceCountedByteBuf.release(AbstractReferenceCountedByteBuf.java:101) ~[?:?]
at io.netty.handler.codec.http.DefaultFullHttpRequest.release(DefaultFullHttpRequest.java:103) ~[?:?]
at io.netty.handler.codec.http.HttpObjectEncoder.encodeFullHttpMessage(HttpObjectEncoder.java:327) ~[?:?]
at io.netty.handler.codec.http.HttpObjectEncoder.encode(HttpObjectEncoder.java:162) ~[?:?]
at io.netty.handler.codec.http.HttpClientCodec$Encoder.encode(HttpClientCodec.java:203) ~[?:?]
at io.netty.handler.codec.http.HttpObjectEncoder.write(HttpObjectEncoder.java:97) ~[?:?]
… 28 more

Sorry only just seen this. Can you try upgrading to the latest binding? you can stay on openHAB 4.0.1 if you wish and just upgrade the binding to the latest version from here:

http://pcmus.com/openhab/IpCameraBinding/

Just drop the unzipped JAR into the addons folder and uninstall the merged binding. Installing the telstick binding will take care of the missing dependancies until you go back to using a newer openhab and the merged binding.

I have been encountering this error on my install, it doesn’t seem possible to change the state of the Enable/Disable for motion alarm. When I change it, i see the error about “Failed to mark a promise as success…” and eventually the channel state returns back to what it was before I changed it.

I am running OH 4.3.3 and the IPCamera binding from the marketplace showing version 4.3.3 in karaf:

271 │ Active │  80 │ 4.3.3                 │ openHAB Add-ons :: Bundles :: IpCamera Binding

Is there anything I can do to correct this? My objective is to use rules to enable/disable motion alarms depending on the time of day or other conditions. Unfortunately I can’t change the state of this channel so it’s just stuck in whatever state it’s currently in, Enabled on some cameras, Disabled on other cameras.

Hi,

I’m now on Openhab 5.0 M2. As for Reolink Duo 2 with the latest firmaware setting/unsetting push and email notification works as expected :slight_smile:

But for Reolink Doorbell D340W (wifi black version) with firmware v3.0.0.4662_2503182270 it does not work. What I checked within trace log of bunding and with Postman instead using SetPush and SetEmail it should be used SetPushV20 and SetEmailV20 - the same commands as for ReolinkDuo 2.

Hi,

I’m trying to get the ipcam-Binding work on openHAB3.2 with Textfiles for Reolink 2 Duo.

Do I need to define a Bridge also, as I cannot see the Thing in VScode.

Thing ipcamera:ONVIF:reolink2 "Reolink Duo2 WiFi Kamera" [
  ipAddress="192.168.178.146",
  port=554,
  username="user",
  password="pwd",
  ffmpegInputOptions="-rtsp_transport tcp",
  snapshotUrlOverride="http://192.168.178.146/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=ABCDEFG&user=user&password=pwd"
]

The direct access via URL works fine:
http://192.168.178.146/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=ABCDEFG&user=user&password=pwd

What problem are you having? You do not need to provide anything unless your trying to over ride the defaults. Remove the port as that seems wrong and may be causing an issue, you probably only need the IP username and password fields for it to work. You could create it with the UI and then look at the json code to see what the defaults are and transfer them to the thing file.

Thanks, I set port to 80.
After installing ffmpeg I’m getting this error in openhab GUI:

Camera failed to report a valid Snaphot and/or RTSP URL. Check user/pass is correct, or use the advanced configs to manually provide a URL.

Update the cameras firmware if a onvif camera does not report those then it is a bug as they are required before a camera can advertise they are onvif compatible.