From: Marc M. <ma...@me...> - 2012-12-22 18:43:05
|
On Sat, Dec 22, 2012 at 09:54:31AM -0800, Kevin Robert Keegan wrote: > We may want to have a short conversation about developing the code for > I2CS. > > I can see that Michael has committed some code needed to support the I2CS > protocol. > > Last night I started poking around to see if I could manually communicate > with an I2CS device and came up with the following code necessary to create > the required checksum. Since I really knew nothing about checksums it took > me a while, maybe it will save someone else some time: > > use strict; > my $string = "2F 00 00 00 00 00 00 00 00 00 00 00 00 00 00"; > my @array = split(" ", $string); > my $sum; > $sum += hex($_) for @array; > $sum = (($sum^255)+1) & 255; > print sprintf("%x", $sum) . "\n\n"; > > All of my info came from http://www.madreporite.com/insteon/i2cs.html. > > It seems to me that the easy way out is to create an ALDB_i2cs class inside > of AllLinkDatabase. I believe currently, the only communications that we > need to be in the I2CS standard are broadly "scan link table," "add link," > and "delete link." There are a few other areas such as "link to interface" > that would benefit from knowing that a device is an i2cs device, but this > is mostly for error reporting. > > However, I can see smarthome dropping support for i1 communications in a > few years. So, should we start to think about a broader rewrite now? I am > not a great programmer, and we seem to lack manpower, so I am disinclined > to go along with this. > > Just a thought. The rewrite already happened, it's the insteon branch that is now the default branch. Gregg just ran out of time before he was ale to add I2 support. First, thanks for the details you posted. Second, to answer your question: yes it makes sense to add checksums to I1 today since it should hopefully not be a lot of work and would allow things to work again. Then, adding I2 support is obviously a next goal, but that's bound to be more work so it shouldn't be blocking just adding checksums for I1. > As a side note, has anyone figured out a way to programatically link an > I2CS device to the PLM without first manually doing so? Or did smarthome > completely do away with this for "security" reasons? How does it work with > houselinc? That, I have no idea. Marc -- "A mouse is a device used to point at the xterm you want to type in" - A.S.R. Microsoft is to operating systems .... .... what McDonalds is to gourmet cooking Home page: http://marc.merlins.org/ |