RE: MisterHouse Tiny

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

RE: MisterHouse Tiny

Edward Brookhouse-2
Hi all,

I too have been trying to come up with a tiny mh distro - My specific
purpose would be to make one small enough to imbed but still have the
ability to do tts ..Has anyone ever tried this?

TIA

Edward


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Ron
Klinkien
Sent: Thursday, January 19, 2006 9:32 AM
To: [hidden email]
Subject: [mh] MisterHouse Tiny


Hi,

I'm beginning to strip all of the stuff I don't use from MisterHouse's
distro,
it will not get mh to run any faster I think, but gives me more insight
in how it does it's job.

Because I run it on Linux only, I deleted the following code from
bin/mh, lib/http_server.pl and my code files

Perl_compiled
Tk_*
tk
MW
OS_win
Win32*

This leaves the following pseudocode in bin/mh, so you get an idea of
what gets run when.

Anyone knows why there are two BEGIN subs defined btw?

Regards,
Ron Klinkien

-------------
bin/mh:

BEGIN {

Determine Pgm_Path and Pgm_Name

} # End BEGIN

Declare subs and vars


BEGIN {

    &setup_INC;                  # Set lib include path
    &check_for_run_cmd;     # Run command if -run
    &print_version;                # Print version and other info
    &check_usage;                # Scan for .ini and start logging if needed
    &read_parms;
    &set_debug_data;
    &use_conditional_modules; # Load modules if needed for code
} # End BEGIN

&setup {
    &add_hook_code
    Include lots of modules
    Load DNS resolver
    Set SIGNALS
    Create data and http/tv dirs if missing

    &Voice_Cmd::init;
    &Voice_Text::init;

    Find and create server sockets (http etc)

    &xAP::startup;              # Start the xAP/xPL sockets, in
lib/xAP_Items.pm
    &EIB_Device::startup;  # Start the EIB device, in lib/EIB_Device.pm
 
    Find and create generic serial ports
    Find and create iButton ports
    Check for other modules defined in mh.ini and load them
    Startup proxy ports
    Create weeder_port if defined
    Create CM11_port if defined
    Create Homevision_port if defined
    Create Marrick_port if defined
    Create HomeBase_port if defined
    Create ncpuxa_port if defined
    Create use_wish if defined
    Create cm17_port if defined
    Store boottime

    Set get sleep time/count

    &persistent_restore();   # Populate %Save
    &setup_DBI();             # Create optional $DBI database interface

    Configure 'fast test mode' parms
    Create PID file
    Reading previous log files
    Archive old log files
    Read password file
}

&read_code {
    Re-reading $ENV{mh_parms} and mh.ini"
    Load Addresses and Password stuff
    &read_table_files();           # Re-create table code file, if any
table file changed
    Scan code dirs and read selected code
}

&monitor_commands {
    Starting monitor commands loop
    while (1) {
      &check_for_action {
      &check_for_keyboard_input
      &check_for_nextpass_actions
                return if $pause_mode;
      &set_global_vars
      &Process_Item::harvest                # Check for done processes  
      &Generic_Item::reset_states         # Reset states for all objects
that are 'ISA Item' ject
      &Voice_Cmd::check_for_voice_cmd   # Do this even if VR is not
installed, so we can do web and manual run_voice_cmd
      &check_for_proxy_data
      &check_for_serial_data {
           &check_for_cm11_data if $Serial_Ports{cm11}{object} and
$Serial_Ports{cm11}{object} ne 'proxy';
           &check_for_Homevision_data if $Serial_Ports{Homevision}{object};
           &check_for_HomeBase_data if $Serial_Ports{HomeBase}{object};
           &check_for_ncpuxa_data if $config_parms{ncpuxa_port};
           &check_for_generic_serial_data('weeder') if
$Serial_Ports{weeder}{object};
           for my $port_name (@Generic_Serial_Ports) {
               &check_for_generic_serial_data($port_name) if
$Serial_Ports{$port_name}{object};
           }
       }
       &check_for_socket_data_http
       &check_for_socket_data
       &check_for_tied_times if !$New_Minute;
       &Timer::check_for_timer_actions
       &check_for_external_command_file
    }
    }
}



-------------------------------------------------------
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
|

Re: MisterHouse Tiny

Robert Rozman

----- Original Message -----
From: "EB" <[hidden email]>
To: <[hidden email]>
Sent: Friday, January 20, 2006 2:06 AM
Subject: RE: [mh] MisterHouse Tiny


