Git Product home page Git Product logo

Comments (7)

MattJeanes avatar MattJeanes commented on July 18, 2024

Hey, we already have an API integration with Octopus set up for Octopus Agile so this shouldn't be too difficult if they are exposing an endpoint to grab pricing data from, do you know what API calls can be made to fetch either point in time pricing data or the 24 hour schedule similar to the fixed price provider?

from teslamateagile.

dakaix avatar dakaix commented on July 18, 2024

Doesn't look like Octopus have updated their public REST API documentation yet, however there is already a Home Assistant module (written in Python) which queries that API. I'm using it at the moment and it works as advertised to retrieve the Intelligent charging schedule each night.

Link here:
https://github.com/megakid/ha_octopus_intelligent/blob/main/custom_components/octopus_intelligent/octopus_intelligent_system.py

I don't write Python, but from what I can make out it seems to centre around the "registeredKrakenflexDevice" type. This lines up with what you see in the Octopus app, as when you're on Intelligent you get a new "Devices" tab that appears inside the app - and is where you can see the proposed charging schedule (after 5pm each evening).

This dynamic schedule is required to capture any charging windows that Octopus allocates outside of the guaranteed Intelligent off-peak window (23:30-05:30), as they are also charged at the off-peak rate.

from teslamateagile.

MattJeanes avatar MattJeanes commented on July 18, 2024

Thanks for the information

I've had a look but it seems like the data is all designed to be realtime or recent history / future and I couldn't see a way to retrieve pricing data in between two arbitrary points in time which is what TeslaMateAgile needs to work properly unfortunately.

If you are able to find one (or maybe even use the same / similar one) that you can use for Agile I'll definitely look into it, I can see this being the case that it works on any Octopus tariff if you know how to call it correctly 🙂

from teslamateagile.

MattJeanes avatar MattJeanes commented on July 18, 2024

Hey so little update, I am actually using Intelligent Octopus myself now so this has become of interest to me again!

I've contacted Octopus myself and they said there is no API similar to Agile pricing for it unfortunately. I could perhaps do some work to allow recent charges to be calculated if data is available and ignore older charges, most of the time TeslaMateAgile is only calculating charges that have just finished so it could definitely be worthwhile.

Funnily enough I'm also now using Home Assistant so that custom integration is also of interest to me - I'll check it out and see if I can work something out here 😄

from teslamateagile.

duncanbarnes avatar duncanbarnes commented on July 18, 2024

This may only be if you have the Octopus Mini which reads the smart meter every 10 mins or so, but within HA I have a sensor called: sensor.electricity_[METER_SERIAL_NUMBER]_current_rate

So this sensor is a little custom to each user as it has the meter serial number in it and I've not had a chance to delve into the source code for the integration to see how its getting this data but from the graph below it is varying convincingly.

HA Octopus current rate sensor

from teslamateagile.

MattJeanes avatar MattJeanes commented on July 18, 2024

I've just had a thought that might solve this and provide a lot greater flexibility:

We could simply integrate with Home Assistant directly which can listen to say, an entity state, which will provide an easy rolling window of time / price over I believe 2 weeks by default in HA which for most use cases is plenty.

This way you can just provide the number however you like, via any integration e.g. the Intelligent Octopus one above and you could even mix it in with solar/home battery data if you have that and leave TeslaMateAgile to do what it is good at which is taking a bunch of prices and associated times and calculating your charge cost.

This for me personally would solve 2 problems I'm running into at the moment:

  1. How do I take account of Intelligent Octopus' flexible rates, especially with no API
  2. How do I integrate house solar/battery into the price equation

And means TeslaMateAgile does not need to worry about storing or keeping track of prices from a live feed which has been suggested before and would have to be how it's done for Intelligent Octopus as well.

What do you guys think about that, anything else I could do to make the experience better for you?

from teslamateagile.

MattJeanes avatar MattJeanes commented on July 18, 2024

I have now done the above and Home Assistant is now a provider with the release of v1.12.0!

I've provided an example in the readme FAQ about using Intelligent Octopus and that is my recommendation for anyone wishing to use IO with TeslaMateAgile, I am using it myself this way in fact!

I am however not planning at this time to provide native support for Intelligent Octopus due to the API not being able to respond to a date range.

from teslamateagile.

Related Issues (20)

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.