I've broken ModbusTCP

OK - dummy alert.

I ran an update yesterday to try and update the heat pump app. But this managed to break the ModbusTCP I was using to read SolarEdge. Searching here I found I likely needed to update the image (was Previously on 2017 image) - so I got myself a new SD card, followed the instructions and I’ve managed to get it going. I tried to restore the data from the original SD but I get an error about wrong number of partitions.

Deep sigh later and I’ve tried to set it all up from scratch. It’s taken a good bit of fiddling but at least I’m now reading the temp sensors and CTs etc.

Next item on the list is the solar edge. I re-inserted the config into emonhub (which thankfully I’d saved!!) but its generating this error in the log…

2023-11-14 20:14:02,990 INFO     ModbusTCP  Opening modbusTCP connection: 1502 @ 192.168.68.56
2023-11-14 20:14:02,992 WARNING  ModbusTCP  Exception caught in ModbusTCP thread. Traceback (most recent call last):
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 31, in wrapper
    return func(*args)
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 103, in run
    rxc = self.read()
  File "/opt/openenergymonitor/emonhub/src/interfacers/EmonModbusTcpInterfacer.py", line 124, in read
    if len(rNames) != len(registers):
UnboundLocalError: local variable 'rNames' referenced before assignment

2023-11-14 20:14:03,139 WARNING  MainThread ModbusTCP thread is dead.
2023-11-14 20:14:03,140 WARNING  MainThread Attempting to restart thread ModbusTCP (thread has been restarted 5 times...)

What am I doing wrong?

Rather regret pressing update now…