Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

InstallationSiriProxy

Alexander Thoukydides edited this page Mar 19, 2015 · 3 revisions

Voice Control from an iPhone or iPad via SiriProxy

Pete Lamonica's SiriProxy allows the connection between an iPhone or iPad and Apple's Siri servers to be intercepted. Plugins can then be used to locally extend the functionality of Siri. This project includes such a plugin to enable Heatmiser Wi-Fi thermostats to be interrogated and controlled by voice from iOS devices. It supports multiple heterogeneous Wi-Fi thermostats with full control over both central heating and hot water settings.

Note: SiriProxy does not currently work with iOS 7; see SiriProxy issue 542 for details.

SiriProxy Setup

The first step is to install and configure SiriProxy in accordance with its Setup Instructions. This can be quite tricky but some of these SiriProxy Setup Hints may be helpful.

Before continuing verify that SiriProxy is correctly installed by starting Siri and asking it to:

Test Siri Proxy

If everything is working then it should respond with:

Siri Proxy is up and running!


## HeatmiserWiFi SiriProxy Plugin Configuration ##

For systems that only have a single thermostat it is straightforward to add and configure this plugin. Start by adding the following lines to the end of `~/.siriproxy/config.yml` file:
```yaml
    - name: 'HeatmiserWiFi'
      path: '~/heatmiser-wifi-read-only/siriproxy'

These can be copied from the included ~/heatmiser-wifi-read-only/siriproxy/config-info.yml file.

Next tell SiriProxy to update the necessary gems:

siriproxy bundle

Finally, restart SiriProxy to load the new plugin:

sudo restart siriproxy

It is a good idea to check the logging output from SiriProxy to verify that the plugin is being loaded without any errors being reported:

sudo tail -f /var/log/upstart/siriproxy.log

Configuration of Multiple Thermostats

If there are multiple thermostats then define friendly names for them. These can then be used in voice commands to specify the thermostat(s) to be controlled. This configuration is also done in the ~/.siriproxy/config.yml file:

    - name: 'HeatmiserWiFi'
      path: '~/heatmiser-wifi-read-only/siriproxy'
      thermostats:
        'heatmiser':
        - 'hallway'
        '192.168.0.42':
        - 'bedroom'
        - 'my bedroom'

For each thermostat the hostname or IP address is given first followed by a list of aliases which may be used in voice commands. All of the hostnames and aliases should be enclosed within quotation marks. This example defines two thermostats: the first with hostname heatmiser and an alias of hallway, and the second with IP address 192.168.0.42 and two aliases bedroom and my bedroom.

The hostnames should exactly match those listed on the HOST line of the /etc/heatmiser.conf file. The hostname is not automatically included in the aliases; explicitly list it as an alias if required.

The first alias listed for each thermostat should be its preferred name; this will always be used to identify that thermostat in Siri's responses (with any occurence of my changed to your). Do not include thermostat as part of the aliases since that is added automatically.

After editing the configuration file SiriProxy should be restarted for the changes to take effect:

sudo restart siriproxy

Supported Voice Commands

This plugin supports a large number of commands, and is quite flexible about the phrasing and words used. The following are just examples to give an idea of what is possible; experiment or look at the source code to see what other commands can be used.

If a command that you would expect to work is unrecognised or behaves incorrectly then please contact the author.

Queries:

  • What is the hallway thermostat status?
  • Check the status of all thermostats.

Actions:

  • Switch the hallway and bedroom thermostats on.
  • Turn off the Heatmiser thermostat.
  • Set the thermostat to holiday mode until 25 December. (implementation not yet complete)
  • Cancel all thermostats away mode.
  • Cancel on holiday for bedroom thermostat.

Voice Commands for Heating

Queries:

  • What is the interior temperature?
  • How hot is it indoors?
  • Is it cold inside?
  • What is the thermostat temperature?
  • What are the temperatures of the hallway and bedroom thermostats?
  • Is the central heating enabled?
  • Check the hallway heating status.

Actions:

  • Set the hallway and bedroom thermostats to 21°.
  • Set the temperature to 15 Celsius.
  • Increase target temperature by 2°.
  • Lower bedroom temperature by 3° Centigrade.
  • Hold the temperature for an hour.
  • Maintain the bedroom temperature until 9 o'clock.
  • Hold the hallway thermostat at 21° for 20 minutes.
  • Hold temperature at 20 Cesius for 2 hours.
  • Set all thermostats target temperature to 19° and hold for an hour.
  • Set temperature to 22 Centigrade and hold for 30 minutes.
  • Hold the bedroom and hallway thermostats at 70° Fahrenheit until 9:30 PM.
  • Keep temperature at 18° Celsius until 5 PM.
  • Set hallway thermostat target temperature to 20 Celsius and hold until 7 o'clock.
  • Set temperature to 22° and maintain until 7:30 AM.
  • Cancel all thermostats temperature hold.
  • Stop target temperature hold.
  • Terminate holding bedroom temperature.
  • Place all thermostats in frost protection mode.
  • Put the thermostat in heating mode.
  • Enable frost protect mode.
  • Disable bedroom heating.
  • Switch heating on.
  • Turn off hallway and bedroom heating.

Voice Commands for Hot Water

Queries:

  • Is hot water active?
  • Interrogate the bedroom hot water status.

Actions:

  • Switch hot water on.
  • Turn off bedroom hot water.
  • Enable all hot water.
  • Extend hot water for 1 hour.
  • Boost bathroom thermostat for 30 minutes.
  • Boost hot water until 8 o'clock.
  • Boost all thermostats until 9:20 PM.
  • Cancel the hot water override.

A Simpler Alernative

Dave Black has produced an alternative SiriProxy plugin that also builds on this project's Perl scripts. For Raspberry Pi owners this is much easier to setup because Dave has released a pre-prepared disk image. However, its functionality is much more limited. In particular, it only supports a single thermostat and does not provide any support for controlling hot water... although it does include more esoteric features such as being able to tweet the thermostat's status.