> Hi all,
>
> I too have been trying to come up with a tiny mh distro - My specific
> purpose would be to make one small enough to imbed but still have the
> ability to do tts ..Has anyone ever tried this?
>
Hi,

I also wanted to do similar. Strip down MH (no http server and some other
features) to make minimum Misterhouse. I think that the best option would be
to bring MH into state, where also hardcoded modules would be selectable for
inclusion for end program. I'm not sure how hard is to achieve this with MH-
but I ran into numerous occasions where I wanted to use just tiny MH to do
the job. Right now, I'm working on Pluto&Mh integration and I would also
like to have stripped down MH - so for now, I'm doing things in standalone
Perl script, that doesn't have much in common with Mh...

HTH,

regards,

Rob.



-------------------------------------------------------
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
|

RE: MisterHouse Tiny

Darek-3
In reply to this post by Edward Brookhouse-2
Hello,
I don't have answer for Ron, but I guess I might share my experience
with "tiny MH" Edward is asking about.

I run my MH on general-purpose house server (e-mail, dhcp, NTP, etc.),
and another machine is acting as TTS MH proxy. The server is stored in
remote safe place. For the proxy I bought some cheap Compaq with
intention to place it somewhere in my living room, so noise was my main
concern.

I removed noisy hdd and installed 256MB card flash with CF-ATA
converter. Then, it took me one day to customize Feather Linux (FL)
distro. When on CD, FL takes 50MB, but uncompressed it exceeds 256MB
which I had at my disposal!
So I installed FL on hdd and applied some brute force :-)  After
removal of XFree, X apps (editors, spreadsheet, etc.) I ended with
distro just around 200MB. So far, so good. FL is perfect for MH,
because it has full Perl available by default. Few Perl modules
were missing if I recall correctly, but I installed them either
from extra FL packages (some of them are on the Net) or from CPAN
directly.

A couple of startup scripts were created as well. The purpose was to
create 2 RAM disks:
- /dev/ram0, which mounts as /tmp
- /dev/ram1, which mounts as /var
and then copy a structure of /var (subdirectory names and empty files)
from second CF partition.
NOTE: I created two CF partitions:
- first for all Linux binaries, and this partition is mounted read-only
  as /
- second for "var tree", just used at system start.
When startup scripts were made, I had Linux distro that was able to
work read-only (important for CF cards!) and fitted in less than 220MB.

Then MH was installed. Again, I applied brute force and deleted plenty
of code and libraries which I didn't need. This took me another day
or so and was pretty interactive process: delete one or two libs, see
whether MH has survived and still works, if not, make some changes in
main code. When it works fine, delete another two libs or code modules...

Finally Linux and "basic MH" worked fine, so I installed "flite" TTS.
The only thing I don't like with flite is its build-in voice. It sounds
a bit annoying after a couple of months :-)  
But flite is so small that it perfectly fits my 256MB CF.

I use slightly customized "speak_proxy.pl" (on both server and proxy)
for server-to-proxy link.

When all this was done and proxy worked well, I just copied hdd to CF,
then modified lilo and voila!

Overall the end result was worth the efforts. I have pretty quiet
(just one low-noise PSU fan) proxy placed in living room, with
decent quailty TTS messages.

NOTE: prices for CF cards drop so fast, so I think one should rather
buy 512MB flash, install full Feather Linux, MisterHouse and festival
and not bother with squeezing the code into 256MB CF.
Money savings are not worth extra time spent on "customisation through
deletions".

Regards,
-Darek


EB wrote:

> Hi all,
>
> I too have been trying to come up with a tiny mh distro - My specific
> purpose would be to make one small enough to imbed but still have the
> ability to do tts ..Has anyone ever tried this?
>
> TIA
>
> Edward
>
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Ron
> Klinkien
> Sent: Thursday, January 19, 2006 9:32 AM
> To: [hidden email]
> Subject: [mh] MisterHouse Tiny
>
>
> Hi,
>
> I'm beginning to strip all of the stuff I don't use from MisterHouse's
> distro,
> it will not get mh to run any faster I think, but gives me more insight
> in how it does it's job.
>
> Because I run it on Linux only, I deleted the following code from
> bin/mh, lib/http_server.pl and my code files
>
> Perl_compiled
> Tk_*
> tk
> MW
> OS_win
> Win32*
>
> This leaves the following pseudocode in bin/mh, so you get an idea of
> what gets run when.
>
> Anyone knows why there are two BEGIN subs defined btw?
>
> Regards,
> Ron Klinkien



-------------------------------------------------------
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
|

Re: MisterHouse Tiny

Thomas Harding-2
Even 1 gig CF cards are reasonable now as well. I have one in my PocketPC
for movies, music and other stuff. Just imagine what you could get into 1
gig. I had an old IBM PC110 I ordered from Japan a few years ago. It was a
palmtop 486 about the size of a VCR tape. It had a bootable CF slot and
Win95 ran great from a 128mb CF card (basic install with only email and
web).


----- Original Message -----
From: "Darek" <[hidden email]>
To: <[hidden email]>
Sent: Friday, January 20, 2006 3:33 PM
Subject: RE: [mh] MisterHouse Tiny


> Hello,
> I don't have answer for Ron, but I guess I might share my experience
> with "tiny MH" Edward is asking about.
>
> I run my MH on general-purpose house server (e-mail, dhcp, NTP, etc.),
> and another machine is acting as TTS MH proxy. The server is stored in
> remote safe place. For the proxy I bought some cheap Compaq with
> intention to place it somewhere in my living room, so noise was my main
> concern.
>
> I removed noisy hdd and installed 256MB card flash with CF-ATA
> converter. Then, it took me one day to customize Feather Linux (FL)
> distro. When on CD, FL takes 50MB, but uncompressed it exceeds 256MB
> which I had at my disposal!
> So I installed FL on hdd and applied some brute force :-)  After
> removal of XFree, X apps (editors, spreadsheet, etc.) I ended with
> distro just around 200MB. So far, so good. FL is perfect for MH,
> because it has full Perl available by default. Few Perl modules
> were missing if I recall correctly, but I installed them either
> from extra FL packages (some of them are on the Net) or from CPAN
> directly.
>
> A couple of startup scripts were created as well. The purpose was to
> create 2 RAM disks:
> - /dev/ram0, which mounts as /tmp
> - /dev/ram1, which mounts as /var
> and then copy a structure of /var (subdirectory names and empty files)
> from second CF partition.
> NOTE: I created two CF partitions:
> - first for all Linux binaries, and this partition is mounted read-only
>  as /
> - second for "var tree", just used at system start.
> When startup scripts were made, I had Linux distro that was able to
> work read-only (important for CF cards!) and fitted in less than 220MB.
>
> Then MH was installed. Again, I applied brute force and deleted plenty
> of code and libraries which I didn't need. This took me another day
> or so and was pretty interactive process: delete one or two libs, see
> whether MH has survived and still works, if not, make some changes in
> main code. When it works fine, delete another two libs or code modules...
>
> Finally Linux and "basic MH" worked fine, so I installed "flite" TTS.
> The only thing I don't like with flite is its build-in voice. It sounds
> a bit annoying after a couple of months :-)
> But flite is so small that it perfectly fits my 256MB CF.
>
> I use slightly customized "speak_proxy.pl" (on both server and proxy)
> for server-to-proxy link.
>
> When all this was done and proxy worked well, I just copied hdd to CF,
> then modified lilo and voila!
>
> Overall the end result was worth the efforts. I have pretty quiet
> (just one low-noise PSU fan) proxy placed in living room, with
> decent quailty TTS messages.
>
> NOTE: prices for CF cards drop so fast, so I think one should rather
> buy 512MB flash, install full Feather Linux, MisterHouse and festival
> and not bother with squeezing the code into 256MB CF.
> Money savings are not worth extra time spent on "customisation through
> deletions".
>
> Regards,
> -Darek
>
>
> EB wrote:
>
>> Hi all,
>>
>> I too have been trying to come up with a tiny mh distro - My specific
>> purpose would be to make one small enough to imbed but still have the
>> ability to do tts ..Has anyone ever tried this?
>>
>> TIA
>>
>> Edward
>>
>>
>> -----Original Message-----
>> From: [hidden email]
>> [mailto:[hidden email]] On Behalf Of Ron
>> Klinkien
>> Sent: Thursday, January 19, 2006 9:32 AM
>> To: [hidden email]
>> Subject: [mh] MisterHouse Tiny
>>
>>
>> Hi,
>>
>> I'm beginning to strip all of the stuff I don't use from MisterHouse's
>> distro,
>> it will not get mh to run any faster I think, but gives me more insight
>> in how it does it's job.
>>
>> Because I run it on Linux only, I deleted the following code from
>> bin/mh, lib/http_server.pl and my code files
>>
>> Perl_compiled
>> Tk_*
>> tk
>> MW
>> OS_win
>> Win32*
>>
>> This leaves the following pseudocode in bin/mh, so you get an idea of
>> what gets run when.
>>
>> Anyone knows why there are two BEGIN subs defined btw?
>>
>> Regards,
>> Ron Klinkien
>
>
>
> -------------------------------------------------------
> 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
|

