Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Issue #85

Closed
lucasimons opened this issue Jul 27, 2022 · 4 comments
Closed

Issue #85

lucasimons opened this issue Jul 27, 2022 · 4 comments

Comments

@lucasimons
Copy link

the player works fine but i have this worning

Logger: homeassistant.helpers.entity
Source: custom_components/linkplay/media_player.py:441
Integration: Linkplay ([documentation](https://github.com/nagyrobi/home-assistant-custom-components-linkplay), [issues](https://github.com/nagyrobi/home-assistant-custom-components-linkplay/issues))
First occurred: 18:39:30 (61 occurrences)
Last logged: 18:42:21

Update for media_player.seeme_hifi fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 514, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 709, in async_device_update
    raise exc
  File "/config/custom_components/linkplay/media_player.py", line 560, in async_update
    await self.async_get_status(no_throttle=True)
  File "/config/custom_components/linkplay/media_player.py", line 490, in async_get_status
    resp = await self.async_call_linkplay_httpapi("getPlayerStatus", True)
  File "/config/custom_components/linkplay/media_player.py", line 441, in async_call_linkplay_httpapi
    data = await response.json(content_type=None)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1119, in json
    return loads(stripped.decode(encoding))
  File "/usr/local/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.10/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 1 column 134 (char 133)

@nagyrobi
Copy link
Owner

nagyrobi commented Jul 27, 2022

Seems like the API of your player is different.

Please post output of:
http://your.player.ip/httpapi.asp?command=getStatusEx
http://your.player.ip/httpapi.asp?command=getStatus

@lucasimons
Copy link
Author

lucasimons commented Jul 27, 2022

the problem is an automation if i use this service doesen t work

service: tts.google_say
data:
  entity_id: media_player.seeme_hifi
  message: la potenza attuale è {{states('sensor.potenza') | int}}  watt
  language: it
  cache: false

instead if i use this, it works fine

service: tts.google_say
data:
  entity_id: media_player.seeme_hifi
  message: la potenza  è {{states('sensor.potenza') | int}}  watt
  language: it
  cache: false

i recently update HA to

Home Assistant 2022.7.7
Supervisor 2022.07.0
Operating System 8.4
Frontend 20220707.1 - latest

if i use a different speaker works but if i use the speacker connected with linkplay give me the error

@lucasimons
Copy link
Author

lucasimons commented Jul 27, 2022

There is something strange with some character or word?

File "/usr/local/lib/python3.10/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 1 column 134 (char 133)

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 514, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 709, in async_device_update
    raise exc
  File "/config/custom_components/linkplay/media_player.py", line 560, in async_update
    await self.async_get_status(no_throttle=True)
  File "/config/custom_components/linkplay/media_player.py", line 490, in async_get_status
    resp = await self.async_call_linkplay_httpapi("getPlayerStatus", True)
  File "/config/custom_components/linkplay/media_player.py", line 441, in async_call_linkplay_httpapi
    data = await response.json(content_type=None)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1119, in json
    return loads(stripped.decode(encoding))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 131: invalid start byte 

@nagyrobi
Copy link
Owner

nagyrobi commented Aug 5, 2022

Closind due to missing information.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants