Chapter 8. Settings & Configuration

The Settings screen is where you can set the behaviour of your SwitchThat One hub. Many of these settings will just be set once when you initially set it up. Only an ‘Owner’ will have access to these screens.

8.1. Location

Setting your location is important for the correct functioning of your One Hub. Your One Hub will come preset to a sensible location (e.g. London in the UK), but it’s worth changing this to your nearest city or town. Similarly, if you move and install your One Hub in a new city or even country, you should tell your One Hub where it is located.

Location is used to determine your timezone, what time sunrise and sunset are, local weather and can be used in conjunction with location services on your phone/tablet.

To update your location tap Settings in the menu at the top of the screen. Find the Configuration section and tap Location. You’ll see a summary and map of the current location settings.

Setting your Location

Setting your Location


Tap Change my location and three selection boxes will appear to allow you to find your current location, in terms of the continent, country and nearest city or town. When you choose a new location the map will update to help you confirm your selection. Once you’re happy, tap Set location to confirm your new location.

8.2. Remote Access

Remote access provides a secure and encrypted way for you to connect to your One Hub from outside your home network. Remote access works with the SwitchThat app on your iPhone, iPad or Android phone/tablet.

8.2.1. Setting up Remote Access

Tap Settings in the menu at the top of the screen. Find the Configuration section and tap Remote access.

Remote Access Settings

Remote Access Settings


To enable remote access check the Enable remote access box. You can simply uncheck the box to disable remote access again, should you wish to do so.

You can also customise the name and the image of your One Hub, as it appears in the Hubs list in the SwitchThat app on your phone/tablet. If you use multiple One Hubs in different locations (e.g. at home and at the office) then you can give each Hub a different name & image to make it easy to distinguish between them.

Changes to the name and image will update on your mobile device when you are next on the local network.

8.2.2. Accessing your One Hub on the Move

You need to use the SwitchThat app on your iPhone, iPad or Android phone/tablet to access your One Hub remotely. You must also already be signed in to your One Hub – you cannot use remote access unless you have already previously signed in ‘locally’, and you will lose remote access if you subsequently sign out. This is a key part of the security measures used to protect access to One.

Once you’re signed in, the SwitchThat app will connect to your One hub remotely whenever you have Internet access outside your home (we recommend a minimum of 3G access). You can easily tell if you’re connected to your One Hub using remote access by the presence of a globe icon at the top-right of the page.

Globe confirming Remote Access

Globe confirming Remote Access


Note that the SwitchThat app will choose ‘local’ access to your One Hub wherever possible and will only use remote access when it cannot connect to your One Hub directly over a wifi connection. The iPhone/iPad app will switch automatically between ‘local’ and remote access as appropriate.

8.3. Users

SwitchThat One supports three types of user, each with different levels of control over your devices and access to your One Hub: Owner, Standard and Guest. You are encouraged to create users for all of the people who will have frequent access to your One Hub.

8.3.1. Owner Users

An Owner user has full control of all of your devices and full control of the One Hub. Only an Owner user can add, configure and remove devices, create & edit rooms, create Interactions, or change the configuration of your One Hub.

You can create as many Owner users as your like, but you must have at least one. Your One Hub comes with one Owner user out of the box, initially called ‘Owner’. You are free to rename this user if you prefer.

8.3.2. Standard Users

Standard users can see and control all of your devices, but they cannot change the configuration of devices, or of the One Hub itself.

A Standard user can customise the layout of the Home page, rooms and Shortcuts; these customisations will be visible only to that user. Standard users can also create their own Shortcuts.

8.3.3. The Guest User

The Guest user is intended to allow someone temporary or restricted access to your One Hub. For example if you have a friend staying and want to give them control of some of the devices in your home.

The Guest user can only see and control devices that an Owner user has granted Guest access to. See Chapter 6, Configuring your Devices for details on controlling Guest user access to a device.

The Guest user does not need a password, and several people can be signed in as a Guest at the same time.

8.3.4. Adding a New User

Tap Settings in the menu at the top of the screen. Find the Users section and tap Add a new user.

Adding a User

Adding a User


Enter the name and password of the new user. If the new user is to be an Owner, then check the This user is an owner box; leave this box unchecked to create a Standard user. When you’re ready, tap Create user to save this new user.