RE: MisterHouse Tiny

Edward Brookhouse-2
In reply to this post by Darek-3
Thanks Darek, I think I will give that a go!

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Darek
Sent: Friday, January 20, 2006 3:33 PM
To: [hidden email]
Subject: RE: [mh] MisterHouse Tiny

Hello,
I don't have answer for Ron, but I guess I might share my experience
with "tiny MH" Edward is asking about.

I run my MH on general-purpose house server (e-mail, dhcp, NTP, etc.),
and another machine is acting as TTS MH proxy. The server is stored in
remote safe place. For the proxy I bought some cheap Compaq with
intention to place it somewhere in my living room, so noise was my main
concern.

I removed noisy hdd and installed 256MB card flash with CF-ATA
converter. Then, it took me one day to customize Feather Linux (FL)
distro. When on CD, FL takes 50MB, but uncompressed it exceeds 256MB
which I had at my disposal!
So I installed FL on hdd and applied some brute force :-)  After
removal of XFree, X apps (editors, spreadsheet, etc.) I ended with
distro just around 200MB. So far, so good. FL is perfect for MH,
because it has full Perl available by default. Few Perl modules
were missing if I recall correctly, but I installed them either
from extra FL packages (some of them are on the Net) or from CPAN
directly.

A couple of startup scripts were created as well. The purpose was to
create 2 RAM disks:
- /dev/ram0, which mounts as /tmp
- /dev/ram1, which mounts as /var
and then copy a structure of /var (subdirectory names and empty files)
from second CF partition.
NOTE: I created two CF partitions:
- first for all Linux binaries, and this partition is mounted read-only
  as /
- second for "var tree", just used at system start.
When startup scripts were made, I had Linux distro that was able to
work read-only (important for CF cards!) and fitted in less than 220MB.

Then MH was installed. Again, I applied brute force and deleted plenty
of code and libraries which I didn't need. This took me another day
or so and was pretty interactive process: delete one or two libs, see
whether MH has survived and still works, if not, make some changes in
main code. When it works fine, delete another two libs or code modules...

Finally Linux and "basic MH" worked fine, so I installed "flite" TTS.
The only thing I don't like with flite is its build-in voice. It sounds
a bit annoying after a couple of months :-)  
But flite is so small that it perfectly fits my 256MB CF.

I use slightly customized "speak_proxy.pl" (on both server and proxy)
for server-to-proxy link.

When all this was done and proxy worked well, I just copied hdd to CF,
then modified lilo and voila!

Overall the end result was worth the efforts. I have pretty quiet
(just one low-noise PSU fan) proxy placed in living room, with
decent quailty TTS messages.

NOTE: prices for CF cards drop so fast, so I think one should rather
buy 512MB flash, install full Feather Linux, MisterHouse and festival
and not bother with squeezing the code into 256MB CF.
Money savings are not worth extra time spent on "customisation through
deletions".

Regards,
-Darek


EB wrote:

> Hi all,
>
> I too have been trying to come up with a tiny mh distro - My specific
> purpose would be to make one small enough to imbed but still have the
> ability to do tts ..Has anyone ever tried this?
>
> TIA
>
> Edward
>
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Ron
> Klinkien
> Sent: Thursday, January 19, 2006 9:32 AM
> To: [hidden email]
> Subject: [mh] MisterHouse Tiny
>
>
> Hi,
>
> I'm beginning to strip all of the stuff I don't use from MisterHouse's
> distro,
> it will not get mh to run any faster I think, but gives me more insight
> in how it does it's job.
>
> Because I run it on Linux only, I deleted the following code from
> bin/mh, lib/http_server.pl and my code files
>
> Perl_compiled
> Tk_*
> tk
> MW
> OS_win
> Win32*
>
> This leaves the following pseudocode in bin/mh, so you get an idea of
> what gets run when.
>
> Anyone knows why there are two BEGIN subs defined btw?
>
> Regards,
> Ron Klinkien



-------------------------------------------------------
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