Author Topic: Current Status of Insteon PLM Integration  (Read 11414 times)

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5495
  • DOES work for LinuxMCE.
    • View Profile
Re: Current Status of Insteon PLM Integration
« Reply #15 on: December 22, 2007, 11:29:29 pm »
what's funny, I remember doing this the first time, with my father... using the first X10 to Computer interface (what's sad? it hasn't changed at all, it even has the same case.).. the CM11 has been around a _VERY_ long time... I saw the first ones in 1986. I had versions of their software to control stuff in the house in Apple II (nice little graphical display of house), to my IBM PC at the time (piece of crap text interface that was horrendous!)..... we had attempted this several times since.. but only  with Pluto has anything approaching full home unification been possible (without being more rich than god.)

-Thom

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: Current Status of Insteon PLM Integration
« Reply #16 on: December 23, 2007, 12:09:14 am »
what's funny, I remember doing this the first time, with my father... using the first X10 to Computer interface (what's sad? it hasn't changed at all, it even has the same case.).. the CM11 has been around a _VERY_ long time... I saw the first ones in 1986. I had versions of their software to control stuff in the house in Apple II (nice little graphical display of house), to my IBM PC at the time (piece of crap text interface that was horrendous!)..... we had attempted this several times since.. but only  with Pluto has anything approaching full home unification been possible (without being more rich than god.)

Do you know any ($free/?OSS?) simple floorplan applet/Flash/Javascript that we can embed in an LMCE webpage window that just sends the floorplan data back to be saved on the server?

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Current Status of Insteon PLM Integration
« Reply #17 on: December 23, 2007, 01:10:34 am »
Matthew,
Sorry, I don't quite follow what you're trying to do, but I have not found anything even remotely like that...

Tschak909,
LOL, I wrote an application for a pool hall once.. used X10 commands to turn the pool table lights on/off, and activated a timer, and calculated the charge...
that was WAY back.. even before VGA graphics... drew the 'floorplan' using ASCII graphics...

The ironic thing is, the pool hall I created it for is STILL using it.. almost 20 years later...

I remember the communication being a BIOTCH.. this was way before the CM11A, all I had was a PW523(I think) to communicate with..
had to do all the timing myself.. zero crossing, bit by bit output.. ugh!
« Last Edit: December 23, 2007, 01:13:12 am by ddamron »
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: Current Status of Insteon PLM Integration
« Reply #18 on: December 23, 2007, 03:28:37 am »
using the first X10 to Computer interface (...) the CM11 has been around a _VERY_ long time... I saw the first ones in 1986. I had versions of their software to control stuff in the house in Apple II (nice little graphical display of house) (...) but only  with Pluto has anything approaching full home unification been possible (without being more rich than god.)

Do you know any ($free/?OSS?) simple floorplan applet/Flash/Javascript that we can embed in an LMCE webpage window that just sends the floorplan data back to be saved on the server?

Sorry, I don't quite follow what you're trying to do, but I have not found anything even remotely like that...

What I want to do is make the floorplan wizard fully interactive in an LMCE webpage. Without relying on an external program for generating the floorplan images, or (necessarily) uploading image files, etc. So I'm looking for a Java or Flash applet that offers simple floorplan drawing, which sends the drawn floorplan back to the server when complete. I guess a really simple drawing applet could be used, but drag & drop floorplan symbols would be good. I'll keep looking.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5495
  • DOES work for LinuxMCE.
    • View Profile
Re: Current Status of Insteon PLM Integration
« Reply #19 on: December 23, 2007, 04:34:10 pm »
there isn't one.. it would have to be created.

I see it in two pieces

1. a web based floorplan creator, this would be a server side app that would in the end generate a png, to be fed into the database, controlled using a UI using AJAX and SVG to create the floorplans using a set of very simplified vector drawing tools.

