Scene Activation Without Device Binding

Test_Macro_Unbound.hrp (1.1 MB) Can scenes be activated without a DataAction Device Binding to *.scene? I’ve been experimenting with scenes as macros, and I’m observing one-time scene activation after simulator initialization, despite no explicit *.scene device binding.

As an example, please find attached a THR load Test_Macro_Unbound.hrp. This load simply shows button graphics behavior for a home theater controller, and consists of a single column of so-called “Primary Activities”, and a single row of so-called “Secondary Activities”. I’m testing scene macro behavior by simply assigning Volume preset values to
a VarActivity variable “dBVolumeVar”. Each Activity button assigns distinct values to two additional variables: “PriActVar” and “SecActVar”.

I constructed two scenes: PriActVolMacro (Primary Activity volume assignments) and SecActVolMacro (Secondary Activity volume assignments). Each scene comprises a set of
DataActions that assign a unique (arbitrary) volume, if the associated conditional evaluates “True”. Each set of DataActions, including Conditionals, emulates a poor-man’s
CASE structure, but without BREAKs.

When I fire up the simulator, “dBVolumeVar” initializes to -80 dB and can be viewed in the label text that I bound it to. The first time I click any button, I seem to fire the
corresponding scene macro, since the label text changes. All subsequent button clicks have no further effect. If I reset the simulator and click a different button initially, I
see the label reflect the volume I would ordinarily expect with a *.scene binding.

I’m struggling to understand how I appear to be firing an “unbound” scene once with an initial button click, then no more. Thanks for any insight you can provide.

The issue is that Scenes fire when the conditions evaluate to True from a False state. Your conditions all evaluate to True & that state isn’t changing as you update your selection. To get the scene to fire again you need to get the state to clear. If you look at your regular expression you are using ^([0-5])$. You need to reset PriAct to a value outside of the 0-5 range so the scene state resets. You can clear it to -1 for example.

Bear with me, please. Do scenes fire even if they’re not attached to anything? In other words, once I define a scene, will it fire if I do nothing else with it?

I’m not sure I understand what you mean. They don’t need to be attached to an actual device. They won’t randomly fire. You can read more about how scenes work here.