rytilahti/python-songpal

Hassio 0.101 songpal setup error

LintHart opened this issue · 2 comments

Hi mate, I’ve just updated to 0.101 from 99.2

I’m now getting this error which I saw a couple of people mention in the 0.100 blog.

Error while setting up platform songpal
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/src/homeassistant/homeassistant/components/songpal/media_player.py", line 90, in async_setup_platform
    await device.initialize()
  File "/usr/src/homeassistant/homeassistant/components/songpal/media_player.py", line 152, in initialize
    await self.dev.get_supported_methods()
  File "/usr/local/lib/python3.7/site-packages/songpal/device.py", line 127, in get_supported_methods
    response = await self.request_supported_methods()
  File "/usr/local/lib/python3.7/site-packages/songpal/device.py", line 119, in request_supported_methods
    return await self.create_post_request("getSupportedApiInfo")
  File "/usr/local/lib/python3.7/site-packages/songpal/device.py", line 104, in create_post_request
    res = await res.json()
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 1031, in json
    headers=self.headers)
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: ', url='http://192.168.1.29:54480/sony/guide

My previously working config is:

media_player:

  - platform: songpal
    name: Sony
    endpoint: http://192.168.1.29:54489/sony

Really hope you can help :) I’ve also tried port 1000 in line with homeassistant component docs

Linton

Hi, sorry to hear you got hit by this regression :-( This is a duplicate of #58 which has been already fixed, but the version bump did not get to the release: home-assistant/core#28115 – the next homeassistant version will fix this, I'll try to see if I can get it into a minor release (instead of 0.102.0) if there will be one.