From: Larry R. <lo...@co...> - 2003-11-08 16:25:42
|
Maybe you need to control how many times a second you want to check this and you may also want to check to see if $test is on before you reset it back on. Just a thought Larry mitchd123 wrote: >I want to use an electric heater for my dog, plugged into an x10. I want to >only turn it on if the temperature is below 50 degrees F. To keep things >simple for now I just want to use the internet temperature. > >1) I enabled the common code of internet_weather.pl Verified >internet_weather worked, X10 and $test worked, etc. > >2) I created test.pl in my code directory. $Weather{TempInternet} a >variable from the common code of internet_weather.pl. The test.pl >contains one line: > >set $test ON if ($Weather{TempInternet} < '51'); > >When MH starts, the test light turns on fine. > >The problem is the MH interface become very unresponsive. if I click on the >menu "items" it takes 25 seconds just for the menu to appear/open. Any >ideas why? CPU <10 %, Memory is fine too, <25 meg > >I also tried: set $test ON if ($Weather{TempInternet} lt '51'); > >Thanks in advance for any advice, > >David > >Details: > >perl -v >This is perl, v5.8.0 built for i386-linux-thread-multi >(with 1 registered patch, see perl -V for more detail) > >uname -a >Linux gw 2.4.20 #1 Wed Jan 29 23:10:58 EST 2003 i586 i586 i386 GNU/Linux > >Command: /usr/local/mh/bin/mhe -help >Pgm path : /usr/local/mh/bin >Pgm version: 2.82 (compiler: PAR 0.69) Last updated: Sun Jul 6 14:16:17 >2003 >Perl version: 5.008 >OS version: linux linux > >startup: >Simple mixer control 'Master',0 > Capabilities: pvolume pswitch > Playback channels: Front Left - Front Right > Limits: Playback 0 - 15 > Front Left: Playback 14 [93%] [off] > Front Right: Playback 14 [93%] [off] > >Command: /usr/local/mh/bin/mhe >Pgm path : /usr/local/mh/bin >Pgm version: 2.82 (compiler: PAR 0.69) Last updated: Sun Jul 6 14:16:17 >2003 >Perl version: 5.008 >OS version: linux linux >Other : user=root pid=5332 box=gw cpu=- > >Read parm files: ./mh.ini ./mh.private.ini /djm/app/mh/mh.private.ini >Code Directories: > - /djm/app/mh/code > - ./../code/common >Device::Serial could not find ioctl definitions! >Loading Tk modules Version 800.024 >Loading other modules >Starting setup >Creating festival TTS socket on localhost:1314 >Data sent to festival: (Parameter.set 'Audio_Method >'Audio_Command)(Parameter.set 'Audio_Required_Rate 16000)(Parameter.set >'Audio_Required_Format 'au)(Parameter.set 'Audio_Command "esdplay $FILE") >Creating socket and serial objects > - creating http on tcp 80 buffered > - creating server_mhsend on tcp 8084 buffered > - creating server_telnet on tcp 1234 raw > - creating cm11 object on port /dev/ttyS0 >disabling ioctl methods - constants not found >Process id 5332 written to /djm/app/mh/data/mh.pid >Setting up tk window >Reading previous log files >Archiving previous /djm/app/mh/data/logs/*.log files .... >External command file (xcmd_file): ./../house_cmd.txt >HTML file : ./../web//ia5/index.shtml >Reading password from /djm/app/mh/data/.password >Read in 10 items from ./../data/password_allow >Read in 1 commands from from ./../data/disabled_commands >Done with setup > >11/08/03 09:26:16 AM Re-reading /djm/app/mh/mh.private.ini and mh.ini > html_alias alias /docs dir does not exist, dir=./../docs >Voice names: >Read 6 entries from ./../data/pronouncable_words.list >Read 380 codes from ./../data/phone/phone.area_codes.list >Read 4 entries from ./../data/phone/phone.caller_id.list >11/08/03 09:26:16 AM Translating items.mht -> /djm/app/mh/code/items.mhp >11/08/03 09:26:16 AM Initialized read_table_A.pl >Reading code_dirs: /djm/app/mh/code ./../code/common >11/08/03 09:26:16 AM Reading 17 code files >Duplicate file. > - Used: /djm/app/mh/code/trivia.pl > - Skipped: ./../code/common/trivia.pl > >11/08/03 09:26:16 AM Evaluating user code > >Good code saved >running: play ./../sounds/sound_click1.wav >Restoring object states >Object states restored >Activate the voice commands >Starting monitor commands loop > >Latitude: 41.778611, Longitude: 71.530556, Time Zone: 5 >sunrise=6:54 AM sunset=5:01 PM >sunrise twilight=6:25 AM sunset twilight=5:30 PM >The moon is Full, 99% bright, and 14 days old >The next full moon is on Monday, December 8th >Creating new tk frames >Creating Tk Command menu >Creating Tk Items menu >Creating Tk Groups menu >Setting tk geometry to +0+0 > > > > > > >------------------------------------------------------- >This SF.Net email sponsored by: ApacheCon 2003, >16-19 November in Las Vegas. Learn firsthand the latest >developments in Apache, PHP, Perl, XML, Java, MySQL, >WebDAV, and more! http://www.apachecon.com/ >________________________________________________________ >To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365 > > > > |