I am slowly integrating Vera controls into our mfg building. We are controlling thermostats (can’t tell you how the miser in me loves walking out the door, whipping out my phone with Home Buddy, tapping the everyone gone home scene, and hearing all the AC units wind down one at a time!), lighting, and turning machinery off and on.
I would like to have a building/zone is occupied switch. The reason is lighting and thermostats. If someone just runs in quickly one weekend to check on something I don’t need AC units coming on or lights staying on for a long time (lights are going to be controlled by motion sensors).
The scenario I envision is entering the building and pressing a scene button for this area of the building is occupied. HVAC would turn on (if not already on), and lights when triggered might stay on longer than when the building is not occupied.
In essence scenes could behave differently based on the occupied status. This is luup code I assume, but do I need a physical device that is on or a luup variable (file saved with variable state)?
Would the Holiday switch / Virtual state device threads be of any help to you in this scenario?
Try the Leviton Scene controllers. I have one of the 4 button scene controller @ the front door of my house that I use to trigger scenes just as you mention. You will have to create the scene in VERA then assign it to the button on the controller. Works very well, and if you search the forum you will see some neat things that some of the members are doing to control even the LED color of the controller button so you have a visual indication of what is happening (in terms of scenes active or inactive)