pianobar
pianobar copied to clipboard
How to config for a fixed volume when pianobar starts?
It seems pianobar starts up at whatever volume it was set to when the client disconnected. Is there a way to define a fixed volume instead?
Typically, someone will turn down the volume all the way using their android phone. Then, next time someone connects, it seems like pianobar isn't working. Sometimes the rpi pianobar is running on DOES need rebooting, but mostly it's just because the volume was left down all the way.
I tried uncommenting the "volume=0" line in the config file, but that doesn't seem to have any affect.
Also, I never see anything but volume = 0 in .config/pianobar/state, even when the volume has been changed significantly.
I guess what I want to do is have a script adjust the volume at startup, if it is below a certain value.
Sorry for the delay. The file config
overrides state
, so you
should be able to define volume = 42
in config.
Which pianobar version are you using?
Version:
2016.6.02-dev
on rpi Jessie.
I got the pianobar volume to something reasonable and works fine, but I can't figure how where that's saved.
I need to understand how the volume is being controlled since Clementine runs on the same rpi and there seems to be an interaction between controlling its volume and pianobar volume.
Also, Clementine volume is MUCH lower than Pandora. I have to set Clementine volume to maximum to make it even close to PIanobar volume, and pianobar volume is no where near maximum. So, if volume is adjusted when Clementine is playing, then later, pianobar starts, it blasts the speakers.
Need to figure out how to fix this.
Thanks!
I got the pianobar volume to something reasonable and works fine, but I can't figure how where that's saved.
Usually ~/.config/pianobar/state
I need to understand how the volume is being controlled since Clementine runs on the same rpi and there seems to be an interaction between controlling its volume and pianobar volume. pianobar uses software volume control. Thus it should not interact/interfere with other programs. However it is limited by the global (ALSA/pulseaudio/…) volume control (obviously). I can’t help you with Clementine though.
~/.config/pianobar/state never seems to change, even when I change pianobar volume.
do not edit this file
volume = 0 autostart_station = 360792169351380896
The interaction may simply be a result of the downstream (in wall) volume control getting adjusted. It gets cranked up when clementine is playing, then blasts us out when pandora starts.
So, I just need to get both applications to start at a consistent volume. pianobar seems to remember its last volume session, but definitely no in ~/.config/pianobar/state on this rpil
pianobar seems to remember its last volume session, but definitely no in ~/.config/pianobar/state on this rpil It works for me. Note that pianobar updates this file only once, just before exiting.
Note that pianobar updates this file only once, just before exiting.
Maybe that's why I'm not seeing it. I rarely (never) close pianobar, just connect/reconnect from an Android remote. I'll try exiting from the command line and see if it changes.
Yes, that's it. So, is there a way to get the volume setting without first exiting pianobar? I guess my (to be written) script could close then reopen pianobar.
I don't think the Android remote will start pianobar, just attach to a running instance. So, I think pianobar always need to be running for my usage case.
Just realized I have the source. So, I can probably find where the volume is actually changed and hack the code to write to the file each time the volume is changed instead of at exit.
Let me know if you're interested in the changes.