-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add storedge control #38
Add storedge control #38
Conversation
814252f
to
7e56eaf
Compare
Great work, I have merged this into my branch and it is working well. Another thing I have been playing with is export limit. I am running an automation so if the wholesale price goes negative from my retailer (amber electric, Australia). I can export limit to 0, now that you have done the hard work puttin this in place it wouldn't take much more to add this control in. |
@nerfherder sure, that should be possible - now that we have the "number" class defined, it should be easy to add the additional registers. Specifically which registers do you need? I could add another commit to add them. |
@mpredfearn Thanks for this one. Mayb better to remove the stubs now entirely to eliminate future discussion about them being useless in deployment :) I only have a single inverter at home, so will start with pulling this one in. Do you have feedback on the usage of pymodbusTCP.client iso pymodbus.client as proposed in #39 ? |
@mpredfearn The export limit control is defined on pages 15 and 16 of https://www.photovoltaikforum.com/core/attachment/88445-power-control-open-protocol-for-solaredge-inverters-pdf/. There are a few intialisation steps described there which I did manually with the mtcp app on iphone. After that is done you can set export limits by writing to E002/F702 with a Float32 value. |
@binsentsu sure, I will adapt my PR to drop the stubs. |
7e56eaf
to
a2d1950
Compare
The stub functions were used for testing without hardware, but are unnecessary. Drop them.
a2d1950
to
2fee4e2
Compare
@nerfherder Thanks for the details. If it's OK with you I'd like to try to get this support merged first, then I will add a commit later to add support for the export control block. |
@mpredfearn yeah no worries, let's do it as a seperate one |
Add support for reading the modbus registers relating to batteries 1&2 attached to the inverter. Add flags to the configuration flow. Translations are from Google translate. The battery 1&2 charged / discharged sensors can be used for Home Assistants energy monitor.
Extend the integration to create number & select entities for the Storedge control registers. Through these registers one can control the battery charge / discharge profile.
2fee4e2
to
b6b42f5
Compare
Just a couple of minor fixups. Ready for review and hopefully merge 🤞 |
The control stuff is a pretty extensive addition, someone better at Python than me might have to figure out how to make that work with a multiple inverter system. I can work with Python out of necessity because I'm forced to with homeassistant, but I don't work in it otherwise. Battery status looks easy enough to port to multiple inverters. |
@mpredfearn Looks good to me. Nice effort! Is there any modbus documentation reference we could add in the readme for battery stuff? The one I referenced from SolarEdge doesn't say a word about batteries :) |
Power Control Open Protocol for SolarEdge Inverters.pdf @binsentsu I found it on the photovoltaikforum website, it isn't hosted on the solaredge website - they ask you to contact support to get a hold of it. |
@binsentsu I Used the doc that @nerfherder pointed me to (above) as reference for the implementation. Agreed it would be nice to add some stuff about batteries, and also control of the storedge interface into the Readme. Is that something you want me to add to this PR? |
@mpredfearn if it's possible, that would be great. Together with a link to above pdf. |
@binsentsu done :-) |
Add some stuff about changing battery modes to the readme, and a pointer to the document describing the MODBUS registers that are used to implement Storedge control and battery status monitoring.
c5eb178
to
86eb975
Compare
Thanks! |
This PR implements #36 - creating Number and Select entities to allow the user to change the battery charge / discharge profiles. These can be changed via the UI or automation, depending upon individual requirements.
This builds upon my changes to monitor the battery status in #35.