Adding Reolink API to the IpCamera binding, beta testers needed

The times are 8 seconds apart and the time may have expired. I think the upcoming changes may help if that is the cause. Its only a week or two and we will have builds for the next stable needing to be tested.

@El_Duderino can you test the latest openhab release candidate to see if it still occurs for you?

Hi all,

update figured it out.. when i upgraded some how the password still showed up with ****** but i deleted it and retyped it and it worked.

I just upgraded to 4.3 and now i cannot connect to my reolink doorbell with the API token enabled. I can only connect when i turn the api token off.
If i set to on i get a bad username and password.

Thanks for reporting. My theory is that the reply for the token does not come back fast enough before the camera comes online and all the REFRESH commands are sent for all the channels. Can you confirm this with the TRACE logs? The REFRESH commands are what was newly added so that openHAB asks for each channel what the setting is in the camera so that it can display the correct state and the openHAB controls match the states in the camera. Your work around of not using the tokens is probably the best way forward until we can confirm and get a fix released.

Hi @matt1 ,

I found problem with setting / unsetting enableEmail for Reolink Wifi Dorbell D340W. It is not working and generating such trace logs:

2025-01-06 12:23:24.019 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: POST: http://x.x.x.x:80/api.cgi?cmd=SetEmail&user=admin&password=xxxx
2025-01-06 12:23:24.194 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result from /api.cgi?cmd=SetEmail&user=admin&password=xxxx contains       :[
   {
      "cmd" : "Unknown",
      "code" : 1,
      "error" : {
         "detail" : "not support",
         "rspCode" : -9
      }
   }
]
:
2025-01-06 12:23:24.195 [WARN ] [era.internal.handler.IpCameraHandler] - URL /api.cgi?cmd=SetEmail is not handled currently by the binding, please report this message


Using postman i checked that setting / unsetting email notifications works with SetEmailV20 requests:

[{“cmd”: “SetEmailV20”,“param”: {“Email”: {“enable”: 1}}}]
[{“cmd”: “SetEmailV20”,“param”: {“Email”: {“enable”: 0}}}]

Also setting and unsetting push notificationsis working not as expected. Below are trace logs:

2025-01-06 12:31:33.094 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: POST: http://x.x.x.x:80/api.cgi?cmd=SetPush&user=admin&password=xxxx
2025-01-06 12:31:33.417 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result from /api.cgi?cmd=SetPush&user=admin&password=xxxx contains        :[
   {
      "cmd" : "SetPush",
      "code" : 0,
      "value" : {
         "rspCode" : 200
      }
   }
]
:
2025-01-06 12:31:33.418 [WARN ] [era.internal.handler.IpCameraHandler] - URL /api.cgi?cmd=SetPush is not handled currently by the binding, please report this message

but more over it is canceling any calendar for notifications on doorbell - below is answer for GetPushV20 request:

