In this article we'll show a step by step guide for creating an configuring an activity.
Activities are really powerful, have many options, so you customise them to your needs. However to keep the guide focused, we'll create an activity including two devices:
- IR controlled TV
- IR controlled AVR
Please note that you can create activities with many devices regardless of those are IR remotes or network controlled devices provided by an internal or external integration.
To get started, open the Web Configurator and navigate to Activities.
Under the section Activities, click on the big plus icon.
A window will open, where you can give a name for your activity. In this case, we call it Watch TV.
You'll also see a list of entities you can choose from to include in this activity. Here you also have the option to search and use filters to make it easier to find what you're looking for.
For this example, we add the two entities:
- Living room TV
- Living room AVR
After clicking Add, the activity is created and the activity configuration page is loaded.
Please note that if you click on an acitivty in the Activities page, you'll be taken to this configuration page.
The configuration page is divided into three main sections:
- The section on the left show the icon, name and description of the activity. Clicking on the pencil icon will let you edit these properties. Under the description, there's a switch that will enable the option to keep the remote awake while this activity is running. This is a useful feature, when you have network based devices and your network responds slow to commands. Below there's a button to edit the user interface and a list of included entities.
- In the middle, you see the on and off sequences for this activity. These are a chain of commands that will be executed when you start or power off an acitivty.
- On the right side, you see the available commands from the included entities. You can drag and drop these commands to one fo the sequences. Under the Entities tab you see all the available entities that you can add to this activity. You can do this by simply dragging them to the list of included entities.
Let's start adding commands to the on sequence. Using the search funcionality, we can find the power on commands for the TV and drag it to the sequence. In same cases, you might want to add a delay - to wait for a device to power on for example - that is availalbe at the top of the list of commands. You can specify the delay in miliseconds.
The on sequence looks good now. It does the following:
- Send the power on command to the TV
- Wait 2 seconds
- Send the power on command to the AVR
- Wait 5 seconds
- Switch to Input 1 on the AVR
Let's take a look at the off sequence. Here we just send the off commands to both devices.
Now our acitivty will execute the on sequence when we start it and run the off sequence when we stop it. Next up on our todo list is to configure the user interface, including the button mappings. To do that, click on the Edit user interface button on the left.
This will take you to the screen above. Here we also have three sections:
- The section on the left contains the button mappings. You can assign commands to short and long presses, represented by a dot and line respectively. Click here to learn more about button mappings.
- In the middle you see the visual representation of the user interface. This is how it will look on the remote.
- On the right, you have options to configure the size of the grid, as well as three widgets that you can drag and drop to the remote's screen. These three widgets are: Icon widget, Text widget, Media widget. The media widget will display artwork, and progress status based on available space. Under the Pages tab, you can manage the pages you've added to this acitivty.
Let's configure the volume buttons to control the AVR's volume. To do that simple click on the long press placeholder NONE. In the popup window, you'll see all the available commands from the included entities. Search for volume for the AVR and select the VOLUME_UP command. That's it. Now while the activity is running and open, the volume up button will send the volume up command to the AVR.
You can mix and match how you assign commands to buttons. Even long press could trigger something else with another device.
Now we'll focus on the graphical user interface. We'd like to have a button to switch between inputs on the AVR. To do that, we simply drag a widget (in this case a text widget) to the screen.
In the popup window, we find the input command for the AVR we're looking for. Here we also have the option to adjust the width and height of this widget. Let's make it 2, so the text will fit nicely.
To finish this example, we add 3 more text widgets for Input 2, Guide and Info. Guide and Info will trigger the corresponding commands for the TV, while Input 2 will switch to the second input on the AVR.
That's it. We created our first activity, configured button mappings and added widgets to the UI. Let's recap what we did:
- Added two entities to the activity: Living room TV and Living room AVR
- Configured the on and off sequences
- Mapped volume buttons to control the AVR
- Added widgets to the screen to switch Inputs on the AVR
- Added widgets to the screen to send Guide and Info commands to the TV
This example is covering a simple use case, but it should give you an idea of how activities work and what possibilities are there when using them.