Impulses provide the last of the three key interaction modes we require:
The mobile-friendly website is fantastic for keeping tabs on your home while you are absent, and could be used within the home, but it can be slightly irksome to have to login to a website just to turn on the heating. This is where the Impulse comes to the rescue. It is a simple button, connected to the hub, which with suitable configuration can generate events much like Conditions.
The concept is very topical, with the release of the Amazon dash buttons (details for connecting these to the hub are provided in a later post!).
Use the following command to download the controller code for impulses:
wget -P /usr/local/bin/code/controller http://www.warrensoft.co.uk/home-hub/code/controller/impulses.py
Uncomment the code for impulses in lines 35 and 186 in main_sched.py, and restart the controller.
Next we need hook up a button to our pi, so we can trigger the impulse. This is discussed in the next post.