-
Notifications
You must be signed in to change notification settings - Fork 21
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 KH version 1.33 (thanks to @ocl80) #740
Conversation
Thanks @canton7 - for spotting I had failed to revert my earlier (crude) fix which included changing the pv current scale factor. |
This is awesome, thank you both :-) Any chance of getting the BMS cell low temp into KH133, if it isn't already? It seems to work when I read register 37618. I think that'd allow predbat to use the temperature charge curve functionality on the KH (although right now it still seems to be a bit buggy on the predbat side). |
@ocl80 Thank you, and thanks for polishing the KH support! Yep, the snapshot tests came into their own there. @WyndStryke That's #735 right? That needs a little update to support the version-selector stuff I got in today. I'll take a look on Sunday unless @FozzieUK gets there first. |
Ah looks like the registers are the same, so yes (I had assumed they'd be different). I'll go through and test each of them to confirm. This is on an EC4300-H4 (usable capacity 15kWh) and a KH7, manager 1.37, master 1.41, slave 1.01.
So the last two don't seem to be populated. Could 'FCC Capacity' be related to 'Number of full equivalent charge-discharge cycles' in the fox app? I didn't get anything from the last 2, but the others look plausible. A few other random observations while I was poking around with registers:
--- Edit: 49203 (work mode) does not update when force charging is active, it stays at 1 (I was expecting 6 for force-charge). Interestingly the Fox app also shows self-use despite also showing the battery being charged from grid (via the mode scheduler). So I'm not sure what's going on there, maybe a firmware bug reporting the wrong workmode, or perhaps it's actually a write-only field? Is there another way to retrieve the workmode? |
I believe I came across the force charge issue, the reason for it and a solution here #661 |
Just ploughing through that thread, thank you :-) It's going to take a while because it's a bit beyond my current knowledge. I had seen it a while ago, but I had assumed it just related to parallel setups and ignored it. Regarding
I seem to be able to read registers such as 49222, 49079 OK (KH > 1.33) Regarding reading the current work mode via 49203, I guess that firstly the mode scheduler doesn't use that mechanism, and instead uses remote control? So presumably I'd need to read the 44xxx registers instead to see if the inverter had remote control turned on, and what it had been asked to do? Right now, with self-use active, they read:
Which does actually correspond with the final force charge segment in my schedule (6:45-6:59, 10% min soc, 80% max soc) which is basically there just to hold the charge steady in case of time drift. I don't have any force discharges configured because I don't have an export MPAN / MCS yet (still in the paperwork stage). |
Ok thanks, those bms temp and cell registers are all working as per the latest modbus spec - I'll look at modifying my PR for the G2 and add KH BMS support.
These don't seem to be populated yet in any tests we've done, it appears to be future development scope.
You won't see the inverters work mode register change when you force charge (or discharge) - these modes are created internally by the integration using the remote power registers (the inverter work mode is unchanged and will be in whatever work mode it was left in) If you want to know the integration work mode you will have to test the state of |
I'm not yet at the stage of controlling the inverter yet, currently I'm still figuring things out, getting everything ready, and predbat is in read-only mode, storing the load data. Once I'm allowed to export, then I'll be looking to enable the control side of things (hopefully soon, the MCS came through today so I've just requested the MPAN). The force-charge I mentioned earlier was commanded by the Fox app, not the integration. Originally I thought that the inverter's work mode status would pick it up. But the app is using the remote control registers too, hence presumably to know what the inverter is doing while the app is controlling it, I'd need to be watching those registers. However, given that the plan is for predbat to be doing the work once export is enabled, that's not actually what I should be focussing on. It's force charging and discharging via Will's automations that will be needed, and also I need to figure out how to wire that into predbat. |
This PR is going to be closed shortly. Please don't use it for general conversation: that will be lost. I suggest an issue / discussion instead! |
Hi @ocl80,
Thanks for carrying the torch on the KH v1.33 while I got version selection sorted out.
I've done a squash-merge of your fork into this MR (with you as the author), then a couple of fixup commits on top to avoid breaking other inverter types. I hope that's OK. Can you just check that it looks sensible please?
Thanks!