fboundy / pv_opt

Home Assistant PV Optimisation for Solis Inverters
MIT License
24 stars 5 forks source link

Tariff Alignment with Octopus Integration #124

Closed solarjones closed 7 months ago

solarjones commented 8 months ago

VERSION = "3.8.5"

This morning I checked up on the automation and found the charing plan appearing to be stuck in the past and wanting to change at a more expensive rate. Also noticed its start SOC wasn't correct (much lower than the actual battery SOC). This would explain why to wanted to charge when it wasn't necessary. (10:47 time stamp) I tried toggling to ReadOnly and live mode but it didn't seem to make any new calculations. Then tried switching from predicted load to the new profile load modes. No change. Then I restarted AppDaemon which seem to do the trick.

Not sure if these logs contain enough, I can always switch debug=true if needed.

pv_opt.log main.log error.log

Thanks for all your work in the recent days. I could hardly keep up with the fixes and versions that came out, brilliant stuff.

Regards

fboundy commented 8 months ago

I initially though this was something else but looking at your error log it was caused by an empty list. Should be fixed with 3.8.7

solarjones commented 8 months ago

Got some errors on startup now...

pv_opt.log main.log error.log

fboundy commented 8 months ago

Did these persist? I think there may have been some issues with the Octopus API last night. On 14 Feb 2024 at 22:54 +0000, solarjones @.***>, wrote:

Got some errors on startup now... pv_opt.log main.log error.log — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

solarjones commented 8 months ago

Yes, still not working this morning. error.log pv_opt.log main.log

Anything I can do?

Octopus integration looks ok to me.

image
fboundy commented 8 months ago

Hmmm - it’s reporting an error 602 from the octopus API query. Unfortunately I’ve no idea what this means! I’ll add some additional logging and get something out later today. On 15 Feb 2024 at 08:49 +0000, solarjones @.***>, wrote:

Yes, still not working this morning. error.log pv_opt.log main.log Anything I can do? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

fboundy commented 8 months ago

Definitely some weird stuff going on with the Octopus API this evening On 15 Feb 2024 at 08:49 +0000, solarjones @.***>, wrote:

Yes, still not working this morning. error.log pv_opt.log main.log Anything I can do? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

fboundy commented 8 months ago

There are some issues around OE tariff changes. Try restarting HA and AppDaemon. On 15 Feb 2024 at 08:49 +0000, solarjones @.***>, wrote:

Yes, still not working this morning. error.log pv_opt.log main.log Anything I can do? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

solarjones commented 8 months ago

There are some issues around OE tariff changes. Try restarting HA and AppDaemon.

No change after several HA & AppDaemon restarts.

SzosszeNET commented 8 months ago

@solarjones as usual butting in. Can't see your tariff mentioned in your pv_opt log. Assume you have the octopus energy integration, can you check if the integration mentions what's your tariff? Can you check if the entities are written? In your pv_opt config I assume you have your tariff baked in and not your octopus API deeds?

If the integration doesn't write the data (see attached image. Disable it. Wait a little. Re-enable. Check pv_opt and the sensors. Just discovered this, however my charge was working by the looks of it.

Screenshot_20240215-202916 Screenshot_20240215-214053

solarjones commented 8 months ago

The PV_OPT config I've left as default so not changed it.

I am using Octopus integration in HA

image

It doesn't mention my tariff from what I can see. Where would I find this in HA?

And this was from a previous PV_OPT log when things were working:

22:10:00 INFO: Checking tariffs: 22:10:00 INFO: ----------------- 22:10:00 INFO: Import: E-1R-AGILE-FLEX-22-11-25-A Start: 2024-02-04 13:00:00+0000 End: 2024-02-14 23:00:00+0000 22:10:00 INFO: Export: E-1R-OUTGOING-FIX-12M-19-05-13-A Start: 2019-05-15 23:00:00+0000 End: N/A 22:10:00 INFO: 22:10:00 INFO: AGILE tariff detected. Rates will update at 16:00 daily 22:10:00 INFO: - Tariffs OK

Just noticed the Tariff end date above was yesterday?! Even though I'm still on Agile, its not ended as per my OE account:

image

Thanks for any other suggestions.

solarjones commented 8 months ago
image image
SzosszeNET commented 8 months ago

Ah, so assume you restarted HA at 8 in the morning and that kicked back your integration into life.

I have the octopus API in my PV_OPT config, not sure now I said it does anything as it also looks at and finds the OE integration sensors. Guess would not hurt trying to add it? And removing if doesn't do anything.

octopus_account: !secret octopus_account octopus_api_key: !secret octopus_api_key

Yes agile "ended" yesterday inline with the email octopus sent out about a month ago. Screenshot_20240215-204437

solarjones commented 8 months ago

As suggested, I added in Octopus API & Account, restarted HA and AppDaemon.

At first I got some errors, then it started working...

solarjones commented 8 months ago

pv_opt.log main.log error.log

SzosszeNET commented 8 months ago

Magic 🤣

SzosszeNET commented 8 months ago

But looks like it struggled to load consumption data?

fboundy commented 8 months ago

OK - so it was detecting two octopus import entities - probably because of the changes to the Agile tariff and defaulted to the 1st one which I suspect is empty. I've added some logging which should confirm this if you can send me the pv_opt.log.

The issue with consumption seems to have been just the once. I've added a check that the history.

Hopefully 3.8.3 addresses both.

solarjones commented 8 months ago

v 3.8.8 installed. pv_opt.log Note, the MPAN was in plain text and not obfuscated.

solarjones commented 8 months ago

Noticed this too:

image
fboundy commented 8 months ago

