Author Topic: Insteon not working - Need some ruby guidance  (Read 16395 times)

Michaelree

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: Insteon not working - Need some ruby guidance
« Reply #15 on: May 05, 2009, 11:03:07 pm »
I had my PLM working with 710, and about 20 insteon devices, about 40% of the time when I would restart the core which is where my PLM is connected, I would lose a device or two on the floor plan.  I have looked through all of the ruby code to try and fix this problem, and also add support for the HVAC adapter and for the motion sensor.  The time out errors are because the PLM cannot communicate with the device at that address.  The chip inside the PLM that sends and receives commands form your power lines is about 75% as strong as the chips all other insteon devices.  So even though one device commutates perfectly with another device, It might not be getting the signal to the PLM.  I fix this problem in my network, and now it works 100% of the time and even the response time on sending commands is faster.  A few ways you can fix this problem.
1) Access Points should be located on the 1st receptacle on the line, As close as you can get it to the actual breaker box(this fixed my problem), and make sure one on is on each phase of your power.
2) Do not plug the PLM into a surge protector.
3) It would be ideal to have the PLM as close to the breaker box as possible.
4) Move the PLM to a different line that does not have lots of electronics on it.

After you get the communication problem fixed you should not see the timeout error any more.

I did look at trying to update the driver to support more devices, and I got the HVAC half way working, but I kept running into the problem of not having any link management available.  You can link every insteon device from the PLM and never have to go around and push the dumb button in for 10 seconds.  I could not figure out a good way to accomplish device linking natively in LMCE, so I stopped working on the driver.  I spent a lot of time looking around to see how others are handling insteon networks, and most of them have gone with ISY-99.  It has a lot of advantages over using just the PLM.  I just received it in the mail last week, and started working on a driver for it.
Hope this helps,
Chris

williammanda

  • Veteran
  • ***
  • Posts: 73
    • View Profile
Re: Insteon not working - Need some ruby guidance
« Reply #16 on: May 21, 2009, 02:22:45 am »
I'm not sure if this will help you or not, but here is my experience, I got my basic Insteon setup working on my Hybrid (7.10) using PC serial port, by following the wiki instructions "http://wiki.linuxmce.org/index.php/Setting_Up_PLM_Template" step by step and cleaning the Ruby code first before I pasted in the template, by copying the code from the wiki page to a text file, removing some html code, then I pasted the code from the text file to the template, and I removed code  #141 ruby code(CD/DVD) from the template, after rebooting my Hybrid, and linking my "Insteon Outlinc" to my PLM (Serial port), another Hybrid reboot, then I added a lamp to the floor map, and I was able to turn On/Off the lamp which is connected to Insteon Outlinc "http://www.insteon.net/2473SWH-outletlinc.html".

currently i'm trying the same configuration on 8.10 hybrid using default insteon PLM template, with "USB to Serial adapter", I replaced "/dev/ttyS0" on the default template with "/dev/ttyUSB0" with no luck, I know my "/dev/ttyUSB0" is working using
Quote
/usr/pluto/bin/TestSerialPort -p /dev/ttyUSB0 -P N81 -b 19200 -t "\02\60" ,
I saw the output on my protocol analyzer.

Any suggestion really appreciated,
Charlie,

Have you got the "USB to Serial adapter" issue solved yet on 810?
Thanks
Marty

ccoudsi

  • Guru
  • ****
  • Posts: 244
    • View Profile
Re: Insteon not working - Need some ruby guidance
« Reply #17 on: May 21, 2009, 05:31:13 am »
No, still an open issue for me.
Do you have similar issue??
Cheers |[BEER]
Charlie,

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Insteon not working - Need some ruby guidance
« Reply #18 on: May 21, 2009, 09:20:03 am »
Regarding USB 2 Serial. This has been fixed since   20090515 (alpha2.20). At least we have lots of people reporting success detecting USB ZWave sticks, USB UIRT, and I myself got my USB-2-2xSerial detected.

williammanda

  • Veteran
  • ***
  • Posts: 73
    • View Profile
