Code Monkey home page Code Monkey logo

node-red-contrib-octopus2's Introduction

node-red-contrib-octopus

Under Development

A Node-RED node to extract the Octopus Agile future price data via the API.

My referral code if you are switching to Octopus and feel kind.

The Octopus Agile Tariff is a UK Electricity Tariff that is priced throughout the day in 30 minute blocks (periods). The price varies considerably over a 24Hr period. To see a historical view of the pricing visit energy-stats. The pricing data is released at approximately 16:00Z for the next 23:00Z to 23:00Z period. This node always retrieves all the data available.

The purpose of this node is to simplify retrieving this data so it can be used to inform people or processes of the current price and when the best time might be to consume electrcity.

Installing it into the Home Assistant Node-RED add-on will this data to be easily integrated into Home Assistant.

Install

This package can be installed directly from GitHub (not on npm currently).

It can also be installed into the Home Assistant Node-RED add-on with the following configuration;

npm_packages:
  - 'git+https://github.com/borpin/node-red-contrib-octopus.git'

If you want the dev branch, add #dev to the end of the URL.

Usage

There are 3 data outputs from the node;

  1. raw data - this is the raw data returned by the API.
  2. processed data - this output is a set of processed data.
    • current_price - the price of electricity in the current 30 min period.
    • next_price - the price of electricity in the next 30 min period.
    • min_price_inc_vat - the minimum price of electricity in the current data set.
    • max_price_inc_vat - the maximum price of electricity in the current data set.
    • Array of minimum price blocks - an array of blocks of time that are the cheapest period within the current data set. e.g. at what time does the cheapest 2 Hr block occur. Any number of lengths can be specified. 2 blocks = 60 mins.
  3. InfluxDB Data A set of data ready to be passed to an influxdb in node and loaded into InfluxDB. This can be loaded repeatedly as it is a timeseries and the times are the same.

By injecting a timestamp into the node on the hour and half hour, the node will update the data set and the current/next prices. The update rate is limited to 30 minutes to protect the Octopus API. To force the node to run, inject any NaN (string).

node-red-contrib-octopus2's People

Contributors

borpin 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.