|  Help center

MiOS search

Recreate Vera ‘House Modes’ using Meshbots

Vera house modes are collections of device settings that let you quickly set the status of a range of devices with a single click. Your controller is always in one of four modes – Home, Away, Night or Vacation:

This tutorial shows you how to create your own house modes in EZLogic using meshbots controlled by virtual switches. You can then activate any house mode with a single touch in the dashboard in the MiOS mobile app or EZLogic web UI. You can also operate your house modes via voice commands, HTTP API calls and even 3rd party dashboard apps.

Note. The house modes you will create in this tutorial are not the same as the house modes you see in the Vera mobile app/Web UI. This is essentially a parallel system. To avoid conflicts and confusion, you should disable the house modes in the Vera system if you plan to use meshbot-based house modes.

We will cover the following steps:

Install the Virtual Devices plugin on your controller

You need to install the virtual devices plugin in order to create virtual switches on your controller. These switches will later be used to activate your house mode meshbots.

  • SSH into your Ezlo controller using Putty or another SSH client. You can download the Putty client at https://www.putty.org/
  • Access the controller with the following credentials:
    • Username – root
    • Password – found on the sticker underneath your controller.
  • Run these two commands at the prompt:

opkg update

opkg install firmware-plugins-test_plugin

  • Reboot your hub to complete the plugin installation. Type ‘reboot’ at the Putty (or other client) window then hit ‘Enter’.
  • You can move onto the next step once the controller has rebooted.

Create virtual switches for each house mode

This section teaches you how to create four virtual ‘On/Off’ switches which you will use to activate and deactivate your house modes.

  • Open the MiOS API Tool page at https://apitool.ezlo.com/dashboard
  • Login with your MiOS/Ezlo/Vera username and password.
  • Select your controller in the ‘Connection Establishment’ menu then click ‘Connect’:
  • Select ‘Custom’ in the ‘Commands’ menu.
  • Paste the following command into the resulting text box then click ‘Send’:
				
					{
 "method": "extensions.plugin.run",
 "id": "_ID_",
 "params": {
 "script": "HUB:test_plugin/scripts/generate_devices",
 "scriptParams": {
 "device_type": "plug_interior",
 "devices_count": 1
 }
 }
}
				
			
  • This will automatically create a virtual switch in the EZLogic > ‘Devices’ area with a default name similar to ‘TestSwitch_1’.
  • Repeat the custom command process three more times to create three more switches. This will give you a total of four new virtual switches, one for each house mode.
  • Next, login to EZLogic and open the ‘Devices’ menu.
  • Locate the four new virtual switches. They will initially have default names like ‘TestSwitch_1’, etc:
  • You now need to rename these switches to match the four house modes.
  • Click on the name of the first switch and rename it as ‘Home House Mode’, or simply ‘Home’ if you prefer.
  • Repeat the process for the other three switches, calling them ‘Night House Mode’, ‘Away House Mode’ and ‘Vacation House Mode’ respectively.
  • Your final switches should look something like this:
  • These switches will automatically appear in your dynamic dashboard as shown below:
  • The next step will show you how to hook these switches up to meshbots that run your house modes.

Set up meshbots for each house mode

This section shows you how to create meshbots which contain all the actions you want to implement in a given house mode. The trigger to activate the meshbots will be the ‘On/Off’ status of the switches you set up in the previous step.

  • Login to EZLogic with your MiOS/Vera/Ezlo username and password.
  • Click ‘Meshbot Automation’ > ‘Create new Meshbot’ > ‘Local’:

You need to set up 4 new meshbots, once for each house mode. The following sections use the ‘Home’ house mode meshbot as an example.

Triggers

  • Add a single trigger to the meshbot with the following settings:
    • Node Type = Device
    • Node = Home House Mode Switch (or whatever you named your switch).
    • Capability = Switch
    • Value = True
  • Name the meshbot something like ‘Home Mode Meshbot’:
  • The next step will show you how to hook these switches up to meshbots that run your house modes.

‘True’ Actions

The next step is to add actions to the meshbot which reflect what you want to happen when your house is in ‘Home Mode’. These actions should cover all the security and other device settings that you want to implement AND disable any actions unique to that mode AND disable all other house modes.

  • It is beyond the scope of this tutorial to anticipate every possible action and notification you may want in your house modes.
  • However, a good starting point is to copy the device arm/disarm settings for each house mode as explained in this Vera help page. You can then expand and customize your actions as you see fit.
  • The following image shows a very simplified action set that could represent your ‘Home’ mode. It contains arming instructions for two example devices, a notification, and another action to run a music meshbot:
  • Next, you must add actions to disable the other three house mode meshbots in your ‘true’ tab. House modes are mutually exclusive so only one mode can be active at once.
  • The following image shows the three ‘disable house mode’ actions for the ‘Home’ meshbot:

False actions

  • You should also use the false tab to disable any actions that are unique to that house mode. Otherwise they will just keep running forever.
  • You do not need to create false actions for devices/meshbots that are already covered in the ‘True’ tab of other house modes. This is because the actions in the newly active mode will over-rule those in the previous mode anyway.
  • For example, in the ‘Home’ mode meshbot shown above you would only need to create a false action to disable the lounge music meshbot:

Here’s a simple representation of how the action sets could look in all four of your house modes:

Test and use your new house modes

  • Open your dynamic dashboard. Click the menu icon to switch to the dynamic dashboard if it is not already active:
  • Scroll down to the 4 house mode switches you created earlier.
  • Use the sliders to activate the house mode of your choice. The following example shows the ‘Home’ house mode as active:
  • Activating a different mode switch will automatically deactivate the previous mode due to the disable actions in each meshbot:
  • You can also operate your virtual switches by other means, such as voice commands, HTTP API requests and third party dashboard apps.

Further reading