Skip to content

Toggle the state of Philips Hue plugs based on the current Octopus Agile price.

Notifications You must be signed in to change notification settings

AlanCunningham/octopus_agile_trigger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Octopus Agile Trigger

A small script that toggles the state of Philips Hue plugs based on the current Octopus Agile price.

Overview

This is intended to be run every half an hour on a cronjob. When the price drops below a given threshold, it turns on a Philips Hue plug. I then have a Google Home automation which uses the Hue plug state as a trigger to run other automations in the house (e.g. turn on the car charger, dishwasher, and send a broadcast via Google speakers etc). When the price goes back above the threshold, it turns the Hue plug off.

Similarly, when the price goes below 0, the state of another Hue plug is set, which can trigger another automation.

Installation

Clone the project and install the dependencies into a python virtual environment:

# Clone the repository
$ git clone git@github.com:AlanCunningham/octopus_agile_trigger.git

# Create a python virtual environment
$ python3 -m venv venv

# Activate the virtual environment
$ source venv/bin/activate

# Install the python dependencies using the requirements.txt file provided
(venv) $ pip install -r requirements.txt

Open the settings.py and enter:

  • Your Philips Hue Bridge IP address
  • You Distribution Network Operator Code
  • The names of the Hue plugs you want to toggle when the price drops below a given threshold and for plunge pricing
  • You preferred price threshold in pence

Then run the application

(venv) $ python main.py

About

Toggle the state of Philips Hue plugs based on the current Octopus Agile price.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages