StephanJoubert / home_assistant_solarman

Home Assistant component for Solarman collectors used with a variety of inverters.
Apache License 2.0
510 stars 190 forks source link

KSTAR: Reorganise registers into blocks of 125 #393

Closed frsantos closed 10 months ago

frsantos commented 10 months ago

The new 1.5 version of the integration uses the pysolarman library which is stricter with the protocol. In this case, we were requesting more than 125 registers at a time, so it failed on the new update. So we need to restructure the requests to only request a max of 125 registers.

oxynatOr commented 10 months ago

well, that is good to know.

thanks you for the heads up!

Jay66Bee commented 10 months ago

Thanks for your work.

So you've created a new config file that will work with the new integration or is this still a work in progress?

frsantos commented 10 months ago

I just updated a bit the one we had to properly conform to the modbus protocols l. It works for me currently as before the update.

El sáb, 9 sept 2023 16:07, Jay Bee @.***> escribió:

Thanks for your work.

So you've created a new config file that will work with the new integration or is this still a work in progress?

— Reply to this email directly, view it on GitHub https://github.com/StephanJoubert/home_assistant_solarman/pull/393#issuecomment-1712520075, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABPWJDW3HDN7MOWLGZQ47LXZRZY7ANCNFSM6AAAAAA4QNWRNI . You are receiving this because you authored the thread.Message ID: @.***>

Jay66Bee commented 7 months ago

The new 1.5.1 does not work on my KStar...

After numerous reboots, it now works.

Nice work. Thanks.

Jay66Bee commented 1 month ago

Can there be an update to include inverter time in the definitions?

I'd like to keep track for when the inverter time is out of sync so that I can update it.

I have automations that are dependent on exact timings.

Thanks.

frsantos commented 1 month ago

Could be.

I think the inverter time is stored in the registers 3239 to 3244, but the doc says it's stored in BCD code (??). That means each part of the date/time is stored in a a different register, so a helper template would also be needed to merge all those numbers back into a date/time. That helper can't be included in the definition file.

image

Jay66Bee commented 1 month ago

I remember converting it to 24hr time when I used pysolarmanv5 to query the inverter before using the solarman integration. I just don't want to make a mess of the KStar definition now that it's in blocks of 125, which I don't really understand.

bumlard commented 1 month ago

Do you guys know how to WRITE values to the Kstar, specifically I'd love to be able set it to charge with different current values or not do anything at all. My hardware hack was using External relays and contactors but would much prefer to just control the inverter directly, I can do this from the solarman website but I cant user HA automations with the website which is why I have the separate contactors and relays. I was hoping there would be some enitities where I could enter values in or some sliders and toggles for the different modes etc.

Jay66Bee commented 1 month ago

Do you guys know how to WRITE values to the Kstar, specifically I'd love to be able set it to charge with different current values or not do anything at all. My hardware hack was using External relays and contactors but would much prefer to just control the inverter directly, I can do this from the solarman website but I cant user HA automations with the website which is why I have the separate contactors and relays. I was hoping there would be some enitities where I could enter values in or some sliders and toggles for the different modes etc.

You need the Solarman 1.5.1 integration to write to the inverter. That integration does not work for me so I have no experience of it as I still use 1.4.3

You can use pysolarmanv5 with a Python wrapper and write your own routines. I have not attempted that yet so I wouldn't know how to help you. Maybe someone else can on the pysolarmanv5 GitHub page.