8.3.5. Managing Users

Tap Settings in the menu at the top of the screen. Find the Users section and tap Manage users. You will see a list of the the users of your One Hub. You can edit or remove these users from this list.

Managing Users

Managing Users


8.3.6. Editing a User

Find the name of the user in the list and tap it; a menu will appear below the user’s name. Tap Edit user to edit it.

User menu

User menu


You can change the user’s name and password and also change whether they are an Owner user or a Standard user. Once you are happy, tap Update to save your changes.

Note

You can quickly edit your own user account by tapping your name in the menu at the top of the screen.

8.3.7. Removing a User

Find the name of the user in the list and tap it; a menu will appear below the user’s name. Tap Remove user to remove it.

You cannot remove your own user account.

8.4. Alerting services

If you want to send external alerts (emails, tweets or SMS text messages) from your Interactions, then you’ll need to configure one or more alerting services. Once setup, an alerting service can be accessed from within an Interaction and used to send an email, tweet or text in response to some event.

See Section 12.3.1, “Sending alerts” for instruction on how you can send alerts from your Interactions.

Currently you can set up the following alerting services:

  • Email over SMTP

  • Twitter

  • SMS text messaging

To set up an alerting service,Tap Settings in the menu at the top of the screen. Find the Configuration section and tap Alerting. You’ll see a row of buttons near the top of the screen, one for setting up each type of alerting service. The remainder of this section will cover setting up, and testing, each of the support alerting service.

8.4.1. Setting up an email alerting service

To set up an email alerting service, tap Setup Email alerting. You’ll be taken to a screen where you can enter the configuration details of your SMTP account.

Setting up an email alerting service

Setting up an email alerting service


Firstly, give the alerting service a name. Make this short and memorable – ‘email’ will do fine.

Note

If you want to refer to the alerting service from within the Advanced Interaction Editor you’ll need to use this name.

You can use the Description box to add a more detailed description of the alerting service (e.g. ’Send email using my gmail account’).

Next, you’ll need to enter the specific details of your email account. You can get these details from your email provider (If you use gmail, then do a search for ‘gmail smtp settings’. Try something similar for other email providers). Once you’ve found the appropriate settings, you’ll need to enter the SMTP server and port.

You must also enter a From address for the emails that are sent; usually this will be your own email address.

If your email account requires authentication to send messages (and most do) then you’ll also need to enter your Username and Password. Finally, if your SMTP server uses TLS encryption, then make sure the Use ‘starttls’ box is ticked.

Note

If you want to use your Gmail account to send alerts with SwitchThat One, you’ll probably need to change your Gmail security settings to ‘allow less secure apps to access your account’. See https://support.google.com/accounts/answer/6010255?hl=en for details of how to do this.

Once you’ve entered all the details, tap Save, and you’ll be taken back to the main Alerting services screen. Your new email alerting service will be shown in the list of available alerting services.

8.4.1.1. Testing your email alerting service

After setting up an email alerting service, you should test it to make sure everything is working correctly. On the Alerting screen, find the name of the alerting service in the list and tap it; a menu will appear below the alerting service name. Tap Test and you’ll be taken to a screen where you can send a test email.

Testing an email alerting service

Testing an email alerting service


Enter the destination email address in theTo box, complete the Subject and Body of the email and then tap Send. If everything is configured correctly you’ll see the message Sent appear, and the email should arrive at its destination. If there was a problem then you’ll see an error message explaining why the email couldn't be sent. If you think you’ve entered some of the configuration details incorrectly, you can edit your alerting service to fix the problem.

8.4.1.2. Editing your email alerting service

On the Alerting screen, find the name of the alerting service in the list and tap it; a menu will appear below the alerting service name. Tap Edit and you will be taken to a screen where you can edit the configuration details of this alerting service.

Once you’ve edited your alerting service configuration, tap Save and then run another test to make sure you’ve fixed the problem.

8.4.2. Setting up an SMS alerting service

You’ll need to have an account with a SMS gateway in order to send SMS alerts from SwitchThat One. Currently the following types of SMS gateway are supported:

  • Kapow

  • SNPP Pager/SMS gateways. This will provide support for Vodafone, Page One and others