I see this as a good alternative to building something in flash, it's entirely standards compliant, and I've done SVG based UIs (we're not doing anything crazy, so the load on the browser should be minimal.) Firefox or Safari would be required for now..... While I do know Flash extensively, I do not have a copy anymore, and would prefer not to be dependent on commercial software to do the development if possible.

2. creating a native version of the web UI as a native application that can be spawned from the setup wizard...this one is going to take some serious thought to make it blend in nicely.

-Thom

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: Current Status of Insteon PLM Integration
« Reply #20 on: December 23, 2007, 06:19:50 pm »
there isn't one.. it would have to be created.

I see it in two pieces

1. a web based floorplan creator, this would be a server side app that would in the end generate a png, to be fed into the database, controlled using a UI using AJAX and SVG to create the floorplans using a set of very simplified vector drawing tools.

I see this as a good alternative to building something in flash, it's entirely standards compliant, and I've done SVG based UIs (we're not doing anything crazy, so the load on the browser should be minimal.) Firefox or Safari would be required for now..... While I do know Flash extensively, I do not have a copy anymore, and would prefer not to be dependent on commercial software to do the development if possible.

2. creating a native version of the web UI as a native application that can be spawned from the setup wizard...this one is going to take some serious thought to make it blend in nicely.

I place a high priority on unifying the "UI" and "Adminsite" GUIs. A Java applet could serve in both contexts, and there are lots of existing GPL Java drawing applets, and even some that support SVG.

If the floorplan is accessed in two cases, editing and using, the editor could be accessible from more full-featured Orbiter devices (ie. PC, whether in UI or Adminsite), while the floorplan as PNG or SVG can be used as a GUI in simpler orbiters like mobile phones, IP phones, simple remotes...

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Current Status of Insteon PLM Integration
« Reply #21 on: December 24, 2007, 08:12:14 am »
Matthew, I see where your going..  and I agree with you.
Start another thread re:Floorplan designer in Java, or something like that...
I'd rather try to keep this thread for status of PLM Integration.

I'll be the first to reply in your new thread!


Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Current Status of Insteon PLM Integration
« Reply #22 on: December 24, 2007, 08:19:12 am »
K, lots happened today.

did MAJOR debugging of the spider routines..

fixed a bug with receiving data..

implemented cmd #760 in preperation for Reporting Child Devices to LinuxMCE.

more optimizations,

lots more bugs fixed, too many to put here..

Fixed bugs in Child Configuration Saving.. (now, it works)

Child devices are now sensed eg: Light Switch (dimmable) is really a keypadlinc dimmable, or a Lamplinc dimmable, or a Switchlinc Dimmable
as compared to a Light Switch (on/Off) is a non-dimmable insteon device
as compared to an Irrigation controller.. which SHOULD automagically get added to the setup wizard..
as compared to a generic I/O controller.. which, I dunno.

lol

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Current Status of Insteon PLM Integration
« Reply #23 on: December 25, 2007, 11:57:06 pm »
Well, After a few MAJOR hiccups yesterday, (had to reinstall) I think I'm ready to start again..
Generating orbiter screens for my Living Room Station 2"
Then, I can start firing the Reporting Child Events...

Will keep you posted..

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Current Status of Insteon PLM Integration
« Reply #24 on: December 26, 2007, 01:06:55 am »
Ok, Couple of notes:

I have to report ALL devices.. if I fail to report a device, it REMOVES it!

When I fire the Report Child Devices event.. it ADDs the children, but does NOT start the wizard..

Do I have to fire another event?  Maybe Device Detected?? or possibly a PNP event??

Thanks ahead of time...

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Re: Current Status of Insteon PLM Integration
« Reply #25 on: December 26, 2007, 01:41:03 am »
I believe the wizard itself is started when a lighting PNP device is detected.

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Re: Current Status of Insteon PLM Integration
« Reply #26 on: December 26, 2007, 01:58:13 am »
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.

or

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.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Current Status of Insteon PLM Integration
« Reply #27 on: December 26, 2007, 02:39:27 am »
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.

or

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
#!/bin/bash

echo "Insteon PLM Detection Script  queue $2"
/usr/pluto/bin/TestSerialPort -p $3 -P N81 -b 19200 -t "\02\60" -i 5 -s
"\03\05"
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
else
echo "It is a PLM"
/usr/pluto/bin/MessageSend dcerouter -r 0 $1 1 806 224 $2 13 "$4" 44
1901
fi


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.

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Current Status of Insteon PLM Integration
« Reply #28 on: December 26, 2007, 02:45:26 am »
On a side note though...

Because I had to reinstall, all my lights were lost..

This was a PERFECT situation to test the Spider...

I added ONE light switch to my configuration... the bathroom light.

It went out and SENSED 23 devices on FIRST RUN!!!

AND installed them all as children!

Pretty cool...

(Most of those, it got from the PLM's database)

Also, once I've reported my Child devices, it installs them, the orbiter says
'New Software has been installed. 
Quick reload Router now?'

Heh,

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Current Status of Insteon PLM Integration
« Reply #29 on: December 26, 2007, 03:09:08 am »
I just ran into another GOTCHA

It seems my Spider routine is TOO sensitive!

It found my Access Points, and is trying to add them! (They should be treated as passive devices)
I was scratching my head, trying to figure out why it's attempting to add Insteon ID FA.FB.FC to my PLM...
That seems to be some form of routing in the Access Points..
I haven't figured that out yet..., so I think I'm just going to ignore them for now.


heh, another bug to fix...


Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.