Charge at the cheaper rates

Posted on
Sat Nov 21, 2020 2:43 am
neilk offline
Posts: 392
Joined: Jul 13, 2015
Location: Reading, UK

Re: Charge at the cheaper rates

Pete - do you have a tool for estimating generation. I came across solcast which looks like it does what you are looking for and a plugin would be easily do-able.

No PV myself but considering and a powerwall but given lockdown it might be interesting to investigate as what else can I do at weekends !

It could be quite a cool indigo plugin to forecast based on location and your array. Let me know and I could do some digging but would need some help.

My interest is building in this area as to the art of the possible.

https://solcast.com/

Neil

Posted on
Sat Nov 21, 2020 6:29 am
neilk offline
Posts: 392
Joined: Jul 13, 2015
Location: Reading, UK

Re: Charge at the cheaper rates

Pete,
I had a play with their API, a plugin would be trivial for this to build but just using GhostXML I was able to get a "PV Forecast" device that shows the following states (and more)

Screenshot 2020-11-21 at 12.21.51.png
Screenshot 2020-11-21 at 12.21.51.png (69.71 KiB) Viewed 216 times


Where

pv_estimate PV power estimated in kilowatts (kW)
pv_estimate10 PV power estimate in kilowatts (kW) 10th percentile (low scenario)
pv_estimate90 PV power estimate in kilowatts (kW) 90th percentile (high scenario)

For each time period.

I created a dummy site for my home address so the number are made up but it is based on an array on my roof.

Let me know if you want to set this up, and I may be able to help turn this into something you could use (I didn't dig deep but pretty sure we could average over a longer period that the 30 minute slots here to give a single value for daylight hours).

Neil

Posted on
Sat Nov 21, 2020 1:13 pm
petematheson offline
Posts: 838
Joined: Sep 14, 2014
Location: Southampton, UK

Re: Charge at the cheaper rates

That would be incredible - the ideal world will be to have a system that 'knows' how much it will generate tomorrow, so it can fill any shortfall via cheap rates overnight.

Also, plugin seemed to work OK last night, however today it looks like it's yet to update with tomorrow's rates?
I haven't forced / reloaded the plugin or anything just yet as I wanted to check if this may be a bug first or perhaps I'm being impatient and it should update before midnight? :)

Posted on
Sat Nov 21, 2020 2:52 pm
neilk offline
Posts: 392
Joined: Jul 13, 2015
Location: Reading, UK

Re: Charge at the cheaper rates

The good news is it (should !) change over at midnight as currently I haven't done it as elegantly as it could be as I just piggy backed on the existing code which re-populates the states at midnight. I will do a version that works from after the evening peak through until the following day in a single stretch, and recalculates as cheaper slots have passed by, but I will need to do a little more under the covers and think how I will represent it.

As for the solcast it will do what you need (I have no idea how accurate it is), I burned through my "free" api calls while I was messing around so had to stop. It may take me a while but I am happy to try as this will also allow me to model the potential for an array for me as well. I think another plugin may be brewing.

Neil

Posted on
Sun Nov 22, 2020 4:33 am
neilk offline
Posts: 392
Joined: Jul 13, 2015
Location: Reading, UK

Re: Charge at the cheaper rates

https://github.com/neilkplugins/Octopus_Energy-indigo-plugin/releases/tag/0.2.20-Alpha

Pete,
This version is an interim fix that makes it clear that the device is referring to "todays" preferred periods, even though they have now passed, and also that the evening and night charge sessions may not yet have valid data for 23:00 to 00:00 today (for the Evening charge sensor) or from Midnight onwards.

The sensor works as planned, but as you found out it does not re-calculate the 'night' charging periods until Midnight, I will now add a way of publishing that as soon as Octopus publish the rates (usually around 16:00)

You now have a "Rates_Available" device state that is "Yes" if the rates are in the future and available, and "No" if not. Also I have added the text "Expired/Incomplete" before the text of the Preferred_Periods and Preferred_Rates device states when that is the case.

Crude but a little cleaner than the last version.

More to come.

Neil

Posted on
Sun Nov 22, 2020 4:48 am
petematheson offline
Posts: 838
Joined: Sep 14, 2014
Location: Southampton, UK

Re: Charge at the cheaper rates

