error logs and controlling sound card mixer (errors)

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

error logs and controlling sound card mixer (errors)

peter-469
I have questions about how logging is supposed to work and am looking
for suggestions on what to do to get MH to control sound card mixer. I
am a little unclear on details of logging with MH.  I have searched and
not found clarity on either of these issues.

Where should I find logs that contain error messages and what might I be
doing wrong that is leaving me with only the transient messages in the
terminal window?

I have used http://www.usefulramblings.org/?page_id=2451 as a guide,
adapting it to git and have started over with a fresh install of Ubuntu
12.4 server. I added Webmin, and various other necessities. Mh is able
to speak, control a few X10 and Insteon items and plays Westminister
chimes as well as clicks on startup. For the time being I am starting MH
from the command line by typing mh. I send no parameters or options with
the command.

I found the faq that lists:
   x10
   serial
   socket
   startup
   homebase
   misc
   http
   port_name of socket port
as options. Insteon is not listed. Is this list missing other
categories? What category would be appropriate to catch mixer/sound issues?

I have this in my mh.private.ini:
log_file=/home/misterhouse/mhlog # should this be a path or path with
file name?
no_log=save_state,
debug=insteon:5,android,X10:5,owfs:5
debug_options=x10,serial,http,misc,startup,socket,password,user_code,weather,phone,


This is what I find in print.log:
12/03/12 03:44:42 PM Running: Test volume at 5
12/03/12 03:44:42 PM pre_speak_to_android
12/03/12 03:44:42 PM pre_speak_to_android rooms:
12/03/12 03:44:42 PM Setting mixer volume to 5
12/03/12 03:44:42 PM pre play to android
12/03/12 03:44:42 PM running: /usr/bin/aplay
/home/misterhouse/sounds/sound_beep1.wav

12/03/12 03:44:42 PM web_hook_callback:
12/03/12 03:44:45 PM Running: Test volume at 100
12/03/12 03:44:45 PM pre_speak_to_android
12/03/12 03:44:45 PM pre_speak_to_android rooms:
12/03/12 03:44:45 PM Setting mixer volume to 100
12/03/12 03:44:45 PM pre play to android
12/03/12 03:44:45 PM running: /usr/bin/aplay
/home/misterhouse/sounds/sound_beep1.wav

12/03/12 03:44:45 PM web_hook_callback:
12/03/12 03:45:00 PM pre play to android
12/03/12 03:45:00 PM running: /usr/bin/aplay
/home/misterhouse/sounds/chimes/west45.wav
print.log ends

This is what I get in the terminal window I started mh with (no startup
options) note the errors:
12/03/12 03:44:42 PM Running: Test volume at 5
normal: Testing volume at 5%
12/03/12 03:44:42 PM pre_speak_to_android
12/03/12 03:44:42 PM pre_speak_to_android rooms:
12/03/12 03:44:42 PM Setting mixer volume to 5
Error opening /dev/mixer.Error opening /dev/mixer.
12/03/12 03:44:42 PM pre play to android
12/03/12 03:44:42 PM running: /usr/bin/aplay
/home/misterhouse/sounds/sound_beep1.wav
Playing WAVE '/home/misterhouse/sounds/sound_beep1.wav' : Unsigned 8
bit, Rate 22050 Hz, Mono
12/03/12 03:44:42 PM web_hook_callback:
12/03/12 03:44:45 PM Running: Test volume at 100
normal: Testing volume at 100%
12/03/12 03:44:45 PM pre_speak_to_android
12/03/12 03:44:45 PM pre_speak_to_android rooms:
12/03/12 03:44:45 PM Setting mixer volume to 100
Error opening /dev/mixer.Error opening /dev/mixer.
12/03/12 03:44:45 PM pre play to android
12/03/12 03:44:45 PM running: /usr/bin/aplay
/home/misterhouse/sounds/sound_beep1.wav
Playing WAVE '/home/misterhouse/sounds/sound_beep1.wav' : Unsigned 8
bit, Rate 22050 Hz, Mono
12/03/12 03:44:45 PM web_hook_callback:
normal: (west45.wav)
12/03/12 03:45:00 PM pre play to android
12/03/12 03:45:00 PM running: /usr/bin/aplay
/home/misterhouse/sounds/chimes/west45.wav
Playing WAVE '/home/misterhouse/sounds/chimes/west45.wav' : Signed 16
bit Little Endian, Rate 22050 Hz, Mono

I am not finding errors that come up in the terminal window appear
anywhere else. I am thinking they should show up in a log file
somewhere. What am I missing? I also searched for additional log information