OK - think I understand now on the tariff_code. The attribute doesn't exist for the old entity. Hence the error.

Fixed in 3.8.9

MPAN redaction should also be fixed.

solarjones commented 8 months ago

Installed 3.8.9

MPAN redaction working thanks. pv_opt.log

image

Do I need this in the config still? octopus_account: !secret octopus_account octopus_api_key: !secret octopus_api_key

Thanks.

SzosszeNET commented 8 months ago

It was just a hunch from me, feel free to remove.

fboundy commented 8 months ago

Looks like you do for now. There’s another tweak I need to make. On 16 Feb 2024 at 17:52 +0000, SzosszeNET @.***>, wrote:

It was just a hunch from me, feel free to remove. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

SzosszeNET commented 8 months ago

Looks like they is an OA integration update out addressing this issue

solarjones commented 8 months ago

Is this expected behaviour? My SOC will be depleted well before its next planned charge slot.

image image

And there are cheaper slots prior to 03:00.

image

Thanks

solarjones commented 8 months ago

I restarted AppDaemon and it stuck on Loading Tariffs. I then disabled the OE integration and reenabled, restarted AppDaemon, and it fired up just fine with the new charging plan.

image

Thanks.

spetrie13 commented 7 months ago

My charge plan is also not updating. It would appear that this is due to the tariff prices not being pulled from the Octopus API. The future price seems to be updated around 10:30 GMT in API but pv_opt does not seem to load the information. If I restart the App Demon then charge plan updates again. V3.8.8 Pre AppDemon restart: image image image

error.log main.log pv_opt.log

Post AppDemon restart image image

main (1).log pv_opt (1).log

solarjones commented 7 months ago

There was a new release of Octopus Energy integration this morning. I downloaded it, restarted HA + AppDaemon. It appears to be working for the time being. Will see if it auto updates at 16:00 this afternoon.

fboundy commented 7 months ago

Ok that’s interesting. I have been busy since Saturday morning so not had a chance to look at anything yet On 19 Feb 2024 at 13:11 +0000, solarjones @.***>, wrote:

There was a new release of Octopus Energy integration this morning. I downloaded it, restarted HA + AppDaemon. It appears to be working for the time being. Will see if it auto updates at 16:00 this afternoon. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

fboundy commented 7 months ago

I think I have found the source of these bugs and fixed in 3.8.10.

fboundy commented 7 months ago

Closing this as #132 supersedes it

spetrie13 commented 7 months ago

Still not working for me with latest revision 3.8.10. On OE Go tarrif. Optimises if I restart AppDemon. Tried modification the load margin and toggle read to see if it would update, but no joy.

On Mon, 19 Feb 2024, 19:16 fboundy, @.***> wrote:

I think I have found the source of these bugs and fixed in 3.8.10.

— Reply to this email directly, view it on GitHub https://github.com/fboundy/pv_opt/issues/124#issuecomment-1953045405, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYRF453RC4HYNTQDHYECG7TYUOQJRAVCNFSM6AAAAABDI7T4DSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJTGA2DKNBQGU . You are receiving this because you commented.Message ID: @.***>

fboundy commented 7 months ago

Can you please provide the logs and then I can try to work our what it's doing?

spetrie13 commented 7 months ago

Will have to download logs when I get home tomorrow. Can’t remotely download the logs. Will apply the 3.9.0 update tonight.

On Fri, 23 Feb 2024, 17:08 fboundy, @.***> wrote:

Can you please provide the logs and then I can try to work our what it's doing?

— Reply to this email directly, view it on GitHub https://github.com/fboundy/pv_opt/issues/124#issuecomment-1961692910, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYRF455AA33T35NK4SDNJD3YVDEKBAVCNFSM6AAAAABDI7T4DSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRRGY4TEOJRGA . You are receiving this because you commented.Message ID: @.***>

fboundy commented 7 months ago

3.9.2 now which fixes a few more bugs - mainly if you don't have export

spetrie13 commented 7 months ago

Seems to be loading the tariff info today with V3.9.0 and providing an optimised charge schedule.

Do you still want the logs? Back home now

On Fri, 23 Feb 2024, 19:31 Stuart Petrie, @.***> wrote:

Will have to download logs when I get home tomorrow. Can’t remotely download the logs. Will apply the 3.9.0 update tonight.

On Fri, 23 Feb 2024, 17:08 fboundy, @.***> wrote:

Can you please provide the logs and then I can try to work our what it's doing?

— Reply to this email directly, view it on GitHub https://github.com/fboundy/pv_opt/issues/124#issuecomment-1961692910, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYRF455AA33T35NK4SDNJD3YVDEKBAVCNFSM6AAAAABDI7T4DSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRRGY4TEOJRGA . You are receiving this because you commented.Message ID: @.***>

fboundy commented 7 months ago

No need if it all seems ok On 26 Feb 2024 at 11:40 +0000, spetrie13 @.***>, wrote:

Seems to be loading the tariff info today with V3.9.0 and providing an optimised charge schedule.

Do you still want the logs? Back home now

On Fri, 23 Feb 2024, 19:31 Stuart Petrie, @.***> wrote:

Will have to download logs when I get home tomorrow. Can’t remotely download the logs. Will apply the 3.9.0 update tonight.

On Fri, 23 Feb 2024, 17:08 fboundy, @.***> wrote:

Can you please provide the logs and then I can try to work our what it's doing?

— Reply to this email directly, view it on GitHub https://github.com/fboundy/pv_opt/issues/124#issuecomment-1961692910, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYRF455AA33T35NK4SDNJD3YVDEKBAVCNFSM6AAAAABDI7T4DSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRRGY4TEOJRGA . You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>