Switch with password request

Hello,

I’m using OH2.5 on a raspi4. I have already several sitemaps and a lot of items everything is working fine…
Now there are some items, controlled with a switch, where I’m wondering if it is possible to prevent (unwanted) switching of the item state by a password query ?
Or at least a dialog box like: “Do you really want to switch the state?” ?

At the moment I have a workaround by nesting the switch with “Text { … }”. But I would rather like a password query here instead.

Thank you!
Best regards!!

There are lots of ways to do something like that without ‘entering’ a text based password …

Simple version…You could use two switches. The main switch and a second 'safety switch ’ to enable first.

These can but used in two ways.

1 A rule could be used to check if the safety is off before sending the command. In this case the main switch is a dummy to trigger a rule with the real switch inside the rule.

2 The main switch could be hidden using the ‘visibility’ feature and only becomes visible if the safety is off first. In this case the main switch could be either the real switch or a dummy as above case 1. A auto safety reset would be needed either after a short time or if the main switch was used or both. This the neatest as only one switch is shown when the safety is on.

More complex. A ‘password’… Use a dummy switch which triggers the real switch if special timed sequence of on and off’s is performed. This could be done with a rule and some cascading timers.

A kind of password could be created if you use multiple dummy switches eg they need to be set as on/off/off/on before the real switch is switched. Again with a reset in a rule when real switch is used and or after a short time or both.

Another method is too bury the real switch in a sub menu so you have to dig down to get to it.

I have used all of the above and combinations of them depending on the ‘risk’

However, if you really want to enter a text password I am not sure but am interested in how to do that in site map

There are posts about simulating a “keypad” in sitemap, for a pin code entry.

The major restriction is that any/all sitemap users at the time get the same “pass” access. i.e. one user entering a PIN unlocks everybody