I have not used the new property_changed method yet, but what you propose
seems reasonable. Your are enabling control of your objects internal timer
by simply reseting the mh_timer_tic data. The other option, which we use in
most other objects, is to allow control of things like this only through
object methods.
Your change to Generic_Item seems good. It allows the property_changed
method to fire if either the old or new value was undefined, whereas the way
we had it before only fired when old and new were both defined. I'll add
it to today's release.
Bruce
-----Original Message-----
Howdy,
In trying to restore a subclass of Generic_Item, I would like to restore the
current state of a Timer using the property_change method while
mh_temp.saved_states is evaluated.
package Generic_Item_Subclass;
@Generic_Item_Subclass::ISA = ('Generic_Item');
sub new
{
my ($class) = @_;
my $self = $class->Generic_Item::new();
bless $self, $class;
# TIMER
$$self{my_timer} = new Timer();
$$self{my_timer_tic} = 0;
$self->restore_data('my_timer_tic'); # save when my_timer should expire
return $self;
}
...
sub property_changed
{
my ($self, $property, $new_value, $old_value) = @_;
if($property eq 'my_timer_tic')
{
my $l_secs = int(($new_value - &::get_tickcount)/1000);
my $l_timer = $$self{my_timer};
# RESET TIMER HERE
}
}
#1) Does this seem reasonable?
#2) Should Generic_Item.pm (Line 12-14) be changed to the following:
if((defined $oldValue != defined $_[2]) or (defined $oldValue and
$oldValue ne $_[2])) {
$_[0][1]->property_changed($_[1],$_[2], $oldValue);
}
Thanks,
-Steven
!DSPAM:409406b735271043085168!

> I have been using mh for a few days now and I am extremely
> impressed and love
> everything about it. I have everything running fairly smoothly and am now
> begging to tackle my X10 needs.
>
> I have a CM11a and a few modules setup around the house (house
> codes A1 and A2).
>
> I have tested that COM1 works using ActiveHome to turn on/off
> A1/A2 without
> problems.
>
> I have added "cm11_port=COM1" to my.private.ini.
>
> I have added two entries in my "house.mht" file and reloaded the files.
>
> I see the new voice commands that were automatically created by
> "x10_item_commands.pl"
>
> I try to execute a on/off for either item and NOTHING!
>
> Any thoughts or suggestions on how I can debug this and get it
> working. I have
> scanned through the newsgroup, faq, twiki, and the documentation
> and haven't
> found anything specific to help me through this.
>
> TIA for any assistance that you might provide.
> Steve
Hi Steve. Try running: mh -debug x10 (or setting the debug flag to x10 in
the tk or web menu). That will enable additional data to the console.
A common problem is something else is using the com port (e.g. activehome).
Does the startup errata show that mh opens the COM1 port ok?
Bruce

I have been using mh for a few days now and I am extremely impressed and love
everything about it. I have everything running fairly smoothly and am now
begging to tackle my X10 needs.
I have a CM11a and a few modules setup around the house (house codes A1 and A2).
I have tested that COM1 works using ActiveHome to turn on/off A1/A2 without
problems.
I have added "cm11_port=COM1" to my.private.ini.
I have added two entries in my "house.mht" file and reloaded the files.
I see the new voice commands that were automatically created by
"x10_item_commands.pl"
I try to execute a on/off for either item and NOTHING!
Any thoughts or suggestions on how I can debug this and get it working. I have
scanned through the newsgroup, faq, twiki, and the documentation and haven't
found anything specific to help me through this.
TIA for any assistance that you might provide.
Steve

Hi everyone,
I've started seeing a little mold in my master bathroom and so I need to run
the exhaust fan longer after each shower. The problem is, of course, that
I'm long gone before the exhaust fan needs to be turned off.
I've considered two approaches that would involve an X10 fan switch:
1. Use occupancy monitoring to run the fan for x minutes following the last
person leaving the bathroom. I could use the Caddx code for this.
2. Use a humidity sensor to shut the fan down once a humidity threshold is
reached. Ideally, I would use a reference sensor somewhere else in the house
to determine when to shut off the fan.
I have Cat5 and RG6 running throughout the house.
Is there an inexpensive source of humidity sensors that can be interfaced
with MH?
-Tim
--
Tim Wilson
Twin Cities, Minnesota, USA
Educational technology guy, Linux and OS X fan, Grad. student, Daddy
mailto: wilson@... aim: tis270 public key: 0x8C0F8813

