openHAB Safety Button

I wanted to have a common button that had the following features:

  • Not be triggered easily, but was easy to use (the standard openHAB prompts can get tiresome on a lot of buttons)
  • could be used to connect to the backend device supporting it
  • could show the power consumed buy the switch (both via text and easy visual)
  • supported both normal (tablet/PC) and Mobile devices
  • had a validation that it had been tested
  • supported all openHAB icon formats
  • optionally could support energy meters(which do not have a relay)

So i have this “Safety Button” that you click the safety cover (and it lifts) and then because your finger is already there you can press the button (and not have to read a message and find the button) , I have thought about adding a “double safety” message - if thats interesting let me know) ) or if you were scrolling you can close the Safety Cover) All safety covers are closed when the page starts again (unless the safety is false)

If the Icon is clicked and the settingsUrl is defined then it will launch a webpage to that device

If the “userValidated” is NOT set there is a red (pink because it displays on Dark and Light mode) Title Text to remind you that you may need to test that the button actually does what you meant it to before letting loose in the wiild.

Features:

The switch supports the following:

itemSwitch: The ON/FF Item for the Switch

itemPower: The Power measured by the switch (or a different item)

itemPowerMin: The minimum power to determine if the switch shows active) it will display ligh blue when there is power flowing , green when now (or less that itemMinPower) or red when off

title: The Name of the switch

safetyText: (the text to display on the Button safety Shield)

safety: Use the Safety Shield (or not)

iconVisible: If the Switch displays an icon

userValidated: Have you tested this is production???

configOnly: If there is no ON/OFF component but you want/need to display alongside other switches

iconName: the icon name - e.g. energy, oh:energy, iconify:arcticons:homewizard-energy, etc

settingsUrl: this launches to the URL for managine the switch - e.g. Tasmota or shelly ip address (http://192.168.1.54)

iconSize: self explanatory

compact: Standard Widget Size or something supporting a Mobile Phone

Screenshots

Standard View(blurred effect on button)

The Lifted Safety Screen (blurred effect on title)

The Compact View

Unvalidated Switch

Changelog

Version 1.1.6

  • initial release

Resources

Very clever.
Now I just need to find a use for it.
Thanks

Hi!

I like the idea of ​​the “button”—it could potentially be adapted for medications or other care procedures that need to be followed in a specific sequence.

Each “button” would represent a medication or procedure that would first need to be “unlocked” and then clicked to confirm that it has been taken or performed.

Essentially, it would function as a visual checklist.

A few adjustments would be needed, for example:

  1. Once a button is unlocked and pressed, it could only be unlocked again after a specific condition is met—governed by a rule, for instance.

  2. In this setup, each button could only be activated once per cycle, with the cycle being reset by a rule triggered at specific times of the day, week, etc.

The page could be divided into morning, afternoon, and evening sections, with each section containing as many buttons as necessary for the medications or procedures required during that time of day.

Thank you for your idea and contribution!