Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Recommended update strategy of channels in binding
Recommended update strategy of channels in binding [message #1780536] Tue, 23 January 2018 19:01 Go to next message
Martin Eskildsen is currently offline Martin EskildsenFriend
Messages: 5
Registered: January 2018
Junior Member
In the openHAB ZoneMinder Binding I am trying to optimize and also add new functionality. The main issue right now is that some users requires a lot of features (frequent updates of data, images and even a video stream), where other users run their ZoneMinder server on a rather small machine, all this will slow down thier ZoneMinder Server considerably.
Many things can be fixed by optimizing code.
In this process one idea crossed my mind, and I would like to hear if this is a good idea or if it is a no go.
My thought is that since all channels must be linked to a item before it can be used, I was thinking of overriding the channelLinked / channelUnlinked and only update channels that has something attached to it.
Would this approach be acceptable in a Binding?
Right now I have added the option to enabled / disable refresh of selected channels, that would be an alternative way to go.

I have no considerations regarding openHAB, it seems to do very well even when refreshing often. It is the ZoneMinder Server I am worried about.

EDIT: Sorry for double posting, don't know how to delete one of them :-(

[Updated on: Tue, 23 January 2018 19:06]

Report message to a moderator

Re: Recommended update strategy of channels in binding [message #1780602 is a reply to message #1780536] Wed, 24 January 2018 13:03 Go to previous messageGo to next message
Simon Kaufmann is currently offline Simon KaufmannFriend
Messages: 51
Registered: January 2011
Member
Sure, it's a perfectly valid approach and actually done like that by many bindings.

Instead of overriding the channelLinked()/channelUnlinked() methods you may directly use the BaseThingHandler.isLinked(...) method for that purpose.
Re: Recommended update strategy of channels in binding [message #1780617 is a reply to message #1780602] Wed, 24 January 2018 18:11 Go to previous message
Martin Eskildsen is currently offline Martin EskildsenFriend
Messages: 5
Registered: January 2018
Junior Member
Thanks for the answer and the hint. And again sorry for triple posting :-(
Chers
Martin
Previous Topic:When i am doing maven clean install on windows i am getting this error
Next Topic:Getting error while doing maven clean install
Goto Forum:
  


Current Time: Thu Dec 05 22:45:31 GMT 2024

Powered by FUDForum. Page generated in 0.03317 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top