As indicated by errors above, MH cannot control the mixer the way it
wants to. The test produces audio that is intelligible but there is no
change in volume between any setting using the home/volume/test MH at n%
volume). I can use alsamixer to adjust volumes etc. when logged into
system via ssh (using same login to start MH). Output level varies as
commanded within that terminal session and stays at the level I set.
When I leave alsamixer, volume is not changed when MH plays sound as
expected considering the error.

Regards to all and thanks for your time.

Peter


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Reply | Threaded
Open this post in threaded view
|

Re: error logs and controlling sound card mixer (errors)

Dustin Robinson
This is the script I use to call MH.  It pipes the output into a log file I created at /var/log/misterhouse.log

This script and the init script that calls it I stole from the HOWTO here:
http://misterhouse.wikispaces.com/MisterhouseOnUbuntu

---------------------------
#!/bin/sh

# This is the script used to start misterhouse. It is called at boot by /etc/init.d/mh
export mh_parms=/etc/mh/mh.private.ini

# Start misterhouse
/opt/misterhouse/mh/bin/mh > /var/log/misterhouse.log 2>&1 &
-----------------------------

So if you are just calling mh with no optoins you could always just:

$ mh > {file you want to pipe you screen output to}

-D


On Tue, Dec 4, 2012 at 4:49 PM, Peter - MH <[hidden email]> wrote:
I have questions about how logging is supposed to work and am looking
for suggestions on what to do to get MH to control sound card mixer. I
am a little unclear on details of logging with MH.  I have searched and
not found clarity on either of these issues.

Where should I find logs that contain error messages and what might I be
doing wrong that is leaving me with only the transient messages in the
terminal window?

I have used http://www.usefulramblings.org/?page_id=2451 as a guide,
adapting it to git and have started over with a fresh install of Ubuntu
12.4 server. I added Webmin, and various other necessities. Mh is able
to speak, control a few X10 and Insteon items and plays Westminister
chimes as well as clicks on startup. For the time being I am starting MH
from the command line by typing mh. I send no parameters or options with
the command.

I found the faq that lists:
   x10
   serial
   socket
   startup
   homebase
   misc
   http
   port_name of socket port
as options. Insteon is not listed. Is this list missing other
categories? What category would be appropriate to catch mixer/sound issues?

I have this in my mh.private.ini:
log_file=/home/misterhouse/mhlog # should this be a path or path with
file name?
no_log=save_state,
debug=insteon:5,android,X10:5,owfs:5
debug_options=x10,serial,http,misc,startup,socket,password,user_code,weather,phone,


This is what I find in print.log:
12/03/12 03:44:42 PM Running: Test volume at 5
12/03/12 03:44:42 PM pre_speak_to_android
12/03/12 03:44:42 PM pre_speak_to_android rooms:
12/03/12 03:44:42 PM Setting mixer volume to 5
12/03/12 03:44:42 PM pre play to android
12/03/12 03:44:42 PM running: /usr/bin/aplay
/home/misterhouse/sounds/sound_beep1.wav

12/03/12 03:44:42 PM web_hook_callback:
12/03/12 03:44:45 PM Running: Test volume at 100
12/03/12 03:44:45 PM pre_speak_to_android
12/03/12 03:44:45 PM pre_speak_to_android rooms:
12/03/12 03:44:45 PM Setting mixer volume to 100
12/03/12 03:44:45 PM pre play to android
12/03/12 03:44:45 PM running: /usr/bin/aplay
/home/misterhouse/sounds/sound_beep1.wav

12/03/12 03:44:45 PM web_hook_callback:
12/03/12 03:45:00 PM pre play to android
12/03/12 03:45:00 PM running: /usr/bin/aplay
/home/misterhouse/sounds/chimes/west45.wav
print.log ends

