IpCamera: New IP Camera Binding

Is it expected for the binding to update the motionalarm item multiple times every second?

[2023-01-08 13:02:40,079] [          HABApp.EventBus]     INFO |   BS1_IPC1_Fe_Utside: <ItemStateEvent name: BS1_IPC1_Fe_Utside, value: OFF>
[2023-01-08 13:02:40,082] [          HABApp.EventBus]     INFO |   BS1_IPC1_Fe_Utside: <ItemStateEvent name: BS1_IPC1_Fe_Utside, value: OFF>
[2023-01-08 13:02:40,082] [          HABApp.EventBus]     INFO |   BS1_IPC1_Fe_Utside: <ItemStateEvent name: BS1_IPC1_Fe_Utside, value: OFF>
[2023-01-08 13:02:40,390] [          HABApp.EventBus]     INFO |   BS1_IPC1_Fe_Utside: <ItemStateEvent name: BS1_IPC1_Fe_Utside, value: OFF>
[2023-01-08 13:02:40,394] [          HABApp.EventBus]     INFO |   BS1_IPC1_Fe_Utside: <ItemStateEvent name: BS1_IPC1_Fe_Utside, value: OFF>
[2023-01-08 13:02:40,395] [          HABApp.EventBus]     INFO |   BS1_IPC1_Fe_Utside: <ItemStateEvent name: BS1_IPC1_Fe_Utside, value: OFF>
[2023-01-08 13:02:40,705] [          HABApp.EventBus]     INFO |   BS1_IPC1_Fe_Utside: <ItemStateEvent name: BS1_IPC1_Fe_Utside, value: OFF>
[2023-01-08 13:02:40,711] [          HABApp.EventBus]     INFO |   BS1_IPC1_Fe_Utside: <ItemStateEvent name: BS1_IPC1_Fe_Utside, value: OFF>
[2023-01-08 13:02:40,713] [          HABApp.EventBus]     INFO |   BS1_IPC1_Fe_Utside: <ItemStateEvent name: BS1_IPC1_Fe_Utside, value: OFF>

When you have multiple cameras it will be generating alot of load on the event bus ā€¦? :thinking:
Is it possible to tweak this somehow?
(This is a hikvision camera)

No, that would be a new feature request. You can change the ffmpeg options for GIF using the gifOutOptions config but not for the mp4 recordings.

Thats not normal. You have not given the basic info like camera model, openhab version etc. I would not be surprised if a firmware update for the camera or upgrading to a newer openHAB solves it for you.

What i did to make images work on my openhabcloud is to transform the image url from an absolute URL to an relative URL. This works on mainui widgets which open the image then relativly to their base URL (however you opened the UI).

To achieve this i set the Profile of the Image URL channel to ā€œREGEXā€ with the following RegEx:

s/http\:\/\/192\.168\.xxx\.1[0-9][0-9]\:8080\//\//g

If the original image url was ā€œhttp://192.168.xxx.123:8080/ipcamera/xxx/ipcamera.jpgā€ it should show now ā€œ/ipcamera/xxx/ipcamera.jpgā€

(i canā€™t remember if i came up with this myself or someone posted this solution on this forum before if so credit to original)

Ok thanks, yeah I just wanted to check first. Heres the info I managed to gather:

Camera: Hikvision: DS-2DE3304W-DE (Fw: V5.4.8 build 170210) PTZ camera
Openhab: 3.4 Stable (fresh install)
Trace info (possibly event that seems to send the OFF command for motionalarm somehow?):

2023-01-09 22:15:33.220 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result back from camera is        :--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 479

<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>10.10.10.10</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>4c:bd:8f:f9:4f:61</macAddress>
<channelID>1</channelID>
<dateTime>2023-01-09T22:15:32+01:00</dateTime>
<activePostCount>0</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
</EventNotificationAlert>

This event is repeating itself continously, every 200-400ms or so.

Is that the newest firmware for the camera?

Probably not, its bought on Aliexpress but supposedly can be upgraded (english version, not multilang.) according to the ad. :laughing: Anywho if thats the problem iā€™ll try looking at upgrading it, just want to do that as a last resort so i dont brick it unnecessary

Took a leap of faith and upgraded to 5.5.2 and it instantly reduced the ā€œspamā€ to every 10 seconds, now updates 3 times every 10 seconds but stillā€¦way better! :grinning:

