Closed stingone closed 2 years ago
It appears You don't get any answer from Your logger/inverter or it uses different register's addresses that configured. In place the script expects to find a number value it gets empty string - that's why it throws this error.
I tried running the code and get the error below.
Traceback (most recent call last): File "./InverterData.py", line 153, in <module> response=twosComplement_hex(str(''.join(hex(ord(chr(x)))[2:].zfill(2) for x in bytearray(data))+' '+re.sub('[^\x20-\x7f]', '', ''))[p1:p2]) File "./InverterData.py", line 20, in twosComplement_hex val = int(hexval, bits) ValueError: invalid literal for int() with base 16: ''