> Hi. I have included the necessary lines that are tripping me up on this
> run_after_delay problem. I believe I tried all the suggestions posted
> in the last couple days (thanks). Ideally, I would like to run this
> copy cmd as a process to avoid any MH delays but the problem with the
> quotes is causing me problems there as well. Having the quadriple
> quotes necessary in windows for pointing to a file on a networked PC
> might be part of the problem too. Any additional help here would be
> much appreciated. Thanks, Linc
>
>
> #Define file grabbed cam image will be written to;
> my $imageFile="c:\\Misterhouse\\mh\\data\\photos\\conquerCam.jpg";
>
> #Define path for copied and renamed grabbed camera image;
> my $webPath="\\\\Wxserver\\c\\apache2\\htdocs\\WUW\\House_images\\";
>
>
> #run_after_delay 2, "run_voice_cmd 'copy imageFiles'"; # didn't work
> ;
>
> #run_after_delay 2, "copy($imageFile,'$webPath $activeCam.jpg')";#
> didn't work;
Give this a try:
my $webPath = '//Wxserver/c/apache2/htdocs/WUW/House_images/";
run_after_delay 2, "copy($imageFile, '$webPath/$activeCam.jpg')";
You can avoid escaping the messy \ character by using / instead. As long
as the directory strings are used within perl, and not in a string that is
passed to an external system (windows) command, then you can use /, as perl
treats paths with either \ or / the same.
Bruce

> I've been trying to change the speak voice with no luck.
>
> I'm running MH 2.89 (Windows - using MS Speech SDK 4)
>
> I've tried changing the 'speak_voice=mary'
>
> as well as
>
> speak "voice=mary This is a test";
>
>
> Any help appreciated.
>
> Jack
Hmmm, just tried it here and it is working ok with MS speech SDK 5. I don't
have SDK 4 installed here to test. The SDK 5 voices work ok. Here is what
I see with voice_text=Mike16, with -debug voice:
input phrase is '<voice required='Name=Mike16'> yo </voice>'
Try that debug and see what you get. Do you get no speech, or just the
wrong voice? Any errata in the log?
Bruce

Hi. I have included the necessary lines that are tripping me up on this
run_after_delay problem. I believe I tried all the suggestions posted
in the last couple days (thanks). Ideally, I would like to run this
copy cmd as a process to avoid any MH delays but the problem with the
quotes is causing me problems there as well. Having the quadriple
quotes necessary in windows for pointing to a file on a networked PC
might be part of the problem too. Any additional help here would be
much appreciated. Thanks, Linc
#Define file grabbed cam image will be written to;
my $imageFile="c:\\Misterhouse\\mh\\data\\photos\\conquerCam.jpg";
#Define path for copied and renamed grabbed camera image;
my $webPath="\\\\Wxserver\\c\\apache2\\htdocs\\WUW\\House_images\\";
#run_after_delay 2, "run_voice_cmd 'copy imageFiles'"; # didn't work
;
#run_after_delay 2, qq|copy($imageFile,"$webPath $activeCam.jpg")|;#
didn't work;
#run_after_delay 2, "copy($imageFile,'$webPath $activeCam.jpg')";#
didn't work;
#run_after_delay 2, "copy($imageFile,\"$webPath $activeCam.jpg\")";#
didn't work;
if(state=said $v_scanCams){
set $p_copyFiles 'copy($imageFile,"$webPath $imageFile")';
#set $p_copyFiles "copy($imageFile,$webFile)";
set_timeout $p_copyFiles 30;
start $p_copyFiles;
}