This is what I get in the terminal window I started mh with (no startup
options) note the errors:
12/03/12 03:44:42 PM Running: Test volume at 5
normal: Testing volume at 5%
12/03/12 03:44:42 PM pre_speak_to_android
12/03/12 03:44:42 PM pre_speak_to_android rooms:
12/03/12 03:44:42 PM Setting mixer volume to 5
Error opening /dev/mixer.Error opening /dev/mixer.
12/03/12 03:44:42 PM pre play to android
12/03/12 03:44:42 PM running: /usr/bin/aplay
/home/misterhouse/sounds/sound_beep1.wav
Playing WAVE '/home/misterhouse/sounds/sound_beep1.wav' : Unsigned 8
bit, Rate 22050 Hz, Mono
12/03/12 03:44:42 PM web_hook_callback:
12/03/12 03:44:45 PM Running: Test volume at 100
normal: Testing volume at 100%
12/03/12 03:44:45 PM pre_speak_to_android
12/03/12 03:44:45 PM pre_speak_to_android rooms:
12/03/12 03:44:45 PM Setting mixer volume to 100
Error opening /dev/mixer.Error opening /dev/mixer.
12/03/12 03:44:45 PM pre play to android
12/03/12 03:44:45 PM running: /usr/bin/aplay
/home/misterhouse/sounds/sound_beep1.wav
Playing WAVE '/home/misterhouse/sounds/sound_beep1.wav' : Unsigned 8
bit, Rate 22050 Hz, Mono
12/03/12 03:44:45 PM web_hook_callback:
normal: (west45.wav)
12/03/12 03:45:00 PM pre play to android
12/03/12 03:45:00 PM running: /usr/bin/aplay
/home/misterhouse/sounds/chimes/west45.wav
Playing WAVE '/home/misterhouse/sounds/chimes/west45.wav' : Signed 16
bit Little Endian, Rate 22050 Hz, Mono

I am not finding errors that come up in the terminal window appear
anywhere else. I am thinking they should show up in a log file
somewhere. What am I missing? I also searched for additional log information

As indicated by errors above, MH cannot control the mixer the way it
wants to. The test produces audio that is intelligible but there is no
change in volume between any setting using the home/volume/test MH at n%
volume). I can use alsamixer to adjust volumes etc. when logged into
system via ssh (using same login to start MH). Output level varies as
commanded within that terminal session and stays at the level I set.
When I leave alsamixer, volume is not changed when MH plays sound as
expected considering the error.

Regards to all and thanks for your time.

Peter


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365



------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Reply | Threaded
Open this post in threaded view
|

Re: error logs and controlling sound card mixer (errors)

Jim Duda
Administrator
In reply to this post by peter-469
On 12/04/2012 04:49 PM, Peter - MH wrote:
> I have questions about how logging is supposed to work and am looking
> for suggestions on what to do to get MH to control sound card mixer. I
> am a little unclear on details of logging with MH.  I have searched and
> not found clarity on either of these issues.

snip

>
> I have this in my mh.private.ini:
> log_file=/home/misterhouse/mhlog # should this be a path or path with
> file name?

All of your logging will be found in the file you have identified above.

> normal: Testing volume at 5%
> 12/03/12 03:44:42 PM pre_speak_to_android
> 12/03/12 03:44:42 PM pre_speak_to_android rooms:
> 12/03/12 03:44:42 PM Setting mixer volume to 5
> Error opening /dev/mixer.Error opening /dev/mixer.
> 12/03/12 03:44:42 PM pre play to android
> 12/03/12 03:44:42 PM running: /usr/bin/aplay
> /home/misterhouse/sounds/sound_beep1.wav
> Playing WAVE '/home/misterhouse/sounds/sound_beep1.wav' : Unsigned 8
> bit, Rate 22050 Hz, Mono
>
> As indicated by errors above, MH cannot control the mixer the way it
> wants to. The test produces audio that is intelligible but there is no
> change in volume between any setting using the home/volume/test MH at n%
> volume). I can use alsamixer to adjust volumes etc. when logged into
> system via ssh (using same login to start MH). Output level varies as

Did you install the Audio::Mixer perl module from cpan as described
in the misterhouse installation instructions?

I don't use common/code/mh_sound.pl anymore, haven't for a while.
I suspect it might be caused by new linux installations which use
PulseAudio running on top of Alsa and the Audio::Mixer module might
want to be dealing with alsa directly.

Can you tell us if you are using pulseaudio or raw alsa in your
linux installation?

Regards,

Jim



------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Reply | Threaded
Open this post in threaded view
|

Re: error logs and controlling sound card mixer (errors)

peter-469
Thanks Jim,


On 12/5/2012 10:08 PM, Jim Duda wrote:

> On 12/04/2012 04:49 PM, Peter - MH wrote:
>> I have questions about how logging is supposed to work and am looking
>> for suggestions on what to do to get MH to control sound card mixer. I
>> am a little unclear on details of logging with MH.  I have searched and
>> not found clarity on either of these issues.
>
> snip
>
>>
>> I have this in my mh.private.ini:
>> log_file=/home/misterhouse/mhlog # should this be a path or path with
>> file name?
>
> All of your logging will be found in the file you have identified above.
Trouble is, the file isn't created and when present nothing is written
to it. I tried making it this:
/home/misterhouse/data/logs/mh2diagnostic.log
and the file is owned by MH and MH group.

Snip more