That is the cause, so it is the firmware.

Thats very very old firmware from 2017 and its now 2023 so you should read this post and use the link to download the latest firmware. HIK has newer firmware, but they as a company are IMHO bad at updating the links to the firmware on a website so you need to download the firmware manually.

Hikvision cameras need urgent firmware update - Off-Topic - openHAB Community

Hi all,
does somebody have a recommendation for an indoor PVZ camera (similar to Reolink E1) that is working with the binding? Best case with one of the manufacturer settings and not the general binding.

Hi all,
i am using the RTSP Stream for my Camera to show it in the Sitemap. I see there is a GIF creation available. So my question is, is it possible to create the GIF from the RTSP Stream and send it via Telegram.
I found the action to generate GIF but where are they stored?


var things = Java.type('org.openhab.core.model.script.actions.Things');


things.getActions('ipcamera', 'ipcamera:generic:5590f48d61').recordGIF('eingang', 5);

I found how it works but the gif is not available:

2023-01-29 17:17:57.165 [DEBUG] [ng.ipcamera.internal.IpCameraActions] - Recording hauseingang.gif for 5 seconds.

2023-01-29 17:17:57.165 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:-y -t 5 -hide_banner -loglevel warning -rtsp_transport tcp -i rtsp://admin:********@192.168.101.215:554/user=admin&password=********&channel=1&stream=0.sdp?real_stream--rtp-caching=500 -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 /var/lib/openhab/ipcamera/5590f48d61/hauseingang.gif

the Rule:

var things = Java.type('org.openhab.core.model.script.actions.Things');


things.getActions('telegram', 'telegram:telegramBot:b56f3b7499').sendTelegramAnimation('/var/lib/openhab/ipcamera/5590f48d61/hauseingang.gif', 'EingangGIF');

Throws this:

2023-01-29 17:17:59.647 [WARN ] [e.automation.internal.RuleEngineImpl] - Fail to execute action: 8

java.lang.RuntimeException: java.io.FileNotFoundException: /var/lib/openhab/ipcamera/5590f48d61/hauseingang.gif (No such file or directory)

	at com.pengrad.telegrambot.impl.TelegramBotClient.send(TelegramBotClient.java:74) ~[?:?]

	at com.pengrad.telegrambot.TelegramBot.execute(TelegramBot.java:42) ~[?:?]

	at org.openhab.binding.telegram.internal.TelegramHandler.execute(TelegramHandler.java:512) ~[?:?]

	at org.openhab.binding.telegram.internal.action.TelegramActions.sendTelegramAnimation(TelegramActions.java:509) ~[?:?]

	at org.openhab.binding.telegram.internal.action.TelegramActions.sendTelegramAnimation(TelegramActions.java:440) ~[?:?]

	at org.openjdk.nashorn.internal.scripts.Script$321$\^eval\_/0x000000010158ac40.:program(<eval>:4) ~[?:?]

	at org.openjdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:646) ~[?:?]

	at org.openjdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513) ~[?:?]

	at org.openjdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:520) ~[?:?]

	at org.openjdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:442) ~[?:?]

	at org.openjdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:399) ~[?:?]

	at org.openjdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:395) ~[?:?]

	at org.openjdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:151) ~[?:?]

	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) ~[java.scripting:?]

	at org.openhab.core.automation.module.script.internal.handler.ScriptActionHandler.lambda$0(ScriptActionHandler.java:71) ~[?:?]

	at java.util.Optional.ifPresent(Optional.java:183) ~[?:?]

	at org.openhab.core.automation.module.script.internal.handler.ScriptActionHandler.execute(ScriptActionHandler.java:68) ~[?:?]

	at org.openhab.core.automation.internal.RuleEngineImpl.executeActions(RuleEngineImpl.java:1180) ~[?:?]

	at org.openhab.core.automation.internal.RuleEngineImpl.runNow(RuleEngineImpl.java:1031) ~[?:?]

	at org.openhab.core.automation.rest.internal.RuleResource.runNow(RuleResource.java:328) ~[?:?]

	at org.openhab.core.automation.rest.internal.RuleResource.runNow(RuleResource.java:342) ~[?:?]

	at jdk.internal.reflect.GeneratedMethodAccessor224.invoke(Unknown Source) ~[?:?]

	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

	at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179) ~[bundleFile:3.4.5]

	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) ~[bundleFile:3.4.5]

	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201) ~[bundleFile:3.4.5]

	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:104) ~[bundleFile:3.4.5]

	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59) ~[bundleFile:3.4.5]

	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96) ~[bundleFile:3.4.5]

	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[bundleFile:3.4.5]

	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[bundleFile:3.4.5]

	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265) ~[bundleFile:3.4.5]

	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) ~[bundleFile:3.4.5]

	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) ~[bundleFile:3.4.5]

	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) ~[bundleFile:3.4.5]

	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:225) ~[bundleFile:3.4.5]

	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:298) ~[bundleFile:3.4.5]

	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:217) ~[bundleFile:3.4.5]

	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) ~[bundleFile:3.1.0]

	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:273) ~[bundleFile:3.4.5]

	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) ~[bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550) ~[bundleFile:9.4.46.v20220331]

	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:74) ~[bundleFile:?]

	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) ~[bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[bundleFile:9.4.46.v20220331]

	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:294) ~[bundleFile:?]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) ~[bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[bundleFile:9.4.46.v20220331]

	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:90) ~[bundleFile:?]

	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) [bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) [bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) [bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:555) [bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:410) [bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:164) [bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) [bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) [bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) [bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) [bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) [bundleFile:9.4.46.v20220331]

	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) [bundleFile:9.4.46.v20220331]

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

