Skip to content

v2.0.4-b3

@0xAHA 0xAHA tagged this 12 Sep 11:01
_read_device_identification() makes six holding reads and is meant to run once
per session. Both callers gated it on 'not self._serial_number'.

On hardware whose serial register answers with an empty string that condition
is never satisfied. From a WIT capture attached to #434, one hour, debug on:

  56  Finished fetching ... (success: True)
  56  Inverter identified - serial: unknown | firmware: YE1.0 | Protocol 2.03
  56  Read serial number:            <- empty, every time

Six reads x 56 polls is over three hundred holding reads an hour that had
already been answered, on an EW11 that was dropping connections - and every
extra read is another chance at the transport error that owner is chasing. It
is also the method whose reads opened the orphan socket in #426.

Gates on whether anything was learned instead. An inverter asleep at the first
attempt answers none of the six, learns nothing and is asked again when it
wakes - which is what the original guard was for. One that answered some of
them is not asked again for a serial that is never coming.

Found by actually reading a log I had previously only grepped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Assets 2
Loading