Hikvision Event

Disabled modbus binding and now it seems to work.

/Mike

Thanks Mike Iā€™ll take a look at Modbus to look at why, can you answer these please as to what does and does not work?

  1. Does the picture update in the image channel in paperUIā€™s control tab?
  2. The motion alarm channel changes correctly when you have movement?
  3. Which Modbus binding are you using as I believe there is a new V2 as well as an older openhab 1 binding?

The enable/disable motion control does not work yet that will be next to look at if the motion detection is working correctly. Also the extra options for only updating on motion alarm does not work in your build, but I have done the work for the next build.

Thanks,

Matt

When i connected an item to image i started to receive this

2018-05-09 07:58:13.820 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - Camera at 192.168.192.85:80 is not closing the connection quick enough. Check for digest stale=?
2018-05-09 07:58:24.837 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - Camera at 192.168.192.85:80 is not closing the connection quick enough. Check for digest stale=?
2018-05-09 07:58:32.305 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - Camera at 192.168.192.85:80 is not closing the connection quick enough. Check for digest stale=?
2018-05-09 07:58:39.767 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - Camera at 192.168.192.85:80 is not closing the connection quick enough. Check for digest stale=?
2018-05-09 07:58:47.428 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - Camera at 192.168.192.85:80 is not closing the connection quick enough. Check for digest stale=?
2018-05-09 07:58:47.586 [WARN ] [ore.internal.events.OSGiEventManager] - Dispatching event to subscriber 'org.eclipse.smarthome.core.internal.items.ItemUpdater@bd521c' takes more than 5000ms.
2018-05-09 07:58:54.686 [WARN ] [ore.internal.events.OSGiEventManager] - Dispatching event to subscriber 'org.eclipse.smarthome.core.internal.items.ItemUpdater@bd521c' takes more than 5000ms.
2018-05-09 07:58:58.632 [ERROR] [ing.ipcamera.handler.IpCameraHandler] - Can not connect to the camera at 192.168.192.85:80 check your network for issues or change cameras settings.
2018-05-09 07:59:09.510 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - About to connect to IP Camera at IP:192.168.192.85:80
2018-05-09 07:59:20.478 [WARN ] [ore.internal.events.OSGiEventManager] - Dispatching event to subscriber 'org.eclipse.smarthome.core.internal.items.ItemUpdater@bd521c' takes more than 5000ms.
2018-05-09 07:59:46.024 [WARN ] [ore.internal.events.OSGiEventManager] - Dispatching event to subscriber 'org.eclipse.smarthome.core.internal.items.ItemUpdater@bd521c' takes more than 5000ms.
2018-05-09 08:00:07.924 [WARN ] [ore.internal.events.OSGiEventManager] - Dispatching event to subscriber 'org.eclipse.smarthome.core.internal.items.ItemUpdater@bd521c' takes more than 5000ms.
2018-05-09 08:00:57.669 [WARN ] [ore.internal.events.OSGiEventManager] - Dispatching event to subscriber 'org.eclipse.smarthome.core.internal.items.ItemUpdater@bd521c' takes more than 5000ms.
2018-05-09 08:00:57.659 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'EventSubscriber.receive()' on 'org.eclipse.smarthome.core.internal.items.ItemUpdater@bd521c': Java heap space
java.lang.OutOfMemoryError: Java heap space

Now i have tried a couple of times but it always give OutOfMemoryError: Java heap space on Raspberry Pi 3 B+

/Mike

Can you enable debug output in the log please? How to do this is in the first post of the IpCamera thread.

The warning you are getting is the camera not closing the connection after it replies and is not an error or something to be concerned about, but this may be causing the OOME and be a clue as to where to look in my code. It does not occur for me as my camera always closes the connection. I will look into this over the next few days and make a new build. There are a number of other bindings using the Netty library and I also need to look into this as well as it may be a conflict with another binding that also uses Netty. If you can post some of the debug output from this build it will tell me more info and how much data is being sent to the camera as well as what the reply from the camera looks like. I can use that to make some adjustments before the next build.

Thanks for doing the testing and if you could confirm that the binding does react to motion detection and updates the channel that would be great.

Sorry i cant do that.
When i have it enabled it breaks my Openhab Z-Wave and other bindings stop working.
I will se if i can put up a test system.

/Mike

I do have the same issue, openhab is slowing down very much and I canā€™t disable modbus since itā€™s essential to me.

Hey @Matt3 , but I have 5 Foscam cameras. Openhab is getting not useable and Iā€™m guessing this is because of the binding:-(

It looks like openhab is going back to normal (at least in terms of speed) when I delete ā€œMotion Alarmā€ item.

As a general note, I believe Modbus binding V2 handles TCP/IP traffic rather differently to V1. V1 certainly has some iffy error handling which wonā€™t get fixed now.

If you havenā€™t already done so, it would be wise to move to V2 if suspecting clashes with Hikvision. This binding is still technically ā€˜betaā€™ but it is mature and many people are using it already while awaiting formal sign off.

Iā€™m afraid that is a non-trivial change though, there is work adapting old ā€œmodbus.cfgā€ setup to new Things/channels definitions.

I think a new thread should be opened as this is going off the original topic.

@rossko57
Iā€™m not convinced there is a conflict between the bindings, possible but I suspect the ipcamera binding has a memory leak and any issues people are seeing is simply no more memory and all bindings will have issues when no memory is left free.

@zacofunny

Can you tell me exactly what you add to your items file to cause the issue please? I spent ages today watching for memory leaks and it is not reproducible here but I have changed a lot recently so I made a new build which is available now. Iā€™ll play with adding different items as currently I have nothing in my items file, what I use is shown in the readme.md file.

I am using V2 modbus binding.

But i have also tried this without modbus installed and having performance issues.

/Mike

@matt1 sorry, canā€™t help with that at the moment. As a result my things have been broken soā€¦ giving that I was still using the old Modbus binding, instead of fixing all of it I decided to start configuring my openhab from the scratch. When I come to configuring your binding i will do backup this time and try again.

I bumped into this. End up i write my own ONVIF code in C++ and create my own binding to interface with OpenHabā€¦

1 Like