|
|
Re: How to update Channel's min/max [message #1756254 is a reply to message #1756253] |
Tue, 14 March 2017 15:16 |
a b 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!
|
|
|
Powered by
FUDForum. Page generated in 0.12774 seconds