Thanks - will give this a go today.
I got no charge last night, can’t see why as it looks like the rate is showing right (now). Maybe it didn’t update in time or something.
I’ll try and remember to manually check before I head to bed tonight!


Sent from my iPhone using Tapatalk

Posted on
Sun Nov 22, 2020 4:57 am
neilk offline
Posts: 392
Joined: Jul 13, 2015
Location: Reading, UK

Re: Charge at the cheaper rates

Thanks - I will look into it, as I have set triggers on my dev machine to simulate a load being switched. Sorry if it didn't work but we will crack this.

Neil

Posted on
Sun Nov 22, 2020 6:46 am
neilk offline
Posts: 392
Joined: Jul 13, 2015
Location: Reading, UK

Re: Charge at the cheaper rates

https://github.com/neilkplugins/Octopus_Energy-indigo-plugin/releases/tag/0.2.22-Alpha

No essential but if you get a chance try this one. I improved the logging (Sensor state changes are now logged in the event log) and I added a "Charge_Hours_Delivered" that adds 0.5 to the counter each time the sensor turns on so you can track how many hours you should have had.

Posted on
Sun Nov 22, 2020 7:23 am
petematheson offline
Posts: 838
Joined: Sep 14, 2014
Location: Southampton, UK

Re: Charge at the cheaper rates

Awesome - installed, will check later tonight and see what the deal is :) Thanks!

Posted on
Mon Nov 23, 2020 3:12 am
petematheson offline
Posts: 838
Joined: Sep 14, 2014
Location: Southampton, UK

Re: Charge at the cheaper rates

Worked perfectly! :D

Posted on
Mon Nov 23, 2020 6:35 am
neilk offline
Posts: 392
Joined: Jul 13, 2015
Location: Reading, UK

Re: Charge at the cheaper rates

Thanks for letting me know. You will see a few anomalies around the states (not showing as expired later in the day, under calling the number of hours delivered). I will keep testing and reviewing my logs as I am not 100% sure yet (but my logging got messed up on my test machine).

On the Solcast would a daily forecast of energy generation during daylight be enough ? You would put in your site details and I would then aggregate the forecasts it gives in 30 min slots to give you a daily forecast and the. 10percentile and 90percentile ranges.

That would be pretty simple and it would refresh on an action you scheduled.

Will keep you posted.

Posted on
Tue Nov 24, 2020 4:18 pm
neilk offline
Posts: 392
Joined: Jul 13, 2015
Location: Reading, UK

Re: Charge at the cheaper rates

Pete,
I have created a very simple PV Solar Forecast plugin that I think will do what you need.

https://github.com/neilkplugins/Solcast-indigo-plugin

This is a very basic Indigo plugin that collects forecast solar generation data from http://www.solcast.au for a predefined rooftop solar generation array and it return the total forecast energy generation for that site tomorrow.

This version has very limited functionality and has no configuration validation etc.

Usage:

Create an account on http://www.solcast.com which is free for private residential solar generation sites (rooftop sites)

Add your rooftop site providing the location (lat/long) and the details about the array (direction, roof pitch, etc)

This will generate a resource_ID for your location, and you will also need your API key (from the account settings)

In the plugin:

Create a Solcast device, type "PV Solar Generation Forecast"

In the device settings, add the Resource_ID for your site and your API Key (in this version these are not validated or tested so paste carefully)

The device does not automatically update other than to "expire" the forecast when it is out of date as a free Solcast account has a very limited number of daily API calls (20 per day)

To refresh the device with the forecast for tomorrow you need to create an action group to run the action "Refresh Solar PV Forecast (Solcast Controls)"

This will make the API call and aggegrate the forecast for tomorrow and populate the device state with the total solar_forecast energy for the day in kW

It does the same for the solar_forecast10 and solar_forecast90 device states that are daily totals for the 10th and 90th percentile forecasts. See the solcast site for more details

You can download the initial version https://github.com/neilkplugins/Solcast-indigo-plugin/releases/tag/0.0.1-Aplha

Let me know what you think and if it is workable.

I will do so more polish on the charge sensor functionality over the weekend, it functions now but the way it reports the future states could be improved and some anomalies I will sort.
Neil

Who is online

Users browsing this forum: No registered users and 3 guests