&main::print_log

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

&main::print_log

Neil Cherry
I just discovered something really weird. I sent 6 full X10 commands
and I got back:

01/20/06 02:04:00 PM: Saving object states ... done
01/20/06 02:04:01 PM XAGAK: xAG off
01/20/06 02:04:01 PM XAGAK:  XAGAK
        : (6 X10 commands sent)
01/20/06 02:04:01 PM mh paused for 12 seconds (volume=40)

Now this is what's weird. The above is all in the same second.
To send 6 full X10 commands would take 6 seconds (assuming no
collisions). The reason this came about is because I'm trying
to figure out what I'm doing wrong in my Insteon driver
(iplcs.pm). I needed to know if I am spending more than 1
second on each full X10 command. I created another function that
prints the time more accurately and it works.

--
Linux Home Automation         Neil Cherry       [hidden email]
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
http://home.comcast.net/~ncherry/               Backup site


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: &main::print_log

David Norwood-3
You realize XAGAK is two commands, right?  One approach you can take is to
put each command into a queue, then only send commands to the serial port if
it's not blocking.  I took this approach in UIRT2.pm, except I use a simple
timer to space out the commands.  You can send a bunch of IR signals and
misterhouse won't pause.

David


----- Original Message -----
From: "Neil Cherry" <[hidden email]>
To: <[hidden email]>
Sent: Friday, January 20, 2006 11:42 AM
Subject: [mh] &main::print_log


>I just discovered something really weird. I sent 6 full X10 commands
> and I got back:
>
> 01/20/06 02:04:00 PM: Saving object states ... done
> 01/20/06 02:04:01 PM XAGAK: xAG off
> 01/20/06 02:04:01 PM XAGAK:  XAGAK
> : (6 X10 commands sent)
> 01/20/06 02:04:01 PM mh paused for 12 seconds (volume=40)
>
> Now this is what's weird. The above is all in the same second.
> To send 6 full X10 commands would take 6 seconds (assuming no
> collisions). The reason this came about is because I'm trying
> to figure out what I'm doing wrong in my Insteon driver
> (iplcs.pm). I needed to know if I am spending more than 1
> second on each full X10 command. I created another function that
> prints the time more accurately and it works.
>
> --
> Linux Home Automation         Neil Cherry       [hidden email]
> http://www.linuxha.com/                         Main site
> http://linuxha.blogspot.com/                    My HA Blog
> http://home.comcast.net/~ncherry/               Backup site
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> ________________________________________________________
> To unsubscribe from this list, go to:
> http://sourceforge.net/mail/?group_id=1365
>
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: &main::print_log

Neil Cherry
David Norwood wrote:
> You realize XAGAK is two commands, right?  One approach you can take is
> to put each command into a queue, then only send commands to the serial
 > port if it's not blocking.

Actually it's 2 halfs of a full command. :-) Each 1/2 takes 1/2 a
second to be sent. I just found it weird that print_log says it
02:04:00 when I start sending and 02:04:01 when I'm done and MH
has paused for 12 seconds.

> ----- Original Message ----- From: "Neil Cherry" <[hidden email]>

>> I just discovered something really weird. I sent 6 full X10 commands
>> and I got back:
>>
>> 01/20/06 02:04:00 PM: Saving object states ... done
>> 01/20/06 02:04:01 PM XAGAK: xAG off
>> 01/20/06 02:04:01 PM XAGAK:  XAGAK
>> : (6 X10 commands sent)
>> 01/20/06 02:04:01 PM mh paused for 12 seconds (volume=40)

 >                             I took this approach in UIRT2.pm, except I
 > use a simple timer to space out the commands.  You can send a bunch of
 > IR signals and misterhouse won't pause.

I accidentally did the same things but I did that from the point
where I decide to send the X10 commands. I make each send the X10
command 1, 2, 3, ... seconds with timers. I'll take a look at the
code and see how you did it. Thanks

--
Linux Home Automation         Neil Cherry       [hidden email]
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
http://home.comcast.net/~ncherry/               Backup site


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: &main::print_log

David Norwood-3
From: "Neil Cherry" <[hidden email]>
> David Norwood wrote:
>> You realize XAGAK is two commands, right?  One approach you can take is
>> to put each command into a queue, then only send commands to the serial
>> port if it's not blocking.
>
> Actually it's 2 halfs of a full command. :-) Each 1/2 takes 1/2 a
> second to be sent. I just found it weird that print_log says it
> 02:04:00 when I start sending and 02:04:01 when I'm done and MH
> has paused for 12 seconds.

Well, ALL_LIGHTS_ON doesn't require a preceeding unit designator and I
consider it a "whole" command.  X10 transmitions don't always come in pairs.
Is that horse dead yet?   :)

Yeah, it's confusing that all print_log's that occur in a given pass have
the same timestamp.  Perhaps it should be changed to use the actual time
rather than $Time.

David



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: &main::print_log

Neil Cherry
David Norwood wrote:

> From: "Neil Cherry" <[hidden email]>
>> David Norwood wrote:
>>> You realize XAGAK is two commands, right?  One approach you can take
>>> is to put each command into a queue, then only send commands to the
>>> serial port if it's not blocking.
>>
>> Actually it's 2 halfs of a full command. :-) Each 1/2 takes 1/2 a
>> second to be sent. I just found it weird that print_log says it
>> 02:04:00 when I start sending and 02:04:01 when I'm done and MH
>> has paused for 12 seconds.
>
> Well, ALL_LIGHTS_ON doesn't require a preceeding unit designator and I
> consider it a "whole" command.  X10 transmitions don't always come in
> pairs. Is that horse dead yet?   :)

Hmm, when you describe it that way, yes you are correct (we may still
have to kick the horse again ;-).

> Yeah, it's confusing that all print_log's that occur in a given pass
> have the same timestamp.  Perhaps it should be changed to use the actual
> time rather than $Time.

Maybe we should add a print_precise_log routine. That way it
doesn't break anything existing. This what I created:

sub lprint_log {
     my $data = "@_";

     print localtime() . " " . $data . "\n";
}


--
Linux Home Automation         Neil Cherry       [hidden email]
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
http://home.comcast.net/~ncherry/               Backup site


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Loading...