Author Topic: InsteonPLM driver problems  (Read 6058 times)

marlimoa

  • Guest
InsteonPLM driver problems
« on: January 12, 2009, 10:59:21 pm »
ok i have already created my Insteon PLM device and its correctly registered... my question here is how to run the InsteonPLM Driver? and I quote wiki's instructions but i just dont understand

Quote
Insteon Devices
Running for the first time

Initially, the driver needs at least ONE active lighting device. The driver will download this device's database and attempt to extract other Insteon ID's from it. Then it goes out and PINGS those devices in turn, to find out what kind of device they are. Once that is finished, it attempts to download each device's database, in turn, looking for more Insteon devices. This procedure, nicknamed 'Spidering', continues until all devices and device links are recognized. Once this 'Spider' is complete, the driver reports all detected devices, to LinuxMCE.
Running for the Second time

Once the devices have been added to LinuxMCE, they can now hold their configuration. Even though all the databases were downloaded during the first run, the devices themselves did not exist, and therefore, we can't store their configuration during the first run. This happens on the second run. You will now see a 'Configuration' field in each device. This holds the device's Type, Database Delta, and all ALDB records (the remote database) encoded into a long string.

If, at any time, you want to re-download a device's database, simple delete the configuration string. Upon next reload, the driver will go out and redownload the remote database.
Running after the first two times

Part of the configuration string is something called a DATABASE DELTA. It's basically a byte that increments each time the remote database is altered.

I store the Database Delta when I read the complete database. Then, upon router reloads, I ONLY read the database delta from the device. I compare that with the value stored in it's configuration, and if they are the same, I know I don't need to do any further downloads to that device.

This speeds up initialization dramatically. Sending 1 command vs sending 8 commands per record, and on average, more than 2 records.


    Currently, I cannot figure out how to call the Lighting Wizard. Ideally, this would run at this point to allow simple configuration of all the lighting devices.
    Alas, you'll have to use webAdmin to select Rooms and Floorplan Object Types. (don't forget this, it's important!)

Note: The Driver will automatically determine the type of device. If it's a Dimmer, it will assign it to Lighting Switch (dimmable). If it's a switched device(on/off), it will assign it to Lighting Device (ON/OFF). If it's a EZRain1 Sprinkler controller, it will assign it to an Irrigation device! (This may need some debugging)

Thanks!!  ;D

PsichoD

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: InsteonPLM driver problems
« Reply #1 on: February 27, 2009, 05:44:13 am »
Any luck with your setup? I'm kinda stuck at the point were the "Insteon PLM" template is set and the "Insteon PLM" device is there, but it looks like no child devices are being recognized. "running the driver" is a one weird term indeed.....
Using the "plmtools" (http://sourceforge.net/projects/plmtools) I made sure that the PLM is fully functioning - I can turn my LampLincs on and off using the "insteon" script.


greenhornet

  • Veteran
  • ***
  • Posts: 59
    • View Profile
Re: InsteonPLM driver problems
« Reply #2 on: May 04, 2009, 03:57:55 am »
I'm stuck at the same point.  Any advice or directions on log locations that can be used would be appreciated.  I have a standard Insteon lamp module that I'm trying to get to work with the PLM that I've configured according to the wiki.

sedgington

  • Veteran
  • ***
  • Posts: 82
    • View Profile
Re: InsteonPLM driver problems
« Reply #3 on: June 02, 2009, 03:31:54 pm »
I too had these problems as I found in several threads. I finally solved the problem. The installation instructions in the Wiki will work--with one caveat listed below--but the initial setup seems to be very unforgiving. If you make a mistake in the initial setup of the template especially at the step where you add the ruby code, it seems like there is no way to correct it but delete the template and start over. At least in my case, that is what worked. Here are the instructions that I used to delete the template:

http://wiki.linuxmce.org/index.php/Share_IR_Codes

Be careful to read and absorb what is involved in the step where you remove the "offending" elements once you get out of mysql. In my case, I ran this step three times: the first time telling it not to delete anything just to see what it found. The second time to delete the obvious things, and the third time to check that I had not missed anything. My core still lost some of the connections to file servers on my network, but it re-established them through pnp subsequently.

While I don't know whether it really makes and difference, on the template set-up procedure I used that worked, I copied and pasted the Ruby codes into the appropriate fields from a text file that is supplied in this thread:

http://forum.linuxmce.org/index.php?topic=7054.15

Insteon_Final.txt posted by ccoudsi as an attachment

There was some discussion that copying from the html page in the wiki directly was a problem. Just to be safe I used the supplied text file and it worked.

CAVEAT in the wiki instructions:
Finally, the one problem I found in the Wiki instructions is that it appears that "b4" is no longer broken in 7.10 and it does automatically write the group to the mysql table "InfraredGroup" in the "pluto_main" database. However, it is not writing the data as described in how to insert the data manually. What I did before saving the ruby codes and closing the template, after I had the "Insteon PLM" group show up in the correct field was to use phpMyAdmin to go to that entry (it will be on the last page of the table--the only one with "Insteon PLM" as the description) and change the "FK_CommMethod" from "1" which it wrote automatically, to "2" as is outlined in the manual method of inserting the record. The way the table is set up now, it will NOT accept "Null" values in some of the fields that are specified in the manual insertion script--such as "psc_mod". I didn't go back and check to see if this prevented the manual insertion script from over-writing the record as was outlined in the Wiki. All I know is that by changing the one value and following the other instructions outlined in the wiki and as amended above I got it to work.

I guess my last words of encouragement are that you need to be patient and methodical to get this done. As in many of the steps in setting up LinuxMCE it seems painfully slow--you are better off doing the steps in the instructions and then coming back a few hours later to see if it worked--for example, recognizing and setting up a simple on-off light switch through pnp in LinuxMCE took more than 30 minutes to be fully functional.

Hope this helps.
« Last Edit: June 02, 2009, 03:53:04 pm by sedgington »

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: InsteonPLM driver problems
« Reply #4 on: June 02, 2009, 06:53:56 pm »
Glad to see people are using this code!

I'm just getting ready to set up my 810 alpha box. 

At the moment, I don't have access to any Insteon devices, so I can't help too much, other than writing the original code..

I would make one recommendation to anyone wanting Insteon PLM Support:

Watch the LOGS!  There's a lot of messages and information in the logs, and most of the time, the logs will help you determine what the problem is.


HTH,

Dan Damron
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.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: InsteonPLM driver problems
« Reply #5 on: June 02, 2009, 08:16:54 pm »
dan, let's rewrite this in c++. Should not be much more work than such a complicated GSD :-)

br, Hari
rock your home - http://www.agocontrol.com home automation

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: InsteonPLM driver problems
« Reply #6 on: June 02, 2009, 08:36:30 pm »
dan, let's rewrite this in c++. Should not be much more work than such a complicated GSD :-)

Didn't hari and Dan planned on doing something like that during LinuxTag? ;)

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: InsteonPLM driver problems
« Reply #7 on: June 02, 2009, 11:18:53 pm »
there is also the PLC code from petek, waiting for integration..
rock your home - http://www.agocontrol.com home automation