[
{
"cmd" : "GetPushV20",
"code" : 0,
"value" : {
"Push" : {
"enable" : 0,
"schedule" : {
"channel" : 0,
"table" : {
"AI_PEOPLE" :
"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"MD" :
"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"VISITOR" :
"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
}
}
}
}
]

What I checked it should work properly with such SetPushV20 requests:

[{“cmd”: “SetPushV20”,“param”:{“Push”:{“enable”: 1}}}]
[{“cmd”: “SetPushV20”,“param”:{“Push”:{“enable”: 0}}}]

I registered bugs for it:

https://github.com/openhab/openhab-addons/issues/18071

https://github.com/openhab/openhab-addons/issues/18072

Hi Matt,
Even though I recently reboot my openhab system frequently (for other reasons), it has definitely worked for like 3 or 4 days, which is much longer than it ever did before. I do believe that it is stable now.
I can only imagine how much you have on your plate and I have actually managed to find workarounds, but just wondering if there are plans to support this Reolink box, which seems to add a layer in between the camera where many things are then done “per channel”. Right now the motion detection triggers when either of the cameras trigger it, but then it’s not possible to determine the source. I am currently using the folder watcher addon and then look at the filenames to figure that out. Which works good enough for me…

I do not own whatever box you refer to, so it is hard to fault find and test changes when I do not have one. I can look at making changes if you do some of the leg work, which how to do this is covered in the very first post of this thread (if not in the replies that follow) if my memory is correct I wrote instructions on how to test and give feedback on testing the API commands.

I have been seeing for last few months that many of my cameras detect the same event from the binding - they are connected to a Reolink NVR on different channels but the event log is below. I deleted and recreated all the things but no change.

21:05:13.168	INFO	openhab.event.ItemStateChangedEvent	Item 'CameraFamilyRoomHumanAlarm' changed from OFF to ON
21:05:13.210	INFO	openhab.event.ItemStateChangedEvent	Item 'NorthSideCameraHumanAlarm' changed from OFF to ON
21:05:13.212	INFO	openhab.event.ItemStateChangedEvent	Item 'BackDeckCameraHumanAlarm' changed from OFF to ON
21:05:13.228	INFO	openhab.event.ItemStateChangedEvent	Item 'GarageEastCameraHumanAlarm' changed from OFF to ON
21:05:18.408	INFO	openhab.event.ItemStateChangedEvent	Item 'CameraFamilyRoomHumanAlarm' changed from ON to OFF
21:05:18.458	INFO	openhab.event.ItemStateChangedEvent	Item 'BackDeckCameraHumanAlarm' changed from ON to OFF
21:05:18.459	INFO	openhab.event.ItemStateChangedEvent	Item 'NorthSideCameraHumanAlarm' changed from ON to OFF
21:05:18.471	INFO	openhab.event.ItemStateChangedEvent	Item 'GarageEastCameraHumanAlarm' changed from ON to OFF
21:05:48.636	INFO	openhab.event.ItemStateChangedEvent	Item 'BackDeckCameraAnimalAlarm' changed from OFF to ON
21:05:48.649	INFO	openhab.event.ItemStateChangedEvent	Item 'CameraFamilyRoomAnimalAlarm' changed from OFF to ON
21:05:48.695	INFO	openhab.event.ItemStateChangedEvent	Item 'NorthSideCameraAnimalAlarm' changed from OFF to ON
21:05:48.696	INFO	openhab.event.ItemStateChangedEvent	Item 'GarageEastCameraAnimalAlarm' changed from OFF to ON
21:05:56.499	INFO	openhab.event.ItemStateChangedEvent	Item 'BackDeckCameraAnimalAlarm' changed from ON to OFF
21:05:56.524	INFO	openhab.event.ItemStateChangedEvent	Item 'CameraFamilyRoomAnimalAlarm' changed from ON to OFF
21:05:56.565	INFO	openhab.event.ItemStateChangedEvent	Item 'NorthSideCameraAnimalAlarm' changed from ON to OFF
21:05:56.567	INFO	openhab.event.ItemStateChangedEvent	Item 'GarageEastCameraAnimalAlarm' changed from ON to OFF
21:07:43.938	INFO	openhab.event.ItemStateChangedEvent	Item 'GarageEastCameraAnimalAlarm' changed from OFF to ON
21:07:43.978	INFO	openhab.event.ItemStateChangedEvent	Item 'BackDeckCameraAnimalAlarm' changed from OFF to ON
21:07:44.002	INFO	openhab.event.ItemStateChangedEvent	Item 'NorthSideCameraAnimalAlarm' changed from OFF to ON
21:07:44.016	INFO	openhab.event.ItemStateChangedEvent	Item 'CameraFamilyRoomAnimalAlarm' changed from OFF to ON
21:07:47.896	INFO	openhab.event.ItemStateChangedEvent	Item 'CameraFamilyRoomHumanAlarm' changed from ON to OFF
21:07:47.956	INFO	openhab.event.ItemStateChangedEvent	Item 'GarageEastCameraHumanAlarm' changed from ON to OFF
21:07:47.957	INFO	openhab.event.ItemStateChangedEvent	Item 'BackDeckCameraHumanAlarm' changed from ON to OFF
21:07:48.051	INFO	openhab.event.ItemStateChangedEvent	Item 'NorthSideCameraHumanAlarm' changed from ON to OFF

Hi, I have a question regarding the binding.
I added my Reolink Altas PT Ultra and on a page I use the mpeg-stream.

In the config I have this:

component: oh-image-card
          config:
            url: http://192.168.178.50:8080/ipcamera/reolink_altas/ipcamera.mjpeg

When I first open up the page I can see the following log entry:

6:42:31.718 [DEBUG] [camera.internal.servlet.CameraServlet] - GET:/ipcamera.mjpeg, received from 192.168.178.38
16:42:31.720 [DEBUG] [camera.internal.servlet.CameraServlet] - First stream requested, opening up stream from camera
16:42:31.753 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now: -rtsp_transport tcp -hide_banner -i rtsp://admin:********@192.168.178.93:554/h264Preview_01_sub -q:v 4 -r 4 -update 1 http://127.0.0.1:8080/ipcamera/reolink_altas/ipcamera.jpg

where: 192.168.178.38 ist my Client - where I run the Browser
and: 192.168.178.50 is the openhabian system
and 192.168.178.93 is the Reolink Home-Hub (where the Cam is connected to)

Then I can watch the video.
After a little bit of time (timeout? 5 Minutes?) the stream freezes and the following messages appear in the log:

17:11:14.762 [DEBUG] [mera.internal.handler.IpCameraHandler] - MJPEG was not being produced by FFmpeg when it should have been, restarting FFmpeg.
and are repeated every few seconds (8 seconds)

Then nothing gets me back to a working stream.
I tried to reload the page - I just showed the frozen picture - and then a white frame.

I tried to stop an start the camera-thing:
The log looks like:

17:27:59.696 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Stopping ffmpeg MJPEG now when keepalive is: 8
17:27:59.778 [DEBUG] [ing.ipcamera.internal.IpCameraActions] - bundle org.openhab.binding.ipcamera:4.3.4 (271)[org.openhab.binding.ipcamera.internal.IpCameraActions(344)] : ServiceFactory.ungetService()
17:27:59.784 [DEBUG] [ing.ipcamera.internal.IpCameraActions] - bundle org.openhab.binding.ipcamera:4.3.4 (271)[org.openhab.binding.ipcamera.internal.IpCameraActions(344)] : getting deactivate: deactivate
17:27:59.788 [DEBUG] [ing.ipcamera.internal.IpCameraActions] - bundle org.openhab.binding.ipcamera:4.3.4 (271)[org.openhab.binding.ipcamera.internal.IpCameraActions(344)] : Locating method deactivate in class org.openhab.binding.ipcamera.internal.IpCameraActions
17:27:59.792 [DEBUG] [ing.ipcamera.internal.IpCameraActions] - bundle org.openhab.binding.ipcamera:4.3.4 (271)[org.openhab.binding.ipcamera.internal.IpCameraActions(344)] : Declared Method org.openhab.binding.ipcamera.internal.IpCameraActions.deactivate([interface org.osgi.service.component.ComponentContext]) not found
17:27:59.796 [DEBUG] [ing.ipcamera.internal.IpCameraActions] - bundle org.openhab.binding.ipcamera:4.3.4 (271)[org.openhab.binding.ipcamera.internal.IpCameraActions(344)] : Locating method deactivate in class java.lang.Object
17:27:59.799 [DEBUG] [ing.ipcamera.internal.IpCameraActions] - bundle org.openhab.binding.ipcamera:4.3.4 (271)[org.openhab.binding.ipcamera.internal.IpCameraActions(344)] : Declared Method java.lang.Object.deactivate([interface org.osgi.service.component.ComponentContext]) not found
17:27:59.802 [DEBUG] [ing.ipcamera.internal.IpCameraActions] - bundle org.openhab.binding.ipcamera:4.3.4 (271)[org.openhab.binding.ipcamera.internal.IpCameraActions(344)] : deactivate method [deactivate] not found, ignoring
17:27:59.805 [DEBUG] [ing.ipcamera.internal.IpCameraActions] - bundle org.openhab.binding.ipcamera:4.3.4 (271)[org.openhab.binding.ipcamera.internal.IpCameraActions(344)] : DependencyManager: osgi.ds.satisfying.condition close component unbinding from org.apache.felix.scr.impl.manager.ComponentContextImpl@9cf742 at tracking count 1 refpairs: [[RefPair: ref: [{org.osgi.service.condition.Condition}={service.id=6, service.bundleid=0, service.scope=singleton, service.pid=0.org.osgi.service.condition.ConditionImpl, osgi.condition.id=true}] service: [null]]]
17:27:59.808 [DEBUG] [ing.ipcamera.internal.IpCameraActions] - bundle org.openhab.binding.ipcamera:4.3.4 (271)[org.openhab.binding.ipcamera.internal.IpCameraActions(344)] : Querying state active
17:27:59.811 [DEBUG] [ing.ipcamera.internal.IpCameraActions] - bundle org.openhab.binding.ipcamera:4.3.4 (271)[org.openhab.binding.ipcamera.internal.IpCameraActions(344)] : Changed state from active to satisfied
17:27:59.815 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'ipcamera:reolink:reolink_altas' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
17:28:01.762 [DEBUG] [camera.internal.onvif.OnvifConnection] - Eventloop is shutdown: true

Restarting the camera thing:

17:28:20.319 [DEBUG] [ing.ipcamera.internal.IpCameraActions] - bundle org.openhab.binding.ipcamera:4.3.4 (271)[org.openhab.binding.ipcamera.internal.IpCameraActions(344)] : ServiceFactory.getService()
17:28:20.324 [DEBUG] [ing.ipcamera.internal.IpCameraActions] - bundle org.openhab.binding.ipcamera:4.3.4 (271)[org.openhab.binding.ipcamera.internal.IpCameraActions(344)] : This thread collected dependencies
17:28:20.328 [DEBUG] [ing.ipcamera.internal.IpCameraActions] - bundle org.openhab.binding.ipcamera:4.3.4 (271)[org.openhab.binding.ipcamera.internal.IpCameraActions(344)] : getService (ServiceFactory) dependencies collected.
17:28:20.332 [DEBUG] [ing.ipcamera.internal.IpCameraActions] - bundle org.openhab.binding.ipcamera:4.3.4 (271)[org.openhab.binding.ipcamera.internal.IpCameraActions(344)] : Querying state satisfied
17:28:20.337 [DEBUG] [ing.ipcamera.internal.IpCameraActions] - bundle org.openhab.binding.ipcamera:4.3.4 (271)[org.openhab.binding.ipcamera.internal.IpCameraActions(344)] : For dependency osgi.ds.satisfying.condition, optional: false; to bind: [[RefPair: ref: [{org.osgi.service.condition.Condition}={service.id=6, service.bundleid=0, service.scope=singleton, service.pid=0.org.osgi.service.condition.ConditionImpl, osgi.condition.id=true}] service: [null]]]
17:28:20.343 [DEBUG] [ing.ipcamera.internal.IpCameraActions] - bundle org.openhab.binding.ipcamera:4.3.4 (271)[org.openhab.binding.ipcamera.internal.IpCameraActions(344)] : Changed state from satisfied to active
17:28:20.368 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'ipcamera:reolink:reolink_altas' changed from UNINITIALIZED (DISABLED) to INITIALIZING
17:28:20.412 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connecting 192.168.178.93 to ONVIF
17:28:20.421 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: /192.168.178.93:8000
17:28:20.422 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: /192.168.178.93:8000
17:28:20.432 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'ipcamera:reolink:reolink_altas' changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR): Camera refused to connect when using ONVIF to port:8000
17:28:20.469 [DEBUG] [mera.internal.handler.IpCameraHandler] - Your Reolink camera gave a login:&token=44e5dbb82a5ae57
17:28:20.479 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'ipcamera:reolink:reolink_altas' changed from OFFLINE (COMMUNICATION_ERROR): Camera refused to connect when using ONVIF to port:8000 to ONLINE
17:28:20.483 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF was not connected when a PTZ request was made, connecting now
17:28:20.486 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connecting 192.168.178.93 to ONVIF
17:28:20.491 [DEBUG] [camera.internal.onvif.OnvifConnection] - IndexOutOfBoundsException occured, camera is not connected via ONVIF: Index: 1, Size: 0
17:28:20.494 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: /192.168.178.93:8000
17:28:20.495 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: /192.168.178.93:8000
17:28:20.504 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connecting 192.168.178.93 to ONVIF
17:28:20.504 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'ipcamera:reolink:reolink_altas' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Camera refused to connect when using ONVIF to port:8000
17:28:20.514 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: /192.168.178.93:8000
17:28:20.516 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: /192.168.178.93:8000
17:28:20.743 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Reolink_Camera_with_API_Altas_2_Enable_FTP' changed from ON to OFF
17:28:22.555 [DEBUG] [camera.internal.onvif.OnvifConnection] - Eventloop is shutdown: true
17:28:23.828 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Reolink_Camera_with_API_Altas_2_White_LED' changed from 100 to 0
17:28:24.512 [DEBUG] [mera.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP: 192.168.178.93:8000
17:28:24.515 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connecting 192.168.178.93 to ONVIF
17:28:24.522 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: /192.168.178.93:8000
17:28:24.522 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: /192.168.178.93:8000
17:28:36.519 [DEBUG] [mera.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP: 192.168.178.93:8000
17:28:36.523 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connecting 192.168.178.93 to ONVIF
17:28:36.530 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: /192.168.178.93:8000
17:28:36.536 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: /192.168.178.93:8000
17:28:38.741 [DEBUG] [mera.internal.handler.IpCameraHandler] - Closing an idle channel for 192.168.178.93/api.cgi?cmd=GetFtpV20&token=44e5dbb82a5ae57
17:28:41.829 [DEBUG] [mera.internal.handler.IpCameraHandler] - Closing an idle channel for 192.168.178.93/api.cgi?cmd=GetWhiteLed&token=44e5dbb82a5ae57
17:28:41.846 [DEBUG] [mera.internal.handler.IpCameraHandler] - Closing an idle channel for 192.168.178.93/api.cgi?cmd=GetAiCfg&token=44e5dbb82a5ae57
17:28:48.529 [DEBUG] [mera.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP: 192.168.178.93:8000
17:28:48.532 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connecting 192.168.178.93 to ONVIF
17:28:48.540 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: /192.168.178.93:8000
17:28:48.540 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connect failed - cause is: Connection refused: /192.168.178.93:8000
17:29:10.574 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'ipcamera:reolink:reolink_altas' changed from OFFLINE (COMMUNICATION_ERROR): Camera refused to connect when using ONVIF to port:8000 to OFFLINE (COMMUNICATION_ERROR): Camera timed out when trying to connect to the ONVIF port:8000
17:29:12.542 [DEBUG] [mera.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP: 192.168.178.93:8000
17:29:12.546 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connecting 192.168.178.93 to ONVIF
17:29:17.852 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Garage_Spritz_Fahhrad_FRITZDECT_210_Elektrische_Spannung' changed from 234.578 V to 233.493 V
17:29:19.826 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connect failed - cause is: No route to host: /192.168.178.93:8000
17:29:19.826 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connect failed - cause is: No route to host: /192.168.178.93:8000
17:29:24.551 [DEBUG] [mera.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP: 192.168.178.93:8000
17:29:24.555 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connecting 192.168.178.93 to ONVIF
17:29:27.666 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connect failed - cause is: No route to host: /192.168.178.93:8000
17:29:27.666 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connect failed - cause is: No route to host: /192.168.178.93:8000
17:29:36.560 [DEBUG] [mera.internal.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP: 192.168.178.93:8000
17:29:36.564 [DEBUG] [camera.internal.onvif.OnvifConnection] - Connecting 192.168.178.93 to ONVIF
17:29:38.758 [DEBUG] [camera.internal.onvif.OnvifConnection] - deviceXAddr: http://192.168.10.2:8000/onvif/device_service
17:29:38.763 [DEBUG] [camera.internal.onvif.OnvifConnection] - eventsXAddr: http://192.168.10.2:8000/onvif/event_service
17:29:38.767 [DEBUG] [camera.internal.onvif.OnvifConnection] - mediaXAddr: http://192.168.10.2:8000/onvif/media_service
17:29:38.771 [DEBUG] [camera.internal.onvif.OnvifConnection] - ptzXAddr: http://192.168.10.2:8000/onvif/ptz_service
17:29:38.778 [DEBUG] [camera.internal.onvif.OnvifConnection] - Camera  UTC dateTime is: 2025-4-24T15:29:39 openHAB time is 2025-4-24T15:29:38 time is offset by 224ms
17:29:38.885 [WARN ] [camera.internal.onvif.OnvifConnection] - You have set the media profile to 1 when the camera reported 0 profiles. Falling back to mainstream 0.
17:29:38.889 [DEBUG] [camera.internal.onvif.OnvifConnection] - IndexOutOfBoundsException occured, Index: 0, Size: 0
17:29:38.894 [DEBUG] [camera.internal.onvif.OnvifConnection] - IndexOutOfBoundsException occured, Index: 0, Size: 0
17:29:38.996 [DEBUG] [camera.internal.onvif.OnvifConnection] - IndexOutOfBoundsException occured, Index: 0, Size: 0
17:29:39.001 [DEBUG] [camera.internal.onvif.OnvifConnection] - ptzNodeToken=
17:29:39.017 [DEBUG] [camera.internal.onvif.OnvifConnection] - subscriptionXAddr=http://192.168.178.93:8000/onvif/PullSubManager?Idx=38034 subscriptionId=
17:29:39.097 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/CellMotionDetector/Motion, Data name: IsMotion, Data value: false
17:29:39.102 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/FaceDetect, Data name: State, Data value: false
17:29:39.106 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/PeopleDetect, Data name: State, Data value: false
17:29:39.111 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/VehicleDetect, Data name: State, Data value: false
17:29:39.116 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/DogCatDetect, Data name: State, Data value: false
17:29:39.121 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: VideoSource/MotionAlarm, Data name: State, Data value: false
17:29:39.214 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/Visitor, Data name: State, Data value: false
17:29:39.218 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/Package, Data name: State, Data value: false
17:29:39.221 [DEBUG] [camera.internal.onvif.OnvifConnection] - Please report this camera has an un-implemented ONVIF event. Topic: RuleEngine/MyRuleDetector/Package
17:29:39.225 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/CellMotionDetector/Motion, Data name: IsMotion, Data value: false
17:29:39.229 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/FaceDetect, Data name: State, Data value: false
17:29:39.232 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/PeopleDetect, Data name: State, Data value: false
17:29:39.237 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/VehicleDetect, Data name: State, Data value: false
17:29:48.581 [DEBUG] [mera.internal.handler.IpCameraHandler] - Token thread for REOLINK was stopped, restarting it now.
17:29:48.589 [DEBUG] [camera.internal.onvif.OnvifConnection] - IndexOutOfBoundsException occured, Index: 0, Size: 0
17:29:49.033 [DEBUG] [mera.internal.handler.IpCameraHandler] - Your Reolink camera gave a login:&token=e3676d2d419d69b
17:29:49.125 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Reolink_Camera_with_API_Altas_2_White_LED' changed from 0 to 100
17:29:49.181 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Reolink_Camera_with_API_Altas_2_Enable_FTP' changed from OFF to ON
17:29:49.367 [DEBUG] [mera.internal.handler.IpCameraHandler] - Camera has no AiDogCat support.
17:29:49.370 [DEBUG] [mera.internal.handler.IpCameraHandler] - Camera has no AiTrackClassify support.
17:29:49.372 [DEBUG] [mera.internal.handler.IpCameraHandler] - Camera has no AiPeople support.
17:29:49.374 [DEBUG] [mera.internal.handler.IpCameraHandler] - Camera has no AiVehicle support.
17:29:49.376 [DEBUG] [mera.internal.handler.IpCameraHandler] - Camera has no AudioAlarm support.
17:29:49.378 [DEBUG] [mera.internal.handler.IpCameraHandler] - Camera has no support for controlling AudioAlarms.
17:29:49.380 [DEBUG] [mera.internal.handler.IpCameraHandler] - Camera has no AiFace support.
17:29:49.581 [DEBUG] [camera.internal.onvif.OnvifConnection] - The alarm stream was not running for camera 192.168.178.93, re-starting it now
17:29:49.584 [DEBUG] [mera.internal.handler.IpCameraHandler] - There are 11 open Channels being tracked.
17:29:49.586 [DEBUG] [mera.internal.handler.IpCameraHandler] - Open channel to camera is used for URL: /api.cgi?cmd=GetIrLights&token=44e5dbb82a5ae57
17:29:49.589 [DEBUG] [mera.internal.handler.IpCameraHandler] - Open channel to camera is used for URL: /api.cgi?cmd=GetAiCfg&token=44e5dbb82a5ae57
17:29:49.592 [DEBUG] [mera.internal.handler.IpCameraHandler] - Open channel to camera is used for URL: /api.cgi?cmd=GetAbility&token=e3676d2d419d69b
17:29:49.594 [DEBUG] [mera.internal.handler.IpCameraHandler] - Open channel to camera is used for URL: /api.cgi?cmd=Login
17:29:49.596 [DEBUG] [mera.internal.handler.IpCameraHandler] - Open channel to camera is used for URL: /api.cgi?cmd=GetRecV20&token=44e5dbb82a5ae57
17:29:49.599 [DEBUG] [mera.internal.handler.IpCameraHandler] - Open channel to camera is used for URL: /api.cgi?cmd=GetMdAlarm&token=44e5dbb82a5ae57
17:29:49.601 [DEBUG] [mera.internal.handler.IpCameraHandler] - Open channel to camera is used for URL: /api.cgi?cmd=GetEmailV20&token=44e5dbb82a5ae57
17:29:49.603 [DEBUG] [mera.internal.handler.IpCameraHandler] - Open channel to camera is used for URL: /api.cgi?cmd=GetFtpV20&token=44e5dbb82a5ae57
17:29:49.605 [DEBUG] [mera.internal.handler.IpCameraHandler] - Open channel to camera is used for URL: /api.cgi?cmd=GetWhiteLed&token=44e5dbb82a5ae57
17:29:49.608 [DEBUG] [mera.internal.handler.IpCameraHandler] - Open channel to camera is used for URL: /api.cgi?cmd=GetPushV20&token=44e5dbb82a5ae57
17:29:49.666 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/PeopleDetect, Data name: State, Data value: false
17:29:49.669 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/VehicleDetect, Data name: State, Data value: false
17:29:49.672 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/DogCatDetect, Data name: State, Data value: false
17:29:49.675 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: VideoSource/MotionAlarm, Data name: State, Data value: false
17:29:49.678 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/Visitor, Data name: State, Data value: false
17:29:49.680 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/Package, Data name: State, Data value: false
17:29:49.683 [DEBUG] [camera.internal.onvif.OnvifConnection] - Please report this camera has an un-implemented ONVIF event. Topic: RuleEngine/MyRuleDetector/Package
17:29:49.755 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/CellMotionDetector/Motion, Data name: IsMotion, Data value: false
17:29:49.758 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/FaceDetect, Data name: State, Data value: false
17:29:49.760 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/PeopleDetect, Data name: State, Data value: false
17:29:49.763 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/VehicleDetect, Data name: State, Data value: false
17:29:49.766 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/DogCatDetect, Data name: State, Data value: false
17:29:49.769 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: VideoSource/MotionAlarm, Data name: State, Data value: false
17:29:49.809 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/Visitor, Data name: State, Data value: false
17:29:49.812 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/Package, Data name: State, Data value: false
17:29:49.814 [DEBUG] [camera.internal.onvif.OnvifConnection] - Please report this camera has an un-implemented ONVIF event. Topic: RuleEngine/MyRuleDetector/Package
17:29:49.816 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/CellMotionDetector/Motion, Data name: IsMotion, Data value: false
17:29:49.819 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/FaceDetect, Data name: State, Data value: false
17:29:49.821 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/PeopleDetect, Data name: State, Data value: false
17:29:49.824 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/VehicleDetect, Data name: State, Data value: false
17:29:49.913 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/DogCatDetect, Data name: State, Data value: false
17:29:49.916 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: VideoSource/MotionAlarm, Data name: State, Data value: false
17:29:49.918 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/Visitor, Data name: State, Data value: false
17:29:49.921 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/Package, Data name: State, Data value: false
17:29:49.924 [DEBUG] [camera.internal.onvif.OnvifConnection] - Please report this camera has an un-implemented ONVIF event. Topic: RuleEngine/MyRuleDetector/Package
17:29:49.926 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/CellMotionDetector/Motion, Data name: IsMotion, Data value: false
17:29:49.928 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/FaceDetect, Data name: State, Data value: false
17:29:50.027 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/PeopleDetect, Data name: State, Data value: false
17:29:50.032 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/VehicleDetect, Data name: State, Data value: false
17:29:50.036 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/DogCatDetect, Data name: State, Data value: false
17:29:50.040 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: VideoSource/MotionAlarm, Data name: State, Data value: false
17:29:50.045 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/Visitor, Data name: State, Data value: false
17:29:50.049 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/Package, Data name: State, Data value: false
17:29:50.053 [DEBUG] [camera.internal.onvif.OnvifConnection] - Please report this camera has an un-implemented ONVIF event. Topic: RuleEngine/MyRuleDetector/Package
17:29:50.127 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/CellMotionDetector/Motion, Data name: IsMotion, Data value: false
17:29:50.131 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/FaceDetect, Data name: State, Data value: false
17:29:50.134 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/PeopleDetect, Data name: State, Data value: false
17:29:50.137 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/VehicleDetect, Data name: State, Data value: false
17:29:50.141 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/DogCatDetect, Data name: State, Data value: false
17:29:50.145 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: VideoSource/MotionAlarm, Data name: State, Data value: false
17:29:50.196 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/Visitor, Data name: State, Data value: false
17:29:50.200 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/Package, Data name: State, Data value: false
17:29:50.203 [DEBUG] [camera.internal.onvif.OnvifConnection] - Please report this camera has an un-implemented ONVIF event. Topic: RuleEngine/MyRuleDetector/Package
17:29:50.206 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/CellMotionDetector/Motion, Data name: IsMotion, Data value: false
17:29:50.210 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/FaceDetect, Data name: State, Data value: false
17:29:50.214 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/PeopleDetect, Data name: State, Data value: false
17:29:50.217 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/VehicleDetect, Data name: State, Data value: false
17:29:50.293 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/DogCatDetect, Data name: State, Data value: false
17:29:50.296 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: VideoSource/MotionAlarm, Data name: State, Data value: false
17:29:50.300 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/Visitor, Data name: State, Data value: false
17:29:50.304 [DEBUG] [camera.internal.onvif.OnvifConnection] - ONVIF Event Topic: RuleEngine/MyRuleDetector/Package, Data name: State, Data value: false
17:29:50.307 [DEBUG] [camera.internal.onvif.OnvifConnection] - Please report this camera has an un-implemented ONVIF event. Topic: RuleEngine/MyRuleDetector/Package
17:30:07.013 [DEBUG] [mera.internal.handler.IpCameraHandler] - Closing an idle channel for 192.168.178.93/api.cgi?cmd=GetMdAlarm&token=44e5dbb82a5ae57
17:30:07.040 [DEBUG] [mera.internal.handler.IpCameraHandler] - Closing an idle channel for 192.168.178.93/api.cgi?cmd=Login
17:30:07.136 [DEBUG] [mera.internal.handler.IpCameraHandler] - Closing an idle channel for 192.168.178.93/api.cgi?cmd=GetWhiteLed&token=44e5dbb82a5ae57
17:30:07.158 [DEBUG] [mera.internal.handler.IpCameraHandler] - Closing an idle channel for 192.168.178.93/api.cgi?cmd=GetEmailV20&token=44e5dbb82a5ae57
17:30:07.180 [DEBUG] [mera.internal.handler.IpCameraHandler] - Closing an idle channel for 192.168.178.93/api.cgi?cmd=GetFtpV20&token=44e5dbb82a5ae57
17:30:07.201 [DEBUG] [mera.internal.handler.IpCameraHandler] - Closing an idle channel for 192.168.178.93/api.cgi?cmd=GetIrLights&token=44e5dbb82a5ae57
17:30:07.223 [DEBUG] [mera.internal.handler.IpCameraHandler] - Closing an idle channel for 192.168.178.93/api.cgi?cmd=GetAiCfg&token=44e5dbb82a5ae57
17:30:07.246 [DEBUG] [mera.internal.handler.IpCameraHandler] - Closing an idle channel for 192.168.178.93/api.cgi?cmd=GetRecV20&token=44e5dbb82a5ae57
17:30:07.266 [DEBUG] [mera.internal.handler.IpCameraHandler] - Closing an idle channel for 192.168.178.93/api.cgi?cmd=GetPushV20&token=44e5dbb82a5ae57
17:30:07.383 [DEBUG] [mera.internal.handler.IpCameraHandler] - Closing an idle channel for 192.168.178.93/api.cgi?cmd=GetAbility&token=e3676d2d419d69b
17:30:21.768 [DEBUG] [camera.internal.servlet.CameraServlet] - GET:/ipcamera.mjpeg, received from 192.168.178.38
17:30:21.771 [DEBUG] [camera.internal.servlet.CameraServlet] - First stream requested, opening up stream from camera
17:30:21.774 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now: -rtsp_transport tcp -hide_banner -i rtsp://admin:********@192.168.178.93:554/h264Preview_01_sub -q:v 4 -r 4 -update 1 http://127.0.0.1:8080/ipcamera/reolink_altas/ipcamera.jpg
17:30:37.619 [DEBUG] [mera.internal.handler.IpCameraHandler] - MJPEG was not being produced by FFmpeg when it should have been, restarting FFmpeg.
17:30:37.624 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now: -rtsp_transport tcp -hide_banner -i rtsp://admin:********@192.168.178.93:554/h264Preview_01_sub -q:v 4 -r 4 -update 1 http://127.0.0.1:8080/ipcamera/reolink_altas/ipcamera.jpg

And then this one is repeated every 15 seconds:

17:30:53.633 [DEBUG] [mera.internal.handler.IpCameraHandler] - MJPEG was not being produced by FFmpeg when it should have been, restarting FFmpeg.
17:30:53.638 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now: -rtsp_transport tcp -hide_banner -i rtsp://admin:********@192.168.178.93:554/h264Preview_01_sub -q:v 4 -r 4 -update 1 http://127.0.0.1:8080/ipcamera/reolink_altas/ipcamera.jpg

And then it goes back to the “8-second-mode” giving this:

17:30:53.633 [DEBUG] [mera.internal.handler.IpCameraHandler] - MJPEG was not being produced by FFmpeg when it should have been, restarting FFmpeg.
17:30:53.638 [DEBUG] [nhab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now: -rtsp_transport tcp -hide_banner -i rtsp://admin:********@192.168.178.93:554/h264Preview_01_sub -q:v 4 -r 4 -update 1 http://127.0.0.1:8080/ipcamera/reolink_altas/ipcamera.jpg

After Restarting the binding via openhab console the stream works again.

Is your cam connected with wifi or cable?
maybe a bad connection.. :man_shrugging:t3:
I never tried the mjpeg that long..
Ah, this is a battery cam? I thought the battery powered devices are not using onvif and they aren’t useful for always streaming video
greets

Yes, connected via WIFI - and the Home Hub as an intermediate.
Watching the Cam with the Reolink-App is not a problem via WIFI.
So in my opinion, this is not the problem.

And can you test using mjpeg for 5 to ten minutes? Do you have problems then?

my stream runs now for over 18 minutes..
directly connected to cam via wifi.

Do you have more Cams connected to the Hub?

what is this?

You have set the media profile to 1 when the camera reported 0 profiles. Falling back to mainstream 0.

The alarm stream was not running for camera 192.168.178.93, re-starting it now

This is a onvif connection lost message I think. I have this with a cam in the garden too. bad wifi connection.
maybe @matt1 can help..

You say that restarting the binding fixes it, but pausing and unpausing it does not? If correct, try pausing and waiting longer before unpausing it as my first thought is the hub or camera has frozen up and needs time with no requests to reset. Have you completed firmware upgrades on both camera and the hub?

To narrow down the cause, can you open up the rtsp stream in another app and see if the same occurs or if it keeps going?

I opened the RTSP-Stream via VLC and it stops after 5 Minutes.
But I can restart it hitting the “play” button.

So I think I need a “Restart” in OpenHab as well - but I have no clue on how to do that.

I think the battery powered cam stops the stream after 5 minutes..

If you reload the page every 5 minutes..
Greets

The best ending should keep the stream alive and auto restart the feed from the camera. The logs show that it is trying to do it. With other cameras you can pull the power out and restart them fully and the feed should start again with no need to even refresh the page.

Can you answer all my questions in my last post that you skipped and also provide a TRACE LEVEL log showing what happens when the stream stops for the first time and when it trys to reopen the connection?

So I found this information:

Notes of Battery-powered WiFi cameras:

  1. On Reolink NVR and Reolink Home Hub, each preview session of battery-powered WiFi cameras can only last up to 5 minutes. After 5 minutes, the battery-powered WiFi cameras enter sleep mode and the RTSP connection is disconnected. If you need to continue previewing, you need to request the stream again.

  2. Since the battery-powered WiFi cameras have standby mode, they to be awakened during the RTSP request stream, which takes a long time. It is recommended to set the RTSP request timeout to at least 20s. For example, the VLC player can modify the TCP timeout: Tools > Preferences > All Parameters > Input/Codec > TCP connection timeout to 20000 ms.

Additional information:
The Reolink-Client doesn’t seem to have this 5 minute limitation. The stream runs now for over 6 minutes

What packages should I set to TRACE-Level?

I would suggest you to buy a non-battery-powered device if you want to look all day long :wink:
Greets

pausing and unpausing the camera and then hitting the reload-button in the browser brings back the Stream as well.

and of cource I installed the latest firmware etc.