Merged
Conversation
The Solis support was created based on Fox ESS. It looks like the creator missed to adjust the modbus address for SOC, it's 33139 based on a register map I got from solis support. Total discharge energy is also in kWh, not 1/10kWh units.
Every modbus query fails, as all registers need to be read as input registers (code 0x04), instead of holding register.
right now I get the following error: UnboundLocalError: local variable 'power' referenced before assignment Fix it by moving some code around.
Merged
ndrsnhs
reviewed
Nov 6, 2024
Comment on lines
+25
to
+34
| powerreg = 33057 | ||
| exportedreg = 33029 | ||
|
|
||
| if self.version == SolisVersion.inverter: | ||
| power = client.read_holding_registers(3004, ModbusDataType.UINT_32, unit=unit) * -1 | ||
| # Unit 1kWh | ||
| exported = client.read_holding_registers(3008, ModbusDataType.UINT_32, unit=unit) * 1000 | ||
| elif self.version == SolisVersion.hybrid: | ||
| power = client.read_holding_registers(33057, ModbusDataType.UINT_32, unit=unit) * -1 | ||
| # Unit 1kWh | ||
| exported = client.read_holding_registers(33029, ModbusDataType.UINT_32, unit=unit) * 1000 | ||
| powerreg = 3004 | ||
| exportedreg = 3008 | ||
|
|
||
| power = client.read_input_registers(powerreg, ModbusDataType.UINT_32, unit=unit) * -1 | ||
| # Unit 1kWh | ||
| exported = client.read_input_registers(exportedreg, ModbusDataType.UINT_32, unit=unit) * 1000 |
Contributor
There was a problem hiding this comment.
Macht das gleiche ist aber konsistent zu anderen Modulen
if self.version == SolisVersion.inverter:
power = client.read_input_registers(3004, ModbusDataType.UINT_32, unit=unit) * -1
exported = client.read_input_registers(3008, ModbusDataType.UINT_32, unit=unit) * 1000
elif self.version == SolisVersion.hybrid:
power = client.read_input_registers(33057, ModbusDataType.UINT_32, unit=unit) * -1
exported = client.read_input_registers(33029, ModbusDataType.UINT_32, unit=unit) * 1000
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.
Ich habe das Solis-Modul solange verändert, bis es mit meinem Hybrid-Wechselrichter läuft. Siehe Fehlerreport: https://forum.openwb.de/viewtopic.php?p=118743#p118743
Wahrscheinlich brauchen wir auch #1989