Caused by: java.io.FileNotFoundException: /var/lib/openhab/ipcamera/5590f48d61/hauseingang.gif (No such file or directory)

	at java.io.FileInputStream.open0(Native Method) ~[?:?]

	at java.io.FileInputStream.open(FileInputStream.java:219) ~[?:?]

	at java.io.FileInputStream.<init>(FileInputStream.java:157) ~[?:?]

	at okio.Okio.source(Okio.java:168) ~[?:?]

	at okhttp3.RequestBody$3.writeTo(RequestBody.java:170) ~[?:?]

	at okhttp3.MultipartBody.writeOrCountBytes(MultipartBody.java:173) ~[?:?]

	at okhttp3.MultipartBody.writeTo(MultipartBody.java:114) ~[?:?]

	at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:69) ~[?:?]

	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[?:?]

	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:43) ~[?:?]

	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[?:?]

	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[?:?]

	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94) ~[?:?]

	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[?:?]

	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[?:?]

	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) ~[?:?]

	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[?:?]

	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88) ~[?:?]

	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[?:?]

	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[?:?]

	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229) ~[?:?]

	at okhttp3.RealCall.execute(RealCall.java:81) ~[?:?]

	at com.pengrad.telegrambot.impl.TelegramBotClient.send(TelegramBotClient.java:71) ~[?:?]

	... 79 more

Anyone any Idea?

Regards
Simon

Hello everybody,
seems like I will need some help from you.

Iā€™m trying to get Tapo C200 cam working with this binding.
The cam can be moved(paned & tilted) with Onvif Device Manager.

Iā€™am able to receive both video streams and get an alert if there is a motion detected.
PTZ is also working, but only relativ and continous.
With the Onvif Device Manager continous, relativ and absolute movement is working.

Iā€™m prefering the absolut movement, because the others react to slow to turn the camera in an exact position.

Maybe I am donig something wrong or there is a bug in the binding?!

Here are my settings:

Thing:

UID: ipcamera:onvif:9809d4928a
label: Cam_Tapo_2
thingTypeUID: ipcamera:onvif
configuration:
  mjpegOptions: -q:v 5 -r 10 -update 1
  ipAddress: 192.168.xxx.xx
  updateImageWhen: "0"
  onvifPort: 2020
  gifPreroll: 0
  ffmpegLocation: /usr/bin/ffmpeg
  ipWhitelist: DISABLE
  mp4OutOptions: -c:v copy -c:a copy
  pollTime: 1000
  password: xxx
  port: 80
  snapshotOptions: -an -vsync vfr -q:v 2 -update 1
  ptzContinuous: true
  onvifMediaProfile: 0
  hlsOutOptions: -strict -2 -f lavfi -i aevalsrc=0 -acodec aac -vcodec copy
    -hls_flags delete_segments -hls_time 2 -hls_list_size 4
  gifOutOptions: -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
  username: niklas

Items:

Switch Cam_Tapo_2_motionAlarm   "Motion detected"        <motion>        {channel="ipcamera:onvif:9809d4928a:cellMotionAlarm"}
Dimmer Cam_Tapo_2_pan           "Pan [%d] left/right"                   {channel="ipcamera:onvif:9809d4928a:pan"}
Dimmer Cam_Tapo_2_tilt          "Tilt [%d] up/down"                     {channel="ipcamera:onvif:9809d4928a:tilt"}

Sitemap:

Video url="http://192.168.xxx.xx:8080/ipcamera/9809d4928a/ipcamera.mjpeg" encoding="mjpeg"
					Switch item=Cam_Tapo_2_pan mappings=[INCREASE="Left",OFF="STOP",DECREASE="Right"]
					Switch item=Cam_Tapo_2_tilt mappings=[INCREASE="Down",OFF="STOP",DECREASE="Up"]
					Slider item=Cam_Tapo_2_pan icon=movecontrol
					Slider item=Cam_Tapo_2_tilt icon=movecontrol

Initially Iā€™m receving these PTZ informations from the Cam:

12:09:26.330 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connecting 192.168.xxx.xx to ONVIF
12:09:26.472 [DEBUG] [camera.internal.onvif.OnvifConnection] - Cameras  UTC dateTime is:2023-2-16T11:9:26
12:09:26.473 [DEBUG] [camera.internal.onvif.OnvifConnection] - Openhabs UTC dateTime is:2023-02-16T11:09:26.473Z
12:09:26.586 [DEBUG] [camera.internal.onvif.OnvifConnection] - deviceXAddr:http://192.168.xxx.xx:2020/onvif/service
12:09:26.587 [DEBUG] [camera.internal.onvif.OnvifConnection] - eventsXAddr:http://192.168.xxx.xx:2020/onvif/service
12:09:26.587 [DEBUG] [camera.internal.onvif.OnvifConnection] - mediaXAddr:http://192.168.xxx.xx:2020/onvif/service
12:09:26.587 [DEBUG] [camera.internal.onvif.OnvifConnection] - ptzXAddr:http://192.168.xxx.xx:2020/onvif/service
12:09:26.840 [DEBUG] [camera.internal.onvif.OnvifConnection] - ptzNodeToken=PTZNODETOKEN
12:09:26.896 [DEBUG] [camera.internal.onvif.OnvifConnection] - GetStreamUri:rtsp://192.168.xxx.xx:554/stream1
12:09:26.944 [DEBUG] [camera.internal.onvif.OnvifConnection] - Processing new PTZ location now
12:09:26.944 [DEBUG] [camera.internal.onvif.OnvifConnection] - Pan is updating to:1500 and the cam value is 29.0
12:09:26.945 [DEBUG] [camera.internal.onvif.OnvifConnection] - Tilt is updating to:-1550 and the cam value is -32.0
12:09:26.945 [DEBUG] [camera.internal.onvif.OnvifConnection] - Zoom is updating to:2900 and the cam value is 29.0
12:09:26.950 [DEBUG] [camera.internal.onvif.OnvifConnection] - ptzConfigToken=PTZTOKEN
12:09:26.981 [DEBUG] [camera.internal.onvif.OnvifConnection] - subscriptionXAddr=http://192.168.xxx.xx:1025/event-1025_1025

Somebody any idea?

Short update: Also relative movement isnā€™t working with the bindingā€¦

Do you know how to use wireshark? see if you can capture the data that ODM sends and compare it to the bindings packet, then we can look at making the change so they match.

Hey @matt1, thank you for the response. I havnā€™t worked with wireshark yet, but I will take a look at it and post, if I have captured some usefull packages. But it can take a while. I need to find some time for this.

Donā€™t know if this is the best place to post. I upgraded from OH3.4 to OH4.0M1 and had a few problems with the cameras (reolink POE). I think it is related to my thing naming but looking for confirmation. (Iā€™m back on 3.4 for now). Details: On my Rpi4 I run 4 Reolink POE cameras. I have used the IP camera binding almost from the beginning, so could have outdated/old configs (although they were running on OH3.4) I have three configured in text files and one discovered via scan. The error messages on OH4 were;

