Bug #119

CRC insertion in Plugwise commands incorrect

Added by JK almost 2 years ago. Updated almost 2 years ago.

Status:ClosedStart date:04/21/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution:

Description

crc's are calculated as an integer in CalculateCRC and converted to hex with:
sCRC = Hex(CalculateCRC(sString))

This results in incorrect CRC lengths. (CRC's can be three bytes this way when the result has a leading 0 and will create an invalid message).
The command is not executed by the plug.

The correct way is sCRC = Hex(CalculateCRC(sString),4), always generating a 4 byte CRC.

History

#1 Updated by rdnzl almost 2 years ago

  • Status changed from New to Resolved

Fixed in version 0.1.205, please test, thanks!

#2 Updated by JK almost 2 years ago

If you make the SUB return a string rather than an INT it works

#3 Updated by rdnzl almost 2 years ago

Fixed it just now, I hope...
Have no access to my plugwise stick, so unable to test here...

#4 Updated by rdnzl almost 2 years ago

  • Status changed from Resolved to Feedback

#5 Updated by rdnzl almost 2 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF