Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Changing readonly at runtime
Changing readonly at runtime [message #1772687] Wed, 13 September 2017 20:45 Go to next message
Jabba Loon is currently offline Jabba LoonFriend
Messages: 11
Registered: August 2017
Junior Member
Hi All,

Quick question. Is it possible to dynamically disable or otherwise make read-only a channel at runtime?

Consider the scenario where (for example) I have "Vol+", "Vol-" and "Mute" channels (switches). If someone triggers the "Mute" channel, the I would like to disable the "Vol+" and "Vol-" channels (switches).

I can't seem to find a way of doing this, so am wondering if:
a) it is possible? or
b) I have a design flaw in my thinking in relation to interrelationships between channels!

Thanks,
Jabba
Re: Changing readonly at runtime [message #1772712 is a reply to message #1772687] Thu, 14 September 2017 08:46 Go to previous messageGo to next message
Henning Treu is currently offline Henning TreuFriend
Messages: 44
Registered: April 2017
Member
Hi,

I have a question about the functional requirements you are describing: Why do you want to prevent the user from altering volume when on mute? From my physical remote controls I expect to either unmute and start at the lowest possible volume when I change volume during mute or change volume and stay muted. One scenario: I go on mute to better hear the surroundings and then press Vol+ to fade in the music/tv sound again.

What do you think?

Cheers,
Henning
Re: Changing readonly at runtime [message #1772773 is a reply to message #1772712] Fri, 15 September 2017 06:44 Go to previous messageGo to next message
David Graeff is currently offline David GraeffFriend
Messages: 17
Registered: April 2016
Junior Member
I think it would be neat to be able to "disable" channels though. Sometimes certain features are really not available.
Re: Changing readonly at runtime [message #1772916 is a reply to message #1772773] Mon, 18 September 2017 17:02 Go to previous messageGo to next message
Jabba Loon is currently offline Jabba LoonFriend
Messages: 11
Registered: August 2017
Junior Member
Hi Guys,

The volume / mute was just an example. I agree that it may not be a great one! David, you are correct in saying (better than I did!) that I basically want to be able to disable certain channels under certain circumstances (eg: where functionality is not available as a result of the state of another channel). For example (a real one this time!)...I am creating a binding for an alarm panel. I have a channel to indicate when system is ready to arm (eg: it reacts to zones being open or faults being present etc...). It doesn't make sense for the "Arm Alarm" channel to be available when the "Ready to Arm" one is in the "not ready" state. Obviously, there is no harm in the user clicking the arm button, but it will not cause the alarm to Arm as there are open zones etc... However, from a usability point of view, it would seem to be better to have the arm channel disabled so that the user doesn't inadvertently select that option and think that they have done something etc...

David, I am guessing from your reply that this scenario is not supported? Eg: Programmatically disabling channels? Any other ideas or suggestions on how to achieve same? I haven't looked (yet) at creating a site map for the binding, but maybe I can disable through Javascript on same? (very hacky though!).

Thoughts?
Jabba
Re: Changing readonly at runtime [message #1773335 is a reply to message #1772916] Tue, 26 September 2017 14:35 Go to previous message
Stefan Triller is currently offline Stefan TrillerFriend
Messages: 29
Registered: April 2017
Junior Member
Inside a sitemap you can change the visibility of an item based on the state of another item, i.e.
Switch item=switch1 label="My Switch" visibility=[switch2=="ON"]


This would only show the "switch1" in the sitemap whenever "switch2" is in "ON" state. Since you brought up the sitemap idea, maybe it is an option for you as long as we do not support setting a channel to read-only at runtime.

Cheers,

Stefan
Previous Topic:o.e.s.i.t.m.MqttBrokerConnection.addconsumer() send a wrong wildcard format instead of '+' in Topic
Next Topic:Design question: searching for things (getThingByUID)
Goto Forum:
  


Current Time: Fri Dec 13 00:40:44 GMT 2024

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

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

Back to the top