This smartapp sets SmartHome’s Mode field when setting the AlarmState from the SmartThings Dashboard Home Solutions or anything that does not properly set the Mode.
Have you ever wondered why Mode restricted Routines, SmartApps, and Pistons sometimes fail to execute, or execute when they should not? I gave up trying to use mode for Core Pistons, now I know why it did not work.
Perhaps like me you conflated AlarmState and Mode, however they are separate and independent SmartThings settings. When Alarm State is changed using the SmartThings Dashboard Home Solutions, or anything that does not execute a SmartHome routine—surprise, Mode does not change!
SmartHome routines generally, but not always, have a defined SystemAlarm and Mode setting. Experienced SmartThings users seem to favor changing the AlarmState using SmartHome routines, avoiding use of the Dashboard’s Home Solutions.
If like me, you can’t keep track of all this, or use the Dashboard for changing the AlarmState, the ModeFix smartapp may be helpful. For each AlarmState, set the Valid Mode states, and a Default Mode. Mode Fix attempts to correctly set the Mode by monitoring AlarmState for changes. When the current Mode is not defined as a Valid Mode for the new AlarmState, the app sets Mode to the respective state’s Default Mode.
To install via the repository, add the following to the IDE Settings
Owner: arnbme (in upper case that is ARNBME)
- Click ‘Save’, then in ‘My Smart Apps’ click 'Update from repo",
- select the SHMDelay repository and install and publish SHM Delay ModeFix
- In the Phone APP install the SHM Delay ModeFix app then follow the provided directions.
- If you are using SHM Delay, this smartapp runs as a child, Do not reinstall
You may manually install by going to SHMDelay/smartapps/arnbme at master · arnbme/SHMDelay · GitHub then copy the module, installing 'from code". You may also copy the source from the code link below.