I have a bunch of video and IR-distribution stuff that I no longer need.
I figured I'd email this list before I list it on eBay. If you are
interested in something, let me know!
Video
-----
3x *Powered* Coax splitters
Two with 2 outputs
One with 4 outputs
2x Coax splitters
One with 2 outputs
One with 3 outputs
Radio Shack manual coax switchbox: 2-in, 1-out
Powered audio/video splitter 1->3:
One set of RCA inputs (video/left/right)
Three sets of RCA outputs
2x RF Modulators
Both have cable in, modulated out -- passes cable through unless RCA
inputs have a signal, in which case that signal is modulated on ch3/4
(and the input cable signal is ignored). Basically standard ch3/4
modulators. One also has S-Video input.
IR
---
These are the X10.com PowerMid wireless IR distribution system. You can
have any number of inputs and outputs. The inputs are simply pyramids
that receives IR and transmits it over RF. The outputs are pyramids
with antennaes that receive RF and send out IR. You need at least one
input and one output.
2x Receiver/IR emitters (outputs): x10.com, RE549
3x IR sensor/transmitter (inputs): x10.com, ST539
You can also plug in an IR blaster to the IR emitter units.
X10
---
Two X10 tranceiver modules (receives wireless X10 signals from motion
detectors, remotes, and other wireless X10 devices and creates
X10 signals on the powerline... also has relay to control one device)
The manuals are online (x10.com): RR501 and TM751.
One VCR Commander2 (from x10.com): used along with a video camera and
motion detector to record interesting activity from the camera onto
tape. Manaual is online at x10.com: UX23A.
Wireless video sender: Transmits video wirelessly (2.4Ghz)... also does
something with IR but you'd have to check the manual. Has RCA inputs
(video/stereo audio). Manual on x10.com: VT32A.
Wireless video receiver: Receives video from above sender or from
wireless x10.com cameras. Has both RCA outputs and ch3/4 RF (i.e. coax)
output. Manual on x10.com: VT30A.

I've been trying to change the speak voice with no luck.
I'm running MH 2.89 (Windows - using MS Speech SDK 4)
I've tried changing the 'speak_voice=mary'
as well as
speak "voice=mary This is a test";
Any help appreciated.
Jack

> >> I have a bunch of video/IR distribution equipment and
> X10.com stuff that
> >> I want to sell... is it appropriate to send an email to the
> Misterhouse
> >> list about it to give people a shot at the stuff before I list it on
> >> Ebay?
>
> >> If not, no big deal... just asking.
>
> A well run oldtools like I belong to has a FMM (flea market
> monday) policy.
> You can post your FS: (for sale) list each Monday. It seems to
> work great,
> perhaps a similar feature for Misterhouse's list would be great?
>
> Alan
I have no problem with occasional non-commercial posts. FS: on the subject
line sounds like a good idea. If others object we can vote on it.
Bruce

> > The line below needs the contents after the first comma in double
> > quotes. Two sets of double quotes is not taken to kindly by perl here.
> >
> > run_after_delay 2, copy($imageFile,"$webPath $activeCam.jpg");
> >
> If I understand the question correctly then use a backslash to "escape"
> the quote like this:
>
> "\"$webPath $activeCam.jpg\""
Another option is to define your own quote character using qq. For example,
this uses |
run_after_delay 2, qq|copy($imageFile, "$webPath $activeCam.jpg")|;
Another option is to use single quotes on the inner string:
run_after_delay 2, "copy($imageFile, '$webPath $activeCam.jpg')";
You can use ' (or q|) if there are no variables in your string that you want
substituted. Use " (or qq|) for strings with variables in them.
Bruce

> Hi Bruce,
>
> I was looking through the authors list and noticed that quite a few false
> positives had made it past your "flaky heuristics". I've been through and
> compiled a list of words that could be added to the "bogus" lists.
Thanks, got bin/authors updated.
Bruce

> using httpq - works ok from web page address line -
> when trying from mh gives error:
> The Web RUN command not found: Set the house mp3 player to Play.
> I have check all the paths etc. Any ideas for troubleshooting?
Have you enabled common/mp3_winamp.pl? You also need mh.ini parm
mp3_program_control=httpq
Bruce