Author Topic: New Template ISY994i uploaded  (Read 17120 times)

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
New Template ISY994i uploaded
« on: December 07, 2013, 04:32:01 am »
ISY994i Template Release notes

Initial checkin, Trac ticket #1999 committed Dec. 6, 2013 at 22:20 EST.  Would someone be able to review and approve it, please?  Edit: Forgot to mention, it's a SQLCVS anonymous commit...

Wiki Page for driver: http://wiki.linuxmce.org/index.php/ISY994i

Working Features:

Insteon/X10 Devices and Insteon Scenes
Automatic device creation in LMCE
Automatic creation of Insteon Scenes as dimmable child devices
Generates status update events to LMCE
Control of devices and scenes using orbiters

Future work/To-Do list:
- finish up device status, config routines and logic
- integrate orbiter alerts
- add more events support
- add more device support and verbosity
- Insteon Keypad support (basically implemented using related devices)
- relate ISY folders to LMCE rooms (and logic applied
- Integrate ISY WeatherBug module with 1204's WeatherPlugin

Thanks!

/Mike
« Last Edit: December 07, 2013, 04:21:12 pm by mkbrown69 »

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: New Template ISY994i uploaded
« Reply #1 on: December 07, 2013, 09:45:03 pm »
The template has been approved. Thanks Mike!

-Thom

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: New Template ISY994i uploaded
« Reply #2 on: December 08, 2013, 06:23:22 am »
Thom,

I've just committed a fix for Manufacturer ID.  It got switched to"Google" in the SQLCVS number shuffle, and was corrected to "Universal Devices".  Fix committed on Dec. 8 @ 0:18 EST via anonymous SQLCVS.

Thanks for the assistance!

/Mike

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: New Template ISY994i uploaded
« Reply #3 on: December 09, 2013, 03:36:12 am »
Thom,

I've noticed that the code got tied to the Google manufacturer ID, which meant it wasn't working with the driver the way it should.  I've figured out how to fix it locally by modifying the database tables directly.  I'm not sure if doing a SQLCVS commit now will make things better or worse, so I'll wait on your advice.

Thanks for your assistance with this!  It's greatly appreciated!

/Mike

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: New Template ISY994i uploaded
« Reply #4 on: December 09, 2013, 03:48:29 am »
What did you modify?

-Thom

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: New Template ISY994i uploaded
« Reply #5 on: December 09, 2013, 05:10:38 am »
Hi Thom!

I modified the template first to re-associate it with Universal Devices (#1163).  That's what I committed early this morning.  Later, I noticed the code wasn't associated, so I started looking into the tables. 

I modified table 'InfraredGroup_Command.FK_InfraredGroup' for all affected rows to match the relevant row from 'infraredGroup.PK_InfraredGroup'.  The old value was 6143 (which matched the Google ChromeCast values), and I changed it to 6102 for the ISY.  I noted the behavior for LMCE creating new command groups, deleted the new (blank) rows, and changed the FK_InfraredGroup value for the pre-existing ones. 

Let me know how you want me to proceed...

Thanks again!

/Mike

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: New Template ISY994i uploaded
« Reply #6 on: December 13, 2013, 04:28:20 am »
Hi Thom!

I'm guessing that no news is good news, and that I'm on the right track.  I've done another anonymous SQLCVS commit. Would you be able to review it and let me know if it looks OK?  Dec 12th @ 22:20 EST, against Trac #1999.

Thanks!

/Mike

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: New Template ISY994i uploaded
« Reply #7 on: December 13, 2013, 04:40:37 am »
All of the above changes have been reviewed, and approved. Database looks ok.

Thanks so much!

-Thom

Michaelree

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: New Template ISY994i uploaded
« Reply #8 on: December 13, 2013, 07:18:43 am »
On a fresh 10.04 install I get the following error in the ISY994i log file.

1479:01   12/13/13 0:08:32.908      Failed loading code: Error loading code:
error: (eval):479:in `require': no such file to load -- mysql, line: 479
. <0xb4fd7b70>

Chris

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: New Template ISY994i uploaded
« Reply #9 on: December 13, 2013, 01:28:41 pm »
Hi Chris!

Man you're fast!  Been waiting for this for a while, eh?   ;)

My first thought is that you need to go through the web admin, Advanced -> SQLCVS -> Update and then wait a while.  When it says success, you can either reload the router, or reboot the core to have all the auto detection stuff happen via dhcp.  It should detect the ISY, then create the device as a child of the core.  You'll need to change your ISY credentials to match via the web admin, and reload the router.  After that, things should just work as per the wiki page.

If you're still having problems after that, can you pastebin or post the log files here as attachments?  I'll need the <dev#>_Generic _Serial_Device.log and <dev#>_ISY-994i-GSD.log.  Both are located in /var/log/pluto, and can be found using

ls <dev#>_*

Mine are 189_Generic_Serial_Device.log and 189_ISY-994i-GSD.log (as an example).

I'll look at them tonight if you're still having problems.  I think you just got bit by the misaligned code (it got attached to a different device in the SQLCVS number shuffles...

/Mike

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: New Template ISY994i uploaded
« Reply #10 on: December 13, 2013, 05:35:17 pm »
Why does this driver require mysql?

-Thom

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: New Template ISY994i uploaded
« Reply #11 on: December 13, 2013, 06:56:11 pm »
Why does this driver require mysql?
Thom,

I'm querying the pluto database to look up the IP address of the device; I couldn't figure out a way to find it via device data.  If you can point me in the direction of that, I'll be able to remove the mysql requirement.  I thought the Ruby mysql drivers were installed as a LMCE dependency (which is why I was using them), but it could be that they are on my system due to some other products I'd installed.

The reader's digest version is that the conn_ method is used with the ISY's subscription channel (which is a one-way feed of events from the ISY to the "client", in this case the LMCE driver).  Commands have to be sent asynchronously as a separate REST call, and I have a function to do that.  The function hits the IP address, which I'm presently scraping from the DB, after first parsing the pluto.conf file to find the connection information.  The relevant DB scrape code is in the 355_Process_Initialize, and the REST command function is in 373_Private_Methods.  I can't establish the conn_ subscription until I've executed some REST calls to connect to the ISY and gather Child Device and other config data.  This was all done to make things work "automagically".

Chris,

Please stand by... based on Thom's assessment, your system is missing the ruby-mysql packages.  I suspect we'll have a way forward after Thom thwacks me upside the head...  :P

HTH!

/Mike

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: New Template ISY994i uploaded
« Reply #12 on: December 13, 2013, 07:10:04 pm »
ouch.

This is one of those cases where a C++ device would do this easier... I've been looking through GSD and don't see the NetworkIOConnection class exposed sufficiently enough to get its IPAddress member.. :(

-Thom

edited: Basically, GSD _SUCKS_ when you need to maintain more than one socket. Full stop.

-Thom

Michaelree

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: New Template ISY994i uploaded
« Reply #13 on: December 13, 2013, 11:47:24 pm »
Mike,

cat /var/log/pluto/55_Generic_Serial_Device.log
http://pastebin.com/itjtqGvP

Did you install ruby gems or some other package when your wrote the template.

Chris

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: New Template ISY994i uploaded
« Reply #14 on: December 14, 2013, 01:07:40 am »
Mike,

cat /var/log/pluto/55_Generic_Serial_Device.log
http://pastebin.com/itjtqGvP

Did you install ruby gems or some other package when your wrote the template.

Chris
Chris,

The pastebin isn't there anymore...

I didn't use ruby gems.  I have the following ruby-mysql packages on my core:
libmysql-ruby
libmysql-ruby1.8

apt-get install libmysql-ruby1.8 libmysql-ruby

would satisfy the mysql require.

HTH!

/Mike