>
>> Error opening /dev/mixer.Error opening /dev/mixer.
>>
>> As indicated by errors above, MH cannot control the mixer the way it
>> wants to. The test produces audio that is intelligible but there is no
>> change in volume between any setting using the home/volume/test MH at n%
>> volume). I can use alsamixer to adjust volumes etc. when logged into
>> system via ssh (using same login to start MH). Output level varies as
>
> Did you install the Audio::Mixer perl module from cpan as described
> in the misterhouse installation instructions?

Yes, that was done early in the setup.

>
> I don't use common/code/mh_sound.pl anymore, haven't for a while.
> I suspect it might be caused by new linux installations which use
> PulseAudio running on top of Alsa and the Audio::Mixer module might
> want to be dealing with alsa directly.
>
> Can you tell us if you are using pulseaudio or raw alsa in your
> linux installation?
Not with any degree of certainty. I can only say that I see pulseaudio
packages which are clearly intended for system level operations - not
just to interface with a single application. If there was a conflict as
you suggest, would I see errors anywhere other than what I have
reported? I don't want to make things worse and end up wasting a lot of
time unbreaking sound etc. Can I just uninstall the pulseaudio stuff?

At this point I only anticipate using TTS a little (I am not statisfied
with what I get from flite) and playing wave files. No doubt I will add
too that but not soon - there is way too much other stuff I need to
figure out and get working...
>
> Regards,
>
> Jim
Snip

Thanks Jim.

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Reply | Threaded
Open this post in threaded view
|

Re: error logs and controlling sound card mixer (errors)

peter-469
In reply to this post by Dustin Robinson
Hi Dustin,

On 12/5/2012 2:26 PM, Dustin Robinson wrote:
> This is the script I use to call MH.  It pipes the output into a log
> file I created at /var/log/misterhouse.log
>
> This script and the init script that calls it I stole from the HOWTO here:
> http://misterhouse.wikispaces.com/MisterhouseOnUbuntu
>
I intended to revisit the area you refer to soon. I had tried that some
time ago on a failed attempt to get MH up and running (other issues).

snip
> So if you are just calling mh with no optoins you could always just:
>
> $ mh > {file you want to pipe you screen output to}
>
> -D
>
I still am unclear on why there is no output in the file I assign as the
log_file . Is it either terminal window or log file? It seems there is
no point in having the log_file parameter if I am forced to use the
method you suggest (though I appreciate the suggestion and may try it).

>
Snip

Thanks again Dustin for your input.

Regards,

Peter

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Reply | Threaded
Open this post in threaded view
|

Re: error logs and controlling sound card mixer (errors)

Jim Duda
Administrator
In reply to this post by peter-469
On 12/05/2012 11:55 PM, Peter - MH wrote:
>
> Trouble is, the file isn't created and when present nothing is written
> to it. I tried making it this:
> /home/misterhouse/data/logs/mh2diagnostic.log
> and the file is owned by MH and MH group.
>
Try this:

When you start misterhouse, use the -log_file argument.

Example:
/home/misterhouse/mh/bin/mh -log_file /home/misterhouse/logs/misterhouse.log

It turns out this is how I startup misterhouse too.  I thought the log_file
parameter in mh.ini would work, but maybe not.

> Not with any degree of certainty. I can only say that I see pulseaudio
> packages which are clearly intended for system level operations - not
> just to interface with a single application. If there was a conflict as
> you suggest, would I see errors anywhere other than what I have
> reported? I don't want to make things worse and end up wasting a lot of
> time unbreaking sound etc. Can I just uninstall the pulseaudio stuff?
>
> At this point I only anticipate using TTS a little (I am not statisfied
> with what I get from flite) and playing wave files. No doubt I will add
> too that but not soon - there is way too much other stuff I need to
> figure out and get working...

Try this:
ps ax | grep pulse

If pulseaudio is running, you'll see it as a process/program running.

Check to see if you have a /dev/dsp file.  This is what the AUdio::Mixer
attempts to control. I suspect you don't have that file/node.

What you might try to install the alsa-oss package.  This will give
you oss emulation, /dev/dsp.  After installing alsa-oss, you need
to modprobe snd-pcm-oss as root.  Not sure is this will help you
or not.

I personally don't find much use for automatic mh managed volume
control.  Well, I do use it somewhat with my Audrey devices, but
mainly just to mute.

I suggest you determine if you have pulseaudio installed.  If
you don't think you need it, you can either disable it or
remove it.  This will give you access to direct Alsa and the
existing volume controls in misterhouse should work for you.

If you want to continue to use pulseaudio, misterhouse should probably
have a means to control the volume and we could create something.

Regards,

Jim


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365