For Reactor™ users who want to downsize their Vera setup by eliminating unnecessary plug-ins whenever possible, here are some pointers for a smooth transition away from the HouseModes™ app.
BASIC: THE EASY PART — GET & SET
You can accomplish the basic reading and setting of Vera’s house mode – that is, the assignment of a ‘Home’, ‘Away’, ‘Night’ or ‘Vacation’ value – using Conditions in much the same way as you’ve always done.
For example, if you previously used this trigger in Scenes before:
["Whenever House Mode has changed to:"] [Home / Away / Night / Vacation]
…or had this Condition as a trigger in Reactor:
[Device State] [House Modes (#107)] [Changes] [(any)] [(any)]
…then you can leverage Reactor’s built-in “House Mode” feature instead:
[House Mode] [Changes from] [(any)] [(any)]
To watch the current House Mode with an Expression variable, define:
hMode := getstate( NN , "urn:toggledbits-com:serviceId:Reactor" , "HouseMode" )
replacing NN with the actual device ID number of your master Reactor device.
Setting the House Mode with Reactor in an Activity is just as straightforward:
[Change House Mode] = [Home / Away / Night / Vacation]
ADVANCED: SETTING HOUSE MODE USING LUA OR WITH VARIABLES
Setting the House Mode using Lua requires the following action step:
luup.call_action( "urn:micasaverde-com:serviceId:HomeAutomationGateway1", "SetHouseMode", { Mode = N }, 0 )
where the ‘Mode’ value N represents an integer from 1 to 4, corresponding to Home / Away / Night / Vacation.
WARNING: DO NOT ATTEMPT TO SET THE ‘HouseMode’ VARIABLE DIRECTLY ON THE MASTER REACTOR DEVICE! As with many such variables, it is meant for ‘Read’ not ‘Write’ access.
If your setup is a bit more complex – for instance, deriving the intended target ‘Mode’ value from another Expression variable, such as ‘ModeNum’ – then it is possible to assign that value in Lua with:
luup.call_action( "urn:micasaverde-com:serviceId:HomeAutomationGateway1", "SetHouseMode", { Mode = Reactor.variables.ModeNum }, 0 )
which in turn will instruct Vera to switch to the House Mode (1-4) specified by ‘ModeNum’.
Hope this helps! Once you have fully tested the new Reactor setup, and are satisfied that House Mode changes are happening as desired, go ahead and ‘Remove’ the old HouseModes™ app.
- LibraSun
ADDITIONAL READING for AltUI users at Access House modes without the House Modes Plugin? - Alternate UI - Ezlo Community