Re: Insteon not working - Need some ruby guidance
« Reply #19 on: May 21, 2009, 02:37:21 pm »
I had my PLM working with 710, and about 20 insteon devices, about 40% of the time when I would restart the core which is where my PLM is connected, I would lose a device or two on the floor plan.  I have looked through all of the ruby code to try and fix this problem, and also add support for the HVAC adapter and for the motion sensor.  The time out errors are because the PLM cannot communicate with the device at that address.  The chip inside the PLM that sends and receives commands form your power lines is about 75% as strong as the chips all other insteon devices.  So even though one device commutates perfectly with another device, It might not be getting the signal to the PLM.  I fix this problem in my network, and now it works 100% of the time and even the response time on sending commands is faster.  A few ways you can fix this problem.
1) Access Points should be located on the 1st receptacle on the line, As close as you can get it to the actual breaker box(this fixed my problem), and make sure one on is on each phase of your power.
2) Do not plug the PLM into a surge protector.
3) It would be ideal to have the PLM as close to the breaker box as possible.
4) Move the PLM to a different line that does not have lots of electronics on it.

After you get the communication problem fixed you should not see the timeout error any more.

I did look at trying to update the driver to support more devices, and I got the HVAC half way working, but I kept running into the problem of not having any link management available.  You can link every insteon device from the PLM and never have to go around and push the dumb button in for 10 seconds.  I could not figure out a good way to accomplish device linking natively in LinuxMCE, so I stopped working on the driver.  I spent a lot of time looking around to see how others are handling insteon networks, and most of them have gone with ISY-99.  It has a lot of advantages over using just the PLM.  I just received it in the mail last week, and started working on a driver for it.
Hope this helps,
Chris


Any results on the ISY-99 and also have you tried 8.10 yet?
Thanks
Marty

ccoudsi

  • Guru
  • ****
  • Posts: 244
    • View Profile
Re: Insteon not working - Need some ruby guidance
« Reply #20 on: May 21, 2009, 08:53:34 pm »
Seth,
I attached the Ruby code I used in my 710 Insteon PLM setup for your reference.

Cheers |[BEER]
Charlie,

seth

  • Guru
  • ****
  • Posts: 485
  • A day w/o LinuxMCE is like a day w/o sunshine!
    • View Profile
Re: Insteon not working - Need some ruby guidance
« Reply #21 on: May 21, 2009, 08:58:15 pm »
 ;D
Thanks. I will give it a try this evening.

I hope it resolves my issues.

Regards,

Seth
".....Because Once you've LinuxMCE'd....."
System stats located at my user page:

http://wiki.linuxmce.org/index.php/User:Seth

dlewis

  • Guru
  • ****
  • Posts: 401
    • View Profile
Re: Insteon not working - Need some ruby guidance
« Reply #22 on: May 22, 2009, 04:20:27 am »
Is that code apart in svn?

ccoudsi

  • Guru
  • ****
  • Posts: 244
    • View Profile
Re: Insteon not working - Need some ruby guidance
« Reply #23 on: May 22, 2009, 06:32:15 am »
This is the same code in the wiki page, without the extra HTML characters when you use copy and paste.

BTW, I just updated my 810 to Alpha 2.21, now I see commands exchange between the host(USB2Serial adapter) and the PLM, but LMCE can not detect the "OutletLinc" light for some reason, I need to do some comparison with my 710 setup, which is working perfect.

Cheers |[BEER]
Charlie,

ccoudsi

  • Guru
  • ****
  • Posts: 244
    • View Profile
Re: Insteon not working - Need some ruby guidance
« Reply #24 on: May 25, 2009, 12:24:19 am »
I Just want to give an update on my status with Insteon setup, the 7.10 with direct serial port to the hybrid worked without any problem first try, my LMCE 810 Alpha 2.21 with USB2Serial adapter, now is working, with the following modifications:
1) changing default value of "#37 COM port on PC" to "/dev/ttyUSB0"
2) select "pci0000:00/0000:00:02.0+5" from the drop down list of the device data COM Port on PC
3) Created 88_InsteonPLM.sh (for Plug n Play) per Wiki instructions

I attached the data exchanged between LMCE with PLM module if someone interested.
Cheers |[BEER]
Charlie,

greenhornet

  • Veteran
  • ***
  • Posts: 59
    • View Profile
