Closed peter1rhodes closed 1 month ago
It may be useful context that this GivEnergy hybrid inverter does not have any batteries attached (I have a separate AIO)
I believe the problem is in read.py
, line 871:
elif GEInv.battery_percent == 0 and 'multi_output_old' in locals(): # line 870
power_output['SOC'] = multi_output_old['Power']['Power']['SOC'] # line 871
However, under some circumstances, multi_output_old
is instantiated as a list (if not regCacheStack on lines 718-722), meaning this string index will give the error shown. My guess is that this section is written with the assumption that a hybrid inverter will always have a battery connected, so a state of 0 soc indicates some other issue or state? But in reality, this may not be the case.
I don't know where the code lives for this now, as the versions I found in both this repository (ha_addons
) and your other repository GivTCP
don't have these updates. Instead, I had to pull the docker image this repo refers to and rip the code out of that to inspect
Thanks, the code is under the dev3 branch of the main repo (problems pushing it to main).
I think that the challenge is that in a scenario where there is an empty cache (multi_output_old=[] ), which should only be at startup, and the SOC is reported as Zero (usually an error, but in your scenario is valid as no batteries), GivTCP is still looking for the SOC value. I've tweaked code for this and will push in the next point release.
out now in beta 3.0.1, can you test?
Lovely, will do, thank you
@britkat1980 Yes, this seems to be working perfectly! I have comms back with my hybrid inverter, and can't see any errors in the log. Thank you very much
I've just upgraded to v3.0.0 from v2.4.9, and it is working well, except for my GivEnergy solar inverter, which is not being read correctly, and is giving constant errors in the GivTCP logs: