Item for switching multiple Items without changing its own state

Hi there;
I am having a rather simple question.

I would like an Item in my semantic model to be a able to switch a multitude of items but in a pushbutton state.

So for example I habe my living room set up and I want an item there to be able to switch 5 devices into a scene without changing its own state.

Is there a possibility to do that?

I’m no expert but would have thought that the simplest way of achieving this would be set up a switch item with an expiration timer of say 1 second, then set up a rule on the switch state turning to ‘ON’ to do whatever you want to do with your 5 items.

When you ‘turn on’ your ‘master’ switch the rule would then run and then the switch would automatically reset to ‘OFF’ after the expiration timer.

To understand the best way to approach this requires an understanding of several key concepts in OH: the difference between an update and a command, autoupdate, and rules.

An update only changes the state of an Item. It does not go out to the binding and the end device.

A command is a request to cause the device linked to an Item to do something. A command may or may not cause the Item to update to a new state. A command may not even match the state of the Item. For example, one can send INCREASE command to a Dimmer Item but a Dimmer holds a PercentType as its state. All interactions with an Item from the UI come as commands.

Autoupdate is a service that attempts to predict what state the Item will become in response to a command and update the Item to that predicted state. Autoupdate can be turned off.

Rules can be triggered based on commands or updates and you can choose which command to trigger the rule on (e.g. received command ON).

Give the above:

  • Create a Switch and put it on your UI as a button.
  • Turn off Autoupdate on the Switch through the Item’s metadata.
  • Create a rule that triggers when the Item receives an ON command to send the commands to the other Items.
1 Like