Mpd assistance

I have a couple mpd servers built on pi1’s one works great.

number 2 is being a bear to add to HA.

my error log looks like NFO:homeassistant.components.media_player:Updating media_player entities DEBUG:mpd:Calling MPD status() DEBUG:mpd:Calling MPD currentsong() ERROR:homeassistant.core:BusHandler:Exception doing job Traceback (most recent call last): File "/usr/local/lib/python3.4/site-packages/homeassistant/core.py", line 821, in job_handler func(arg) File "/usr/local/lib/python3.4/site-packages/homeassistant/helpers/event.py", line 135, in pattern_time_change_listener action(now) File "/usr/local/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 125, in _update_entity_states entity.update_ha_state(True) File "/usr/local/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 102, in update_ha_state attr = self.state_attributes or {} File "/usr/local/lib/python3.4/site-packages/homeassistant/components/media_player/__init__.py", line 561, in state_attributes in ATTR_TO_PROPERTY if getattr(self, attr) is not None File "/usr/local/lib/python3.4/site-packages/homeassistant/components/media_player/__init__.py", line 561, in <dictcomp> in ATTR_TO_PROPERTY if getattr(self, attr) is not None File "/usr/local/lib/python3.4/site-packages/homeassistant/components/media_player/mpd.py", line 145, in media_title title = self.currentsong['title'] KeyError: 'title' DEBUG:requests.packages.urllib3.connectionpool:"POST /soap/server_sa/ HTTP/1.1" 200 1790

the config is

media_player 5: platform: mpd server: 192.168.50.179 port: 6600 location: Bedroom

my build notes of my steps are located at https://cy1701.wordpress.com/2016/01/02/bedroompi-mpd-notes/

i have rebuilt this one 3 or 4 times and it just won’t work with HA to test from outside I used droid mpd as a remote client.

any assistance is appreciated

I believe this is fixed here: github.com/balloob/home-assistant/pull/814

So if you want to try out the dev branch, you could see if it fixes your problem.

it fixed it for about 5 minutes.

Then I start to receive error below but I can still issue “/usr/bin/mpc -h 192.168.50.179 play 1” from the command line and the player responds but nothing is reflected in HA. and it is only this one mpd player

additional; it also takes out the other mpd device. Both display this error. I removed the new one and the old one is still working for over 30 minutes no issue. commented out old and added new back and it faulted after about 10 minutes.

ERROR:homeassistant.core:BusHandler:Exception doing job Traceback (most recent call last): File "/usr/local/lib/python3.4/site-packages/homeassistant/core.py", line 829, in job_handler func(arg) File "/usr/local/lib/python3.4/site-packages/homeassistant/helpers/event.py", line 135, in pattern_time_change_listener action(now) File "/usr/local/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 125, in _update_entity_states entity.update_ha_state(True) File "/usr/local/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 99, in update_ha_state self.update() File "/usr/local/lib/python3.4/site-packages/homeassistant/components/media_player/mpd.py", line 99, in update self.status = self.client.status() File "/home/pi/.homeassistant/lib/mpd.py", line 600, in decorator return wrapper(self, name, args, bound_decorator(self, returnValue)) File "/home/pi/.homeassistant/lib/mpd.py", line 238, in _execute return retval() File "/home/pi/.homeassistant/lib/mpd.py", line 595, in decorator return function(self, *args, **kwargs) File "/home/pi/.homeassistant/lib/mpd.py", line 388, in _fetch_object objs = list(self._read_objects()) File "/home/pi/.homeassistant/lib/mpd.py", line 316, in _read_objects for key, value in self._read_pairs(): File "/home/pi/.homeassistant/lib/mpd.py", line 295, in _read_pairs pair = self._read_pair(separator) File "/home/pi/.homeassistant/lib/mpd.py", line 286, in _read_pair line = self._read_line() File "/home/pi/.homeassistant/lib/mpd.py", line 266, in _read_line line = self._rfile.readline() File "/usr/local/lib/python3.4/socket.py", line 371, in readinto raise OSError("cannot read from timed out object") OSError: cannot read from timed out object