Repository navigation
Add SOFAR 4KTLM-G3 single-phase inverter profile - #802
Open
davisouzatb wants to merge 1 commit into
Open
davisouzatb wants to merge 1 commit into
davisouzatb wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The SOFAR 4KTLM-G3 is a single-phase, non-hybrid inverter with two MPPT inputs. The legacy
sofar_lsw3.yamlregister map yields incorrect readings on this model, and the hybrid G3 profile requests battery/off-grid registers that are not appropriate for it.Add a dedicated
sofar_4ktlm-g3.yamlprofile with the G3 addresses and scales for PV1/PV2, single-phase AC output, generation counters, inverter status, temperatures and raw fault bitfields. It reads the complete aligned ranges0x0400–0x042E,0x0480–0x04AF,0x0580–0x0589and0x0680–0x069B; reads starting inside those blocks returned non-standard error frames with invalid Modbus CRC on the tested logger. Zero fault bitfields map to “No error”, while nonzero values remain raw rather than using the legacy fault descriptions. The profile is automatically included in the existing config-flow lookup list and is documented in the README.Validation:
LSW3_15_270A_1.68, Solarman V5, Modbus slave 1 and FC03. All four aligned blocks returned CRC-valid data, with plausible PV/output power, approximately 220 V / 60 Hz, generation counters and temperatures. Hardware checks were read-only.ParameterParser: request ranges/register coverage, two-MPPT/single-phase decoding, 32-bit energy word order, G3 status/fault interpretation and config-flow discoverability. Fixtures are synthetic and contain no device identifiers or household telemetry.git diff --checkpasses.Run the tests with
python -m unittest discover -s tests -vafter installing PyYAML.Other KTLM-G3 models have not been hardware-tested with this profile. This PR does not change global polling/reconnection behavior or claim to eliminate all logger timeouts. Related register-map reports: #25 and davidrapan/ha-solarman#730.