GithubHelp home page GithubHelp logo

agile's Introduction

Agile Octopus - Kasa

This is a simple program that reads Octopus Agile data and turns on tp-link Kasa smart plugs when the electricity price is negative. It will exit once it has run out of Agile data. I just hacked this quickly for my own use so it's not consumer-grade code; you'll probably need a bit of Nodejs knowledge to make it do what you want. That said, it's very short and simple.

The easiest way to use it is to set up a Cron job to run it between 22:30 and 23:00 every day. That way it will pick up the next day's data after it has just finished with today. Don't forget to set the PATH in your crontab to point to your instance of Nodejs: the standard Cron PATH may not include it.

To run the code, make sure you have Node, then clone this repo. Do npm iand, from the local repository root, run node src/index.mjs.

The program will find and operate all of your Kasa smart plugs. If you don't want that then filter the list of plugs it discovers (e.g. plug.alias will return the 'name' of the plug). Change the code in plug-discovery.mjs.

Finally, note that the Agile tariff code (see the config) is area-dependent. The letter E indicates that this code is for the South-East region. If you live elsewhere, you'll need to change to your area code or the prices will be wrong. The codes are listed here.

agile's People

Contributors

westlad avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.