CJNE / pymyenergi

An async python library for interfacing with MyEnergi devices
MIT License
19 stars 14 forks source link

Improvement: Libbi overnight SoC targets #8

Open salewis38 opened 11 months ago

salewis38 commented 11 months ago

I've written some routines for GivEnergy batteries to set overnight SoC targets based on daily usage and Solcast forecasts. I'd be happy to share for use with the Libbi if there's any interest. www.github.com/salewis38/palm

CJNE commented 10 months ago

Looks very nice :) This library is mainly focused on communicating with the myenergi API and to be used by other projects, such as yours, so i think what you have done for GivEnergy is a bit out of the scope for this project. If you had anything specific in mind, feature requests are always welcome!

reedy commented 10 months ago

Maybe more in scope for the HA add on project (whether it's own, or in the myenergi one, or cross communication between them..), but this is something I have an interest in too...

I don't have a Libbi, but I do have a Zappi and an Eddi...

And then a Sunsynk based PV and battery system.

How much should I charge each overnight (Octopus Go)? Should I? Is there likely to be enough sun tomorrow, so minimal to nothing is actually needed?

AIUI there's only a couple of inverter manufacturers that provide this sort of prediction.

While the SEG rates are going up (yay), using it, rather getting less than I'd buy the unit for (at any time) would seem like a worthwhile goal.

Something to do in my infinite free time... maybe.

Will have a look properly at the code!

salewis38 commented 10 months ago

Hi Sam,

Happy for you to adapt for Sunsynk if you wish, it should just be the inverter API calls that are different. Either within or outside of HA (HA has a lot of bloat for what boils down to doing some sums and writing a single integer to an API once a day and the whole HA installation & configuration process can put people off).

Cheers

Steve

On Wed, 13 Sept 2023 at 12:30, Sam Reed @.***> wrote:

Maybe more in scope for the HA add on project (whether it's own, or in the myenergi one, or cross communication between them..), but this is something I have an interest in too...

I don't have a Libbi, but I do have a Zappi and an Eddi...

And then a Sunsynk based PV and battery system.

How much should I charge each overnight (Octopus Go)? Should I? Is there likely to be enough sun tomorrow, so minimal to nothing is actually needed?

AIUI there's only a couple of inverter manufacturers that provide this sort of prediction.

While the SEG rates are going up (yay), using it, rather getting less than I'd buy the unit for (at any time) would seem like a worthwhile goal.

Something to do in my infinite free time... maybe.

Will have a look properly at the code!

— Reply to this email directly, view it on GitHub https://github.com/CJNE/pymyenergi/issues/8#issuecomment-1717450160, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALAPCY34N75ITLFMWQUYIILX2GKOFANCNFSM6AAAAAA3RRXEJI . You are receiving this because you authored the thread.Message ID: @.***>

reedy commented 10 months ago

Would be interested in it for the Zappi and Eddi too!

I know this is getting slightly off topic..

https://github.com/kellerza/sunsynk is what I use for it with HA.

For "write actions" it does say

DISCLAIMER: Use at your own risk! Especially when writing any settings.

HA is possibly excessive indeed for just this, but if you've got something around already... it maybe makes some sense, rather than a script running somewhere on a machine you might've forgotten about :)

Plus, I have the inverter plugged into HA with a USB to RS 485 adapter... with respect to the api stuff above, I'd either need to find a way to "share" that, or expose some sort of api of the add on from HA too..

Possibly/probably doable with a modbus gateway; I do have one I got for experimenting, but haven't put it into use just yet.

🐢

There seems to be a few library's for accessing their "cloud" API and some via the dongle locally too.

Such as https://pypi.org/project/sunsynkloggerapi/ too, but the source code links are broken (obviously can get it from pypi too)

Need to have a play...

Most of the "monitoring" I'm doing at/for home is in HA in one way or another.

Could be worth you bringing it up over in that repo too, see if they're amenable to that sort of functionality; especially if write is useable etc.

Other stuff for me to look at too...

https://github.com/MorneSaunders360/Solar-Sunsynk

https://github.com/MorneSaunders360/Solar-Sunsynk

salewis38 commented 10 months ago

GivEnergy inverters store no usage history locally, only instantaneous values which can be accessed locally over Modbus; however, there's API access to their server for both historical data and control/status.

For simplicity, the standalone versions of PALM only access the API for historical consumption data, status monitoring (% SoC in particular) and control. The HA version still sources all of its data using the API but writes the target SoC directly to the inverter (because that's how the GivEnergy add-ons for HA work). As an alternative, it could pull historical data from HA if it existed locally.

Minimum inverter data needs to set overnight charge:

A few extras:

On Wed, 13 Sept 2023 at 18:22, Sam Reed @.***> wrote:

Would be interested in it for the Zappi and Eddi too!

I know this is getting slightly off topic..

https://github.com/kellerza/sunsynk is what I use for it with HA.

For "write actions" it does say

DISCLAIMER: Use at your own risk! Especially when writing any settings.

HA is possibly excessive indeed for just this, but if you've got something around already... it maybe makes some sense, rather than a script running somewhere on a machine you might've forgotten about :)

Plus, I have the inverter plugged into HA with a USB to RS 485 adapter... with respect to the api stuff above, I'd either need to find a way to "share" that, or expose some sort of api of the add on from HA too..

Possibly/probably doable with a modbus gateway; I do have one I got for experimenting, but haven't put it into use just yet.

🐢

There seems to be a few library's for accessing their "cloud" API and some via the dongle locally too.

Such as https://pypi.org/project/sunsynkloggerapi/ too, but the source code links are broken (obviously can get it from pypi too)

Need to have a play...

Most of the "monitoring" I'm doing at/for home is in HA in one way or another.

Could be worth you bringing it up over in that repo too, see if they're amenable to that sort of functionality; especially if write is useable etc.

Other stuff for me to look at too...

https://github.com/MorneSaunders360/Solar-Sunsynk

https://github.com/MorneSaunders360/Solar-Sunsynk

— Reply to this email directly, view it on GitHub https://github.com/CJNE/pymyenergi/issues/8#issuecomment-1718028509, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALAPCY4RIKH3YOZFJXGVU5LX2HTU5ANCNFSM6AAAAAA3RRXEJI . You are receiving this because you authored the thread.Message ID: @.***>