Adding 'state' for rooms
Posted: Sunday 17 September 2017 12:19
Another request which I think would be a nice feature for Domoticz. A lot of people are programming virtual state switches which you can use to set your system in a certain state (like "at home", "away" or "night" / "day"). These are useful for scripting / blockly's for determining what should happen upon a certain action.
Having virtual switches and global variables in scripting solves pretty much everything but can also quite easily lead to a spaghetti of events. What I would propose is to add a state for each room that you define and have the room objects available in scripts (as far as I can see DzVents doesn't have the notion of rooms right now?).
This would make my scripts (and I assume others as well) a lot more transparant. You'd be able to set the room in a certain state, for instance so you can control 'Sleep' mode for each bedroom separately instead of having one 'sleep mode' switch for the entire house. Again, this is all perfectly doable right now using virtual switches or variables, but it wouldn't hurt from a usability perspective I think.
Having virtual switches and global variables in scripting solves pretty much everything but can also quite easily lead to a spaghetti of events. What I would propose is to add a state for each room that you define and have the room objects available in scripts (as far as I can see DzVents doesn't have the notion of rooms right now?).
This would make my scripts (and I assume others as well) a lot more transparant. You'd be able to set the room in a certain state, for instance so you can control 'Sleep' mode for each bedroom separately instead of having one 'sleep mode' switch for the entire house. Again, this is all perfectly doable right now using virtual switches or variables, but it wouldn't hurt from a usability perspective I think.