Serial data from controller

Thread Starter

Slvrsky07

Joined Jan 29, 2023
51
I believe the mystery of this communication is totally solved. The data is 50 bits of 2 paired signed integers. The battery values are all shifted and the wind values are not. I also found the original index we thought for Batt KwH did not always match. It looks like it is just duplicated from the wind input KwH and printed in the GUI on battery KwH and possibly Solar KwH. Thanks again for all the assistance with learning how to do this. Strantor you are very knowledgeable and awesome! Attached is the following indexes.
Code:
Not shifted
RPM = controllerData[40:42]
RPM = struct.unpack("h" * ((len(RPM)) // 2), RPM)[0]

WADC = controllerData[24:26]
WADC = struct.unpack("h" * ((len(WADC)) // 2), WADC)[0]/100

WIDC = controllerData[26:28]
WIDC = struct.unpack("h" * ((len(WIDC)) // 2), WIDC)[0]/10

WDCV = controllerData[22:24]
WDCV = struct.unpack("h" * ((len(WDCV)) // 2), WDCV)[0]/100

TotalKwH = controllerData[28:30]
TotalKwH = struct.unpack("h" * ((len(TotalKwH)) // 2), TotalKwH)[0]/10

Shifted bits
batV = controllerData[30:32]
batV = struct.unpack("h" * ((len(batV)) // 2), batV)[0]/100

BCI = controllerData[32:34]
BCI = struct.unpack("h" * ((len(BCI)) // 2), BCI)[0]/10

BCW = controllerData[34:36]
BCW = struct.unpack("h" * ((len(BCW)) // 2), BCW)[0]
 
Top