home_assistant_solarman icon indicating copy to clipboard operation
home_assistant_solarman copied to clipboard

Parsing error

Open bochelork opened this issue 2 years ago • 0 comments

I'm trying the integration, but I don't get data yet. I added a bit of debug lines and this is what I see:

2022-06-22 10:43:48 request.hex() a51700104500004f069f68020000000000000000000000000000010300960063e5cf7b15
2022-06-22 10:43:48 raw_msg.hex() a51300101500174f069f680201862d080047040000bea8aa62018302c0f15d15
2022-06-22 10:43:48 Traceback (most recent call last):
  File "/config/custom_components/solarman/solarman.py", line 138, in send_request
    params.parse(raw_msg, start, length)
  File "/config/custom_components/solarman/parser.py", line 21, in parse
    self.try_parse_field(rawData, j, start, length)
  File "/config/custom_components/solarman/parser.py", line 31, in try_parse_field
    self.try_parse_unsigned(rawData,definition, start, length)
  File "/config/custom_components/solarman/parser.py", line 87, in try_parse_unsigned
    temp = struct.unpack('>H', rawData[offset:offset + 2])[0]
struct.error: unpack requires a buffer of 2 bytes

Is this enough information to see whats going wrong?

bochelork avatar Jun 22 '22 08:06 bochelork