Comments (7)
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.
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.
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.
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.
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.
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](https://private-user-images.githubusercontent.com/4053079/252043121-ddf4a43e-381e-4505-ac89-e0446f66c6e1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk4NzkzMDcsIm5iZiI6MTcxOTg3OTAwNywicGF0aCI6Ii80MDUzMDc5LzI1MjA0MzEyMS1kZGY0YTQzZS0zODFlLTQ1MDUtYWM4OS1lMDQ0NmY2NmM2ZTEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDJUMDAxMDA3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDg5N2VkNmQxZTMyYTE2ZGU0OGJjM2U1YTgwOTNjNzZjNzQ1YTFmMDA1OGM0ODE3Yjg1M2Q2Mzk3NmU5ODc4YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.Jv0MolWEvVP-Iaq3d8HbYC5VqE39LswPeBEGeRaXZ_Q)
from teslamateagile.
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:
- How do I take account of Intelligent Octopus' flexible rates, especially with no API
- 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.
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)
- Calculation fails when the end time of a charge is very close to the beginning of the hour HOT 3
- Unable to calculate cost of some charges HOT 11
- Create REST endpoint to get price at specific datetime HOT 3
- Failed to update prices - System.ArgumentException: totalHours HOT 6
- Failed to calculate charging cost / energy for charging process HOT 6
- Enhancement / Feature Upgrade - integration of EMS evcc HOT 2
- Unable to download docker image HOT 2
- Feature request - Make available in Home Assitant hassio HOT 15
- Feature request: Day of week in FIxedPricing
- Updating price from Home Assistant fails because "The input string 'unavailable' was not in a correct format." HOT 3
- Tibber "Failed to calculate charging cost" HOT 8
- Feature Request: Fixed Pricing Based on Day of Week HOT 2
- TeslaMateAgile.PriceHelper Tibber fails HOT 6
- No data available if multiple homes exist HOT 10
- Feature request : Show the energy prices in a dashboard HOT 5
- Feature request: monitoring multiple geofence IDs HOT 3
- Help needed: "number-based entity" in HomeAssistant clarification HOT 4
- TeslaMateAgile.PriceHelper Tibber fail HOT 5
- Everything is wonderfull HOT 1
- Option for setting negative prices to 0 in Energinet HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from teslamateagile.