New user here, getting HA setup and really liking how much I can do with it. We use Pandora around the house for background music so I decided to use that component but am running into a hiccup.
I have pianobar setup can run it via command line (without ha) and it auto logs in. Music plays everything is great.
However, when trying to use it from HA it cannot run it and I am getting a log-in error in log.
16-09-16 09:22:44 homeassistant.components.media_player.pandora: The pianobar client is not configured to log in. Please create a config file for it as described at https://home-assistant.io/components/media_player.pandora/
yes, I have a working config file. If I run via command line piano bar runs, and will auto login. To me this says that the config file is in place and working and should be working with HA too. Not sure where I am going wrong.
I would guess that you are running hass under a different user than the one you are running the command line from - that might explain why hass canāt find it since it expects the config in the users home directory.
When installing extras like pianobar or the rf switch component should I be logged in as my general pi user, hass or the virtual environment under hass?
Im guessing this may be the source of a lot of my problems.
On a raspberry pi 2, rasbian jessie, and HA 0.28.2
If you installed HA in a Virtual environment you will need to have the environment activated if you do any kind of python installation. The user does not matter for that.
In the piano scenario the user did matter because of the way piano expects to find configuration files.
Can someone tell me the location that the pianobar files need to go on windows? If i add them to root of the ādepsā folder it appears to load in home assistant but pressing play or really doing anything does not work.
Can someone please share what the proper location for the exe and cfg file are?
Iām also having trouble with Pianobar - not sure whether itās better to follow up this discussion or start a a new one. Iām running HA on Fedora 25. I built pianobar from scratch, using the latest source from git://github.com/PromyLOPh/pianobar.git
Iām running HA as the āhomeassistantā user, and when I login as āhomeassistantā I can run pianobar from the command line just fine. (Iām able to hear music, change tracks, change stations, etc.) However, when I start the āPandoraā media player from the web interface, it never goes active. Looking at the log file, it looks like it starts pianobar, connects, and starts parsing the list of stations, but then times out. It seems like it might be looking for something in the output that itās never finding. Is it possible that my pianobar (it reports version 2016.06.02-dev) is too recent and thus incompatible in some way? Is there a way to debug the handshake with the command line client?
You need to put in the config file default station ID to play. Otherwise, you will need to select which station to play from ha interface. Google default station ID for pianobar you should get the how to. It involves two steps: figure out the station ID (not the index number) then put that value into /home/homeassistant/.config/pianobar/config.
Thanks for the quck response. . Unfortunately, that doesnāt seem to help in my situation. WIth or without the autostart= in the config file, it never gets far enough along for me to see any stations. When I click the āpowerā icon on the Pandora entry, I can see that pianbar is started (by looking at āpsā and the log entries about parsing stations), but it never leaves the āoffā state - so no way to get a station list.
I ran it under strace, and it looks like the problem is at this block in pandora.pyā¦
235 def _query_for_playing_status(self):
236 """Query system for info about current track."""
237 import pexpect
238 self._clear_buffer()
239 self._pianobar.send('i')
240 try:
241 match_idx = self._pianobar.expect([br'(\d\d):(\d\d)/(\d\d):(\d\d)',
242 'No song playing',
243 'Select station',
244 'Receiving new playlist'])
HA is sending it the āiā command, but what it gets back is not one of the expected responses:
Which version you are on? Iām still on .38.3 and it plays my station when I hit the Power icon. Perhaps itās a bug on yours? If you launch pianobar as homeassistant user in terminal, does it play? That should also indicate if itās HA or pianobar issue.
Getting closerā¦ Iām not sure if Iāve worked out all the issues to make it completely reproducible. But one problem seems to be that pianobar does not work when launched from inside HA because it canāt connect to DBUS. I changed /usr/local/bin/pianobar to a shell script that first sets $DISPLAY to the console where user homeassistant is logged in, and then launches the real pianobar.
And it works!! Pandora starts up playing my default station, and I can switch to any of my other stations by selecting from the list!
There are still a few rough edges to work out. Iām only able to make it work if I first login on the console as āhomeassistantā and (maybe?) configure pulseaudio to connect to the proper output using the GUI. And I have to stay logged in on the console for it to keep working. It would be nice if I could get those steps more automatic, but I think Iām heading down the right path!
Did you ever get this resolved? I did a fresh install of HA. I havenāt used it in over a year. I had pandora working in the past. This time, I couldnāt follow the HA instructions since things have changed but I got it installed.
I can run it from CLI but nothing happens when I use it in the GUI.
Does anyone still use this integration and, if so is it still working? Also, I am a bit confused about how it works. For this to work does my HA instance have to be on the same Pi as is running Pianobar? I have Home Assistant running on HA Blue. If I install pianobar and log-in to Pandora on a separate Pi on my network and add the pi command to my config file can HA āfindā the integration on my network?
If not, is there anyway similar to install pianobar on the HA Blue?