To setup an SMS alerting service, tap Setup SMS alerting. You’ll be taken to a screen where you can enter the configuration details of your SMS gateway account.

Setting up an SMS alerting service

Setting up an SMS alerting service


Firstly, give the alerting service a name. Make this short and memorable – ‘sms’ will do fine.

Note

If you want to refer to the alerting service from within the Advanced Interaction Editor you’ll need to use this name.

You can use the Description box to add a more detailed description of the alerting service (e.g. ’Send SMS text using my Kapow account’).

Next, you’ll need to enter the specific details of your SMS gateway account. You can get these details from your service provider. What information you need to enter depends on the type of gateway you use:

  • For Kapow, you'll need to enter your Kapow username and password.

  • For an SNPP gateway, you'll need to enter the Server name or IP address, and your Username.

Once you’ve entered all the required configuration, tap Save, and you’ll be taken back to the main Alerting services screen. Your new SMS alerting service will be shown in the list of available alerting services.

8.4.2.1. Testing your SMS alerting service

After setting up an SMS alerting service, you should test it to make sure everything is working correctly. On the Alerting screen, find the name of the alerting service in the list and tap it; a menu will appear below the alerting service name. Tap Test and you’ll be taken to a screen where you can send a test SMS text message.

Testing an SMS alerting service

Testing an SMS alerting service


Enter the destination number in the To box, the message you want to send in the SMS text box, and then tap Send. If everything is configured correctly you’ll see the message Sent appear, and the SMS text message should arrive at its destination. If there was a problem then you will see an error message explaining why the SMS couldn't be sent. If you think you’ve entered some of the configuration details incorrectly, you can edit your alerting service to fix the problem.

8.4.2.2. Editing your SMS alerting service

On the Alerting screen, find the name of the alerting service in the list and tap it; a menu will appear below the alerting service name. Tap Edit and you will be taken to a screen where you can edit the configuration details of this alerting service.

Once you’ve edited your alerting service configuration, tap Save and then run another test to make sure you’ve fixed the problem.

8.4.3. Setting up a Twitter alerting service

You’ll need to have a Twitter account in order to send Tweets from SwitchThat One. When setting up a Twitter alerting service you’ll be asked to grant SwitchThat One access to your Twitter account.

Note

Only your One Hub will have access your twitter account and be able to send tweets on your behalf. SwitchThat One will only send Tweets when explicitly instructed to do so as part of an Interaction.

To setup a Twitter alerting service, tap Setup Twitter alerting.

The first step is to grant SwitchThat One access to your Twitter account and get an authorization PIN.

Setting up a Twitter alerting service part 1

Setting up a Twitter alerting service part 1


Tap Get an authorization PIN and a web browser will open up taking you to a page on the Twitter website where you will be asked to authorize SwitchThat One to access your account. You may have to sign in to Twitter at this point. After granting access to your account you’ll be shown an authorization PIN – you should write this down, or highlight and copy it, so that it can be entered during the next step of the setup process. After obtaining your authorization PIN you should return to SwitchThat One

Note

If you’re using the SwitchThat app on an iPad, iPhone or Android device, the authorization page will open up in your default web browser (e.g. Safari on iOS). Once you have obtained your authorization PIN, simply return to the SwitchThat app to continue the setup process.

To proceed to the next step of the setup process you should tap I have an authorization PIN and you will be taken to a screen where you can enter your PIN.

Setting up a Twitter alerting service part 2

Setting up a Twitter alerting service part 2


Note

If for any reason you were unable to return directly to the initial Twitter alerting service setup screen, you can get back to it by visiting the Alerting screen and tapping Setup Twitter alerting again. In this case you will be taken directly to the second step of the setup process.

Firstly, give the alerting service a name. Make this short and memorable – ‘twitter’ will do fine.

Note

If you want to refer to the alerting service from within the Advanced Interaction Editor you’ll need to use this name.

Next, you’ll need to enter the authorization PIN you were given when you granted SwitchThat One access to your Twitter account.

Once you’ve entered your PIN, tap Save. If the setup process was successful, you’ll be taken back to the main Alerting services screen. Your new Twitter alerting service will be shown in the list of available alerting services. The Description will contain the name of your Twitter account.

