Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » How to update Channel's min/max
How to update Channel's min/max [message #1756252] Tue, 14 March 2017 14:57 Go to next message
a bFriend
Messages: 2
Registered: March 2017
Junior Member
Hey,
how do I update the min and max State of a Number Channel?
Best
Re: How to update Channel's min/max [message #1756253 is a reply to message #1756252] Tue, 14 March 2017 15:11 Go to previous messageGo to next message
Juergen Baginski is currently offline Juergen BaginskiFriend
Messages: 7
Registered: March 2017
Junior Member
Are you really trying to do that in a binding?
If yes, you'd have the create new channels for min and for max. The updating would be basicly the same as for the original value, with the difference that an update would only be done in case the actual value is is less/more then the min/max saved before.
I would use a persistence service to keep track of min/max values, however that would be outside the binding.
Re: How to update Channel's min/max [message #1756254 is a reply to message #1756253] Tue, 14 March 2017 15:16 Go to previous message
a bFriend
Messages: 2
Registered: March 2017
Junior Member
Yes, I am trying to do that from a binding.

To put it in perspective: different devices might allow for different ranges in a "Number" channel. When these ranges are only communicated at runtime, I see no other way than updating the Channels min/max.

Quote:
If yes, you'd have the create new channels for min and for max.

How would I do that? I cannot find anything about how to programatically create a Channel with custom min/max. I did find this code to create a channel programatically:
Channel channel = ChannelBuilder.create(new ChannelUID("bindingId:type:thingId:1"), "String").build();

but I have no idea how to set the range.
ChannelBuilder also has .withProperties(..) and .withConfiguration(..). Should I use one of the two? What would be the key of the property/config?

Thanks already!
Previous Topic:[solved]WhowTo make Translation files being used?
Next Topic:Are bindings cache somewhere?
Goto Forum:
  


Current Time: Fri Mar 29 11:22:55 GMT 2024

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

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

Back to the top