6

I have an energy monitory and I managed to get into the feed. I got the handshake packets sorted but I am stuck on working out how to decode this data from HEX.

All I know are the following values as shown on the monitor at time of dump.

  1. Pac = 81 W
  2. Vac = 236.1 V
  3. Energy Total = 45.7 kWh
  4. Hours Total = 72 h

and have the following packets, that are send by the monitor every 10 seconds

 AA 55 00 01 01 00 11 82 32 00 AA 00 9A 06 DE 06   ªU.....‚2.ª.š.Þ.
 D4 00 03 00 03 00 04 09 59 13 8C 00 51 00 00 00   Ô.......Y.Œ.Q...
 00 01 C9 00 00 00 48 00 01 00 00 00 00 FF FF 00   ..É...H......ÿÿ.
 00 00 00 00 00 00 00 00 00 00 00 09 35            ............5

 AA 55 00 01 01 00 11 82 32 00 A3 00 9A 07 01 07   ªU.....‚2.£.š...
 11 00 03 00 03 00 04 09 51 13 8E 00 4F 00 00 00   ........Q.Ž.O...
 00 01 C9 00 00 00 48 00 01 00 00 00 00 FF FF 00   ..É...H......ÿÿ.
 00 00 00 00 00 00 00 00 00 00 00 07 88            ............ˆ

 AA 55 00 01 01 00 11 82 32 00 A3 00 9A 06 C2 06   ªU.....‚2.£.š.Â.
 E3 00 03 00 03 00 04 09 39 13 8E 00 51 00 00 00   ã.......9.Ž.Q...
 00 01 C9 00 00 00 48 00 01 00 00 00 00 FF FF 00   ..É...H......ÿÿ.
 00 00 00 00 00 00 00 00 00 00 00 09 03            .............

 AA 55 00 01 01 00 11 82 32 00 A3 00 9A 06 B8 06   ªU.....‚2.£.š.¸.
 B2 00 03 00 03 00 04 09 39 13 90 00 51 00 00 00   ².......9..Q...
 00 01 C9 00 00 00 48 00 01 00 00 00 00 FF FF 00   ..É...H......ÿÿ.
 00 00 00 00 00 00 00 00 00 00 00 08 CA            ............Ê

I can see the exact same things on start until ,2<ascii>, after that it seems to contain the data. The last packet dump should be the one resembling the data on the monitor at the time of receiving and as I mentioned.

I have tried converted each HEX into integer, and maybe just finding similar numbers, like the easiest would be hours, 72 since that only changes every hour. But my futile attempts got me nowhere. Nothing close to 72.

I doubt the data is obfuscated, or encrypted. I just don't know how else I can try and work this out and seek some advice from experienced developers in this sort of field.

All packets end the same with FF FF 00 .. and the last hex is different each time, I suspect a CRC value for checking. There may be other values mixed in between all these but I am only interested in the main ones I can see on the monitor.

1 Answer 1

8

You know that 72 will be in the data each time. Lets convert that to hex which is 48. We can see that clearly in each packet.

It's preceded by 3 0 bytes presumable because it's written out as a 32 bit int (for some reason).

preceding that we can see a 00 00 01 c9 lets convert that in its entirety to decimal: That turns out to be 457 10 times more than what another value you are looking for is.

The next set is 00 51 00 00, maybe there is a 2 byte 0 in between this value and the next one them so lets focus on the 51, converted to decimal that is 81. Another value you are looking for!

The last value you are looking for is 236.1 however after seeing the energy total maybe the value was scaled first by 10 so lets check 2361 in hex, that is 0939. Lo and behold that's in the last packet:

AA 55 00 01 01 00 11 82 32 00 A3 00 9A 06 B8 06
B2 00 03 00 03 00 04 09 39 13 90 00 51 00 00 00
00 01 C9 00 00 00 48 00 01 00 00 00 00 FF FF 00
00 00 00 00 00 00 00 00 00 00 00 08 CA

Remember that the highest value a single hex digit (0-f) can contain is 15, put 2 of them together and you can go up to 255. Double the amount of bits again and you are at 65535. Also handy to remember is that engineers are cheap and won't put in floating point arithmetic when they can just use fixed point instead. The trick is to find the scaling factor they used.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.