However, if setup fails with the error message that Twitter has rejected your authorization PIN, then double-check you have entered the PIN correctly and try again. If setup still fails, then tap I need an authorization PIN to get a new PIN and start again.

8.4.3.1. Testing your Twitter alerting service

After setting up a Twitter alerting service, you should test it to make sure everything is working correctly. On the Alerting screen, find the name of the alerting service in the list and tap it; a menu will appear below the alerting service name. Tap Test and you’ll be taken to a screen where you can send a test tweet.

Testing a Twitter alerting service

Testing a Twitter alerting service


Enter the message you want to send in the Tweet box, and then tap Send. If everything is configured correctly you’ll see the message Sent appear, and the tweet should appear in your Twitter timeline. If there was a problem then you’ll see an error message explaining why the tweet couldn't be sent.

8.4.3.2. Editing your Twitter alerting service

The only thing you can change for a Twitter alerting service is its name. If you wish to send tweets from a different account, you’ll need to setup a new Twitter alerting service specifically for that account.

On the Alerting screen, find the name of the alerting service in the list and tap it; a menu will appear below the alerting service name. Tap Edit and you will be taken to a screen where you can edit this alerting service.

8.5. Calendars

SwitchThat One enables you to schedule events to happen using an iCal server based calendar such as Google Calendar. At the time of writing, no other calendars have been tested, but should work if they conform to the standards.

This could be useful if you are going to be away for a couple of weeks, as you could set up a calendar that has lights switching on and off periodically, or your music system playing during the evening. You could even tweak the calendar entries while you are away.

Calendar repeat rules will also be respected, so that you can have an event that ‘repeats every Tuesday at 3pm’ or trigger your Sonos to play ‘Happy Birthday to you’ every year to wake you up.

8.5.1. Adding a calendar

Tap Settings in the menu at the top of the screen. Find the Configuration section and tap Calendars. Tap Setup a new calendar and you’ll be taken to a screen where you can enter the details of your calendar.

You need to enter the iCal URL for the calendar, and give it a name, to help you distinguish it from any other calendars you might add.

Note

To find the iCal URL of a Google Calendar, open the Calendar Details for your calendar, and click the Private Address button.

The contents of the calendars you add will be scanned whenever you make changes on this screen, and then every hour thereafter. You can also click the “Synchronise Now” button to trigger a rescan of your events if you are impatient!

8.5.2. Using a calendar

What can you schedule using your calendar? Basically anything you can write in the ‘Then That’ box of an Interaction, as covered in Section 13.2.2, “Then That”. If you’re not already familiar with writing your own Interactions, then take a look at Chapter 13, Advanced Interactions before starting to use calendars.

To create a calendar-based event:

  1. Add a new event to your calendar at the appropriate date/time
  2. Enter the ‘Then That’ Interaction script as the event title

For example, if you wanted your Sonos player to wake you up at 6am tomorrow morning, you would create a new calendar event for 6am and set the event title to be:

   devices['My Sonos'].play

You can also include an action to occur at the end of the calendar event, by separating the actions with a ‘|’ symbol. So, if your calendar event has 1 hour duration you can stop the music at the end by changing the event title to:

   devices['My Sonos'].play | devices['My Sonos'].pause

However, as it is quite common to match on/off, play/pause, mute/unmute etc., you can just use the ~ symbol as shorthand, e.g.:

   devices['my sonos'].play | ~

Take a look at Chapter 13, Advanced Interactions for full details of the kinds of events you can schedule using a calendar.

8.6. API Users

SwitchThat One features a rich API to enable automation using external scripts and applications. See Chapter 11, The HTTP API interface for full details of the One API.

The One API is secured using basic access HTTP authentication. If you want to use the One API you must create one or more API users on your One Hub.

8.6.1. Adding an API User

Tap Settings in the menu at the top of the screen. Find the Configuration section and tap API users. You will see a list of the active API users for your One Hub, which will be empty initially.

Tap Add a new API user to create a new one. Enter the name and password of the new API user and then tap Update API user to save.

8.6.2. Editing or Removing an API User.

Tap Settings in the menu at the top of the screen. Find the Configuration section and tap API users. Find the name of the API user in the list and tap it; a menu will appear below the API user’s name. Tap Edit API user to edit it, or Remove API user to remove it.