023-03-11 10:46:52.582 [WARN ] [amera.internal.servlet.CameraServlet] - Registering servlet failed:ServletModel{id=ServletModel-33,name='org.openhab.binding.ipcamera.internal.servlet.CameraServlet',alias='/ipcamera/1921680126',urlPatterns=[/ipcamera/1921680126/*],servlet=org.openhab.binding.ipcamera.internal.servlet.CameraServlet@9fc293,contexts=[{HS,OCM-31,default,/}]} can't be registered. ServletContextModel{id=ServletContextModel-3,contextPath='/'} already contains servlet named org.openhab.binding.ipcamera.internal.servlet.CameraServlet: ServletModel{id=ServletModel-32,name='org.openhab.binding.ipcamera.internal.servlet.CameraServlet',alias='/ipcamera/0a12eddc3d',urlPatterns=[/ipcamera/0a12eddc3d/*],servlet=org.openhab.binding.ipcamera.internal.servlet.CameraServlet@b975a,contexts=[{HS,OCM-31,default,/}]}
2023-03-11 10:46:52.680 [WARN ] [amera.internal.servlet.CameraServlet] - Registering servlet failed:ServletModel{id=ServletModel-34,name='org.openhab.binding.ipcamera.internal.servlet.CameraServlet',alias='/ipcamera/1921680247',urlPatterns=[/ipcamera/1921680247/*],servlet=org.openhab.binding.ipcamera.internal.servlet.CameraServlet@beac7b,contexts=[{HS,OCM-31,default,/}]} can't be registered. ServletContextModel{id=ServletContextModel-3,contextPath='/'} already contains servlet named org.openhab.binding.ipcamera.internal.servlet.CameraServlet: ServletModel{id=ServletModel-32,name='org.openhab.binding.ipcamera.internal.servlet.CameraServlet',alias='/ipcamera/0a12eddc3d',urlPatterns=[/ipcamera/0a12eddc3d/*],servlet=org.openhab.binding.ipcamera.internal.servlet.CameraServlet@b975a,contexts=[{HS,OCM-31,default,/}]}
2023-03-11 10:46:54.639 [WARN ] [amera.internal.servlet.CameraServlet] - Registering servlet failed:ServletModel{id=ServletModel-35,name='org.openhab.binding.ipcamera.internal.servlet.CameraServlet',alias='/ipcamera/1921680133',urlPatterns=[/ipcamera/1921680133/*],servlet=org.openhab.binding.ipcamera.internal.servlet.CameraServlet@1d6237a,contexts=[{HS,OCM-31,default,/}]} can't be registered. ServletContextModel{id=ServletContextModel-3,contextPath='/'} already contains servlet named org.openhab.binding.ipcamera.internal.servlet.CameraServlet: ServletModel{id=ServletModel-32,name='org.openhab.binding.ipcamera.internal.servlet.CameraServlet',alias='/ipcamera/0a12eddc3d',urlPatterns=[/ipcamera/0a12eddc3d/*],servlet=org.openhab.binding.ipcamera.internal.servlet.CameraServlet@b975a,contexts=[{HS,OCM-31,default,/}]}

The one camera that was working ok was using an OH assigned UID.
Working OH4 camera
It seems all the cameras were trying to get assigned to that number. My first thought was to change the UIDs. Any insights?

Yes I got caught with this and have done a quick look. Only the first camera to complete startup routine will work at serving files. It has nothing to do with UID as far as I know as I could pause the working camera and use the pause then unpause on a broken one to cause it to work. There was a change made in a PR the last week and itā€™s possible it broke this whilst fixing another issue. I am still getting up to speed with V4 build environment so fingers crossed someone that knows jetty steps in to fix.

1 Like

Same here after upgrading to 4.0.0M1.

:+1:

After upgrade to 4.0.0.M1 problem with ffmpeg stream comes up again.
It does not close the stream when camera view is closed.
ffmpeg stream is opened all the time.

Is there anything I can do about it?

That is the browsers fault of not closing the stream in case you want to navigate back. This can be solved by pressing refresh after you navigate away from the widget or view of the camera. You could try using a different browser or look into if there is a way to turn that feature of the browser off.

Hi @matt1 It cannot be fault of web browser. It is acting like that on Firefox, Chrome and Edge on PC and also on Android app. After testing I am closing web browser completely so it cannot be its fault.

This is exactly the same situation like on Dec 2022. You have prepared fix for it and after applying it was working just fine. Now on 4.0.0.M1 it is faulty again.

Thanks for the info, I have made a build for V4.0 with those changes in it here:
Index of /openhab/IpCameraBinding/ (pcmus.com)

The changes are not merged yet as I only just got the build enviroment working again tonight as have been busy.

1 Like