Please login or register.

Login with username, password and session length

Author Topic: [How-Do-I] Store a Timer for the LM465 in the CM11A Using Perl?  (Read 22669 times)

twilder

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 3
[How-Do-I] Store a Timer for the LM465 in the CM11A Using Perl?
« on: September 27, 2007, 03:15:33 PM »

Where can I find the Perl code that will turn ON this lamp at house location “L6” at 8am each day and store this info in the interface memory?
I want to learn how the “cm11a protocol” text file is used to produce this Perl program.
Thanks
Logged

Charles Sullivan

  • Hero Member
  • *****
  • Helpful Post Rating: 94
  • Posts: 1565
    • HEYU - X10 Automation for Linux, Unix, and Mac OSX
Re: [How-Do-I] Store a Timer for the LM465 in the CM11A Using Perl?
« Reply #1 on: September 27, 2007, 06:06:38 PM »

Where can I find the Perl code that will turn ON this lamp at house location “L6” at 8am each day and store this info in the interface memory?
I want to learn how the “cm11a protocol” text file is used to produce this Perl program.
Thanks


MisterHouse <http://misterhouse.sourceforge.net/> is Perl based, however I don't believe anyone has written a Perl module for it to store timers in the CM11A's memory.  AFAIK, the only open source software with this capability is the console program Heyu  (for Linux, Unix, and Mac OS X)  <http://www.heyu.org>.  Heyu is written in C.

Logged
Yesterday it worked.
Today it doesn't work.
X10 on Windows is like that.

HEYU - X10 Automation for Linux, Unix, and Mac OS X     http://www.heyu.org

twilder

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 3
Re: [How-Do-I] Store a Timer for the LM465 in the CM11A Using Perl?
« Reply #2 on: October 01, 2007, 08:05:57 AM »

Where can I find the Perl code that will turn ON this lamp at house location “L6” at 8am each day and store this info in the interface memory?
I want to learn how the “cm11a protocol” text file is used to produce this Perl program.
Thanks


MisterHouse <http://misterhouse.sourceforge.net/> is Perl based, however I don't believe anyone has written a Perl module for it to store timers in the CM11A's memory.  AFAIK, the only open source software with this capability is the console program Heyu  (for Linux, Unix, and Mac OS X)  <http://www.heyu.org>.  Heyu is written in C.



Charles,
Do you know the heyu module name that will possibly do what I'm trying to do?  I'll try to find difference in programming with Perl & C.
Thanks -- Tom
Logged

Charles Sullivan

  • Hero Member
  • *****
  • Helpful Post Rating: 94
  • Posts: 1565
    • HEYU - X10 Automation for Linux, Unix, and Mac OSX
Re: [How-Do-I] Store a Timer for the LM465 in the CM11A Using Perl?
« Reply #3 on: October 01, 2007, 05:26:26 PM »

Where can I find the Perl code that will turn ON this lamp at house location “L6” at 8am each day and store this info in the interface memory?
I want to learn how the “cm11a protocol” text file is used to produce this Perl program.
Thanks


MisterHouse <http://misterhouse.sourceforge.net/> is Perl based, however I don't believe anyone has written a Perl module for it to store timers in the CM11A's memory.  AFAIK, the only open source software with this capability is the console program Heyu  (for Linux, Unix, and Mac OS X)  <http://www.heyu.org>.  Heyu is written in C.



Charles,
Do you know the heyu module name that will possibly do what I'm trying to do?  I'll try to find difference in programming with Perl & C.
Thanks -- Tom

For your purposes you should probably look at the old Heyu version 1.35-3   <http://www.heyu.org/version1/x10_heyu.tgz>.
The included file parse_sched.c has the code for reading a schedule file, creating the 1K memory image, and loading it into the CM11A EEPROM.

(The current version 2.1.2 is totally different and probably 100X more complex.)

Logged
Yesterday it worked.
Today it doesn't work.
X10 on Windows is like that.

HEYU - X10 Automation for Linux, Unix, and Mac OS X     http://www.heyu.org

stevem

  • Newbie
  • Helpful Post Rating: 1
  • Posts: 8
Re: [How-Do-I] Store a Timer for the LM465 in the CM11A Using Perl?
« Reply #4 on: October 02, 2007, 02:29:01 PM »

A very temporary and not pleasant way of doing this:

Fetch, compile heyu (2.1.1 works just fine for this)

install it and set it up and ensure  heyu info works, then in your perl you might do something along these lines:

  system("/usr/local/bin/heyu readclock");   where readclock would be replaced with whichever heyu command would be most appropriate for you.

C code to handle the CM11/12A is unpleasant at best (my code handles only a limited subset with no macros as the PC is on all the time - as far as I can see heyu handles the lot!)  and I wouldn't like to try to talk to this binary device using PERL, but I'm sure it can be done!

Cheers, Steve

Logged

twilder

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 3
Re: [How-Do-I] Store a Timer for the LM465 in the CM11A Using Perl?
« Reply #5 on: October 02, 2007, 04:42:43 PM »

A very temporary and not pleasant way of doing this:

Fetch, compile heyu (2.1.1 works just fine for this)

install it and set it up and ensure heyu info works, then in your perl you might do something along these lines:

 system("/usr/local/bin/heyu readclock"); where readclock would be replaced with whichever heyu command would be most appropriate for you.

C code to handle the CM11/12A is unpleasant at best (my code handles only a limited subset with no macros as the PC is on all the time - as far as I can see heyu handles the lot!) and I wouldn't like to try to talk to this binary device using PERL, but I'm sure it can be done!

Cheers, Steve


Where can I find the Perl code that will turn ON this lamp at house location “L6” at 8am each day and store this info in the interface memory?
I want to learn how the “cm11a protocol” text file is used to produce this Perl program.
Thanks


MisterHouse <http://misterhouse.sourceforge.net/> is Perl based, however I don't believe anyone has written a Perl module for it to store timers in the CM11A's memory. AFAIK, the only open source software with this capability is the console program Heyu (for Linux, Unix, and Mac OS X) <http://www.heyu.org>. Heyu is written in C.



Charles,
Do you know the heyu module name that will possibly do what I'm trying to do? I'll try to find difference in programming with Perl & C.
Thanks -- Tom

For your purposes you should probably look at the old Heyu version 1.35-3 <http://www.heyu.org/version1/x10_heyu.tgz>.
The included file parse_sched.c has the code for reading a schedule file, creating the 1K memory image, and loading it into the CM11A EEPROM.

(The current version 2.1.2 is totally different and probably 100X more complex.)



Charles;  Steve;
Thank you both very much for this info!!  Now that I'm looking at some of the data you suggested for reference.  I better not lose the software I have, just yet.  LOL
Thanks again!
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.