"unlock" feature

Hi,

I have some buttons in the sitemap, that I want that will work only after “unlock” button.
I want to prevent accidental click on phones that happen once, but once to much and raised the roller shutter during the workday.
I want that the roller shotter button won’t do anything unless “unlock” button will be pressed first.
Any idea ?

Hello,

Read here:
https://www.openhab.org/docs/configuration/sitemaps.html#visibility

best regards Markus

You may introduce some addional “unlock”-switch item plus proxy items for your protected functions in combination with “expire=” to reset unlock-switch automtically to OFF after a while.

Once one of your “protected” proxy items have been switched it triggers a rule, checking the state of the unlock item. Just if the unlock item is on, the rule can switch the “real” items.

As Markus mentioned, you may combine this with the visibility control in the sitemap if you like…

Nice, didn’t think about it. Its not perfect becuase I won’t be able to see the % of the opening. but its good enough I guess.

Not sure I understand. Can you share example ?

You simply make the commands sent to your “real” items dependent on the “unlock” switch. This can be achieved by using proxy items:

To have the “unlock” switch falling automatically back to OFF (=locked) after a few seconds you can use the expire binding:

The problem doing it with rules is that it affects all users - including other rules, as well as other UI users. Complicating by adding proxies would help.

Doing it by using sitemap visibility to hide controls does not interfere with existing rules and services.
It’s still unkind to other UI users because of shared control Item, but at least everybody gets the chance to disable.

Using visibility in the sitemap you can construct alternative sitemap lines.
Example, show shutter position using text Item if lock=on.
Show shutter position with slider control if lock=off.

Agree. If visibility suits the need and all the used ui’s are sitemap-based, then this is the simpliest way to hide some controls from the user based on items. :+1:

Mmh. Exactly this might be desired. So as always - it depends … :wink: