-
Notifications
You must be signed in to change notification settings - Fork 53
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
Total yield in two registers? #76
Comments
I think it's already covered using this post processing method Line 21 in ad975ae
|
Ah - sorry I hadn't seen that - thanks for flagging for me. The choice of name ("reset") doesn't really reflect the way I was thinking about it (just encoding a 32 bit val over 2 16bit words). Those functions are only used in inverters I haven't just for my cribbing... I implemented a solution already yesterday (rupertnash@21a2d19) If project leads want to keep using the existing code, that's cool otherwise I could also adapt |
I think the If there has been 1 reset/overflow of the least significant word, and the sensor LSW is zero, then the result should be 65,536. (Unless the inverter is doing something weird with its encoding of data, which is always possible...) |
…r off-by-one error
Can anyone with an inverter that's been running long enough please confirm this by checking against the SolaX cloud view? |
You are totally right. I have one with 8 "resets" there is an offset of 8 between cloud and this lib! I vote in favor of your solution. |
Great- thanks for checking. I’ve made a PR (#77) which includes this feature. Feel free to separate that out and merge separately (if you have the permission lol) |
btw.
|
OK - updated #77 with a fix and unit test |
…r off-by-one error
* Per issue #76, combine multiple register values * #76: replace resets with proposed combiner and fix tests for off-by-one error * fix off-by-one in to_signed and add test for it * Add missing requirement async-timeout and silence warning in it's use * Add timeout for connections since on most recent pocket wifi post hangs * add support for X1 Hybrid G4 * ensure inverters raise if they get an error response from endpoint * add testing for X1 Hybrid G4 * Satisfy cov for new inverter code * remove (unused) bare index from ResponseDecoderType and assoicated code * transpose ResponseDecoderType * Update type annotations for multi-register indices * pin async_timeout version * protocol to define bit packer * appease linter * remove timeout() from this PR * fix ha interface via sensor_map Co-authored-by: Robin Wohlers-Reichel <robin.wohlersreichel@gmail.com>
This was fixed in #77, right? |
While looking at #75, I realised that if the data we're getting from the inverter is basically the same as the MODBUS data, then each datum is a 16 bit register value. Since the energy yield is in units of 0.1 kWh, that means the max yield it can respond with is 6,553.5 kWh - for my system that's probably about 1 year's generation
So - my question is: is the yield actually split over 2 data items? I see that the next item in the data array is currently zero for me. Similarly for the total feed-in energy and total consumption.
I just looked in the code of the Solax MODBUS thing (https://github.com/wills106/homeassistant-solax-modbus/blob/784153e6a0039402335026281ddca9aadc532a67/custom_components/solax_modbus/__init__.py#L802) and they clearly believe this to be the case.
If this is the case, then we will need to alter the response -> data code to cope with values that come from multiple registers.
The text was updated successfully, but these errors were encountered: