So this is where it gets a little trickier for a serial device.
Looking at the 20_SharpTV.sh detection script we have the following line:
/usr/pluto/bin/TestSerialPort -p $3 -P N81 -b 9600 -t "POWR0 \r\s500mPOWR1 \r" -i 1 -s "OK\r"
The source for TestSerialPort is src/TestSerialPort/
Looking at the main.cpp file, it looks like it's only capable of testing strings as arguments, as opposed to hex values. I'm guessing is that this fit with the other CE devices they were intending to detect.
So the following would need to be done:
1) You find a string to send to the PLM that will reply with a string to positively identify it. Looking at the PLM command guide, I don't know if this is possible, but you're more familiar with the command set than I am.
2) Someone expands the TestSerialPort program to also accept and compare hex values. This looks to be fairly straightforward.
I could probably handle 2), but not tonight. Probably by the end of the week.
Heh, Pete, We're definately on the same page!
I just slapped together a quick script: InsteonPLM.sh
echo "Insteon PLM Detection Script queue $2"
/usr/pluto/bin/TestSerialPort -p $3 -P N81 -b 19200 -t "\02\60" -i 5 -s
if [[ "$?" -ne 0 ]]; then
echo "It's not a PLM"
/usr/pluto/bin/MessageSend dcerouter -r 0 $1 1 806 224 $2 13 "$4" 44 0
echo "It is a PLM"
/usr/pluto/bin/MessageSend dcerouter -r 0 $1 1 806 224 $2 13 "$4" 44
I can definately send a 0x02 0x60 - which is Get IM Info..
This should respond with
ie 0x02 0x60 0x11 0x11 0x11 0x03 0x05 0x53 0x06 where:
02 60 is the command echoed back
11 11 11 is the PLM's Insteon ID
03 05 is the Cat / Subcat (This is the Identification)
53 is the firmware version
06 is ACK
I haven't tested it yet.. still working on it.
I copied most of that from the 60_apex configure script..
I will try it with the hex values.. if it fails, I should be able to 'build' a string consisting of those hex values in sh.