Re: Insteon not working - Need some ruby guidance
« Reply #25 on: May 26, 2009, 07:05:27 am »
I'm not sure if this will help you or not, but here is my experience, I got my basic Insteon setup working on my Hybrid (7.10) using PC serial port, by following the wiki instructions "http://wiki.linuxmce.org/index.php/Setting_Up_PLM_Template" step by step and cleaning the Ruby code first before I pasted in the template, by copying the code from the wiki page to a text file, removing some html code, then I pasted the code from the text file to the template, and I removed code  #141 ruby code(CD/DVD) from the template, after rebooting my Hybrid, and linking my "Insteon Outlinc" to my PLM (Serial port), another Hybrid reboot, then I added a lamp to the floor map, and I was able to turn On/Off the lamp which is connected to Insteon Outlinc "http://www.insteon.net/2473SWH-outletlinc.html".

currently i'm trying the same configuration on 8.10 hybrid using default insteon PLM template, with "USB to Serial adapter", I replaced "/dev/ttyS0" on the default template with "/dev/ttyUSB0" with no luck, I know my "/dev/ttyUSB0" is working using
Quote
/usr/pluto/bin/TestSerialPort -p /dev/ttyUSB0 -P N81 -b 19200 -t "\02\60" ,
I saw the output on my protocol analyzer.

Any suggestion really appreciated,
Charlie,

I gave your suggestion a shot and completely deleted and reconfigured the PLM for the second time, following the wiki page, Insteon - setting up the PLM template, and 'running the Insteon PLM Driver for the first time.'  I'm not seeing activity in the activity log, other than this:

Code: [Select]
/var/log/pluto/153_Generic_Serial_Device.log

0000 006D 0022 0002 0157 00AC 0015 0040 0015 0016 0015 0040 0015 0016 0015 0016 0015 0016 0015 0016 0015 0040 0015 0016 0015 0016 0015 0016 0015 0016 0015 0040 0015 0040 0015 0016 0015 0016 0015 0016 0015 0040 0015 0040 0015 0040 0015 0040 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0040 0015 0040 0015 0040 0015 06AF 0157 0056 0015 0E42
        ^
(eval):13: syntax error, unexpected tINTEGER, expecting kEND
0000 006D 0022 0002 0156 00AC 0015 0040 0015 0015 0015 0040 0015 0015 0015 0015 0015 0016 0015 0015 0015 0040 0015 0015 0015 0016 0015 0015 0015 0015 0015 0040 0015 0040 0015 0015 0015 0015 0015 0040 0015 0040 0015 0040 0015 0040 0015 003F 0015 0015 0015 0016 0015 0015 0015 0016 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0040 0015 0040 0015 0680 0156 0056 0015 0E3B
        ^
(eval):19: syntax error, unexpected tINTEGER, expecting kEND
0000 006E 0022 0002 0156 00AB 0015 003F 0015 0015 0015 003F 0015 0015 0015 0015 0015 0015 0015 0015 0015 003F 0015 0015 0015 0015 0015 0015 0015 0015 0015 003F 0015 003F 0015 0015 0015 0015 0015 003F 0015 003F 0015 0015 0015 003F 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003F 0015 003F 0015 003F 0015 003F 0015 06AA 0156 0055 0015 0E37
        ^
(eval):25: syntax error, unexpected tINTEGER, expecting kEND
0000 006E  <0x42804950>

I'm at a loss.   I've only got two COM ports listed, /dev/ttyS0 (which I have selected) and pci0000:00/0000:00:02.0+2 Used by USB UIRT 0038.

I'm ready to switch my automation over to Windows I'm so frustrated.  I'll give anyone a look at my box that's willing and would certainly appreciate some suggestions.  This one is beyond my grasp.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Insteon not working - Need some ruby guidance
« Reply #26 on: May 26, 2009, 08:12:17 am »
You got bit by the GSD IR codes bug. This has been fixed in recent 0810 releases.

-Thom

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Insteon not working - Need some ruby guidance
« Reply #27 on: May 26, 2009, 02:03:57 pm »
can somebody please write a c++ dce device for insteon?? Btw, we already have code in svn, just the device template needs to be recreated.

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

greenhornet

  • Veteran
  • ***
  • Posts: 59
    • View Profile
Re: Insteon not working - Need some ruby guidance
« Reply #28 on: May 26, 2009, 04:10:28 pm »
So there's no fix for it in 710?  I really don't want to wait a year for 810 RC to come out before I can solve this problem.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Insteon not working - Need some ruby guidance
« Reply #29 on: May 26, 2009, 04:13:07 pm »
You may want to go ahead and move to the 810 alpha.

-Thom