I’m having some old (aliexpress bought) Hikvision cameras that I can’t upgrade firmware on.
As I do use these in my homesetup I’m having particular problems with these cameras after upgrading to OH4 since CPU and resource demand in general has increased.
These old cameras sends a heartbeat every 300ms (changed in FW >5.5.0, ref: XML_EventNotificationAlert_HeartbeatInfo) and so item state is also updated every 300ms making it use alot of unneccesary cpu and resources on the OH server, especially with multiple cameras.
I was therefore wondering ( ) if the maintainer of this binding had some idea and/or possibility to tweak the update handling on these cameras as to maybe not update the event bus so fast or similar? Just fishing here …
Thank you for posting in a new thread.
What your suggesting could be done, it would just increase the RAM/HEAP requirements a small amount to store the value in, to be compared against every 300ms and then if it changes the event bus gets updated. So really the HTTP traffic still occurs, the processing of the value still occurs, then only thing that would be reduced in the logging and event bus loads.
You can filter out the event bus logging, or simply turn off the logging altogether which is what I do. My cameras must be the ones with a 10 second interval.
The other choice could be to setup the cameras as ONVIF thing type so the event is pushed by the onvif system and not the API method. Not sure if that will reduce the heatbeat or if they will still do the same thing.
I suspect the majority of the load is caused by the logging, so you will see improvements.
To try turing off all event logging you can use this, and to put it back to default you change the WARN to INFO…
log:Set WARN openhab.event
If you wish to see the events occuring the developer sidebar can be used to watch them in realtime with filters, so I much prefer to run my system with this off permanently.
Tried using ONVIF but I can’t get the alarm (motion) to trigger. Perhaps it’s time to get some new cameras anyways
Thank you for replying!
Sometimes it is the cell motion alarm that is triggered. Check the trace log.