(EDGE Driver-Mc): Aplicaciones Virtuales Mc (virtual Switch Mirror, Virtual Calendar and virtual Switch Board...)

New version of Aplicaciones Virtuales Mc

Several users asked in the community how to make a function that can activate or deactivate the STHM (SmartThings Home Monitor) modes on a delayed basis.

I have added a new virtual device to control Security Mode in STHM.


Device has a stock capability “securitySystem”, which directly changes security modes in the user’s STHM, without the need for a routine. I was not aware that this capability could perform the mode change in STHM directly.
Capability function is not bidirectional, i.e. the “securitySystem” capability on the virtual device changes the state of STHM, but state changes in STHM do not update the “securitySystem” capability on the virtual device.
To have it synchronized it is necessary to make three routines that update the virtual device state when the state in STHM changes manually. i.e. like this routine:

Allows you to arm and disarm security modes instantly, just like in STHM:

  1. Performing the state change in the security mode capability of the virtual device, manually or with a routine

Allows arming and disarming of security modes with a custom delay:

  1. You need to create a different code for each Security Mode:
  • Initial Code for Mode Disarmed: 111
  • Initial Code for Mode Armed Away: 222
  • Initial Code for Mode Armed Stay: 333
  1. How to create the custom code:
  1. In preferences set the custom dalay for each Security Mode

  2. Write the code for the Security Mode to Change in capability “Code for Delayed Security Mode” or could set Code with Routines, scene or rules API:

  • By pressing a muti-button sequence with routines or
  • Sending code with a routine, rule or scene.
    For example: I have used a Fibaro KeyFob, with 6 buttons. Assigning to each button press a value to be sent to the virtual device in 6 routines. That way I can arm and disarm the STHM in a personalized way by entering the code sequence on the KeyFob remote. When the code is sent sequentially, there is a time limit of 5 seconds between keystrokes. If this limit is exceeded, the entered value is deleted and you have to start over with the first character of the code.
  1. After correct code and Mode Delay, Security Mode will change in STHM


    Screenshot_20240226-132024
    Screenshot_20240226-132103
    Screenshot_20240226-132140

The three current Mode Codes saved can see in CLI logs:

  1. In preferences set: “Show logs Debug Print in CLI”
  2. Write any text in old Code or new Code capability
  3. in Cli logs can see three saved Codes
2024-02-26T11:42:04.673182594Z PRINT Aplicaciones Virtuales Mc  <<< DEVICE_CODE_AWAY:      222
2024-02-26T11:42:04.677798302Z PRINT Aplicaciones Virtuales Mc  <<< DEVICE_CODE_STAY:      333
2024-02-26T11:42:04.682208885Z PRINT Aplicaciones Virtuales Mc  <<< DEVICE_CODE_DISARM:    111

A preference has also been added to show or not display the device’s instructions for use in the details view. This instruction steps appears 3 sec after the action information message or when refresh command.
This preference has also been added to the number field + calculator profile

This version of the driver will be updated automatically in 12 hours maximum.

If anyone finds any problem, please tell me and I will try to fix it.

───────────────────────────────────────────────────
 Name         Aplicaciones Virtuales Mc
 Version      2024-02-26T12:13:43.855002233
───────────────────────────────────────────────────
8 Likes