nagyrobi / home-assistant-custom-components-linkplay

LinkPlay based media devices integration for Home Assistant.
168 stars 32 forks source link

Icons don't update on player #59

Closed bartekkw closed 2 years ago

bartekkw commented 2 years ago

After latest HA upgrade I've notice that play / pause icons don't update on my mini-media-player component. In the logs I can only find error related to Linkplay integration. Anyone having such issue?

Home Assistant 2021.12.9 core-2021.12.9 User interface: 20211229.1 - latest Device: iEAST AudioCast M5

My config:

media_player:
   - platform: linkplay
      host: 192.x.x.x
      name: iEAST
      icecast_metadata: 'StationNameSongTitle'
      lastfm_api_key: xxxxxxxxxx
      volume_step: 10
      sources: {}
   - platform: frontier_silicon
      host: 192.x.x.x
      name: MedionSypialnia
Logger: homeassistant.helpers.entity
Source: custom_components/linkplay/media_player.py:1826
Integration: Linkplay (documentation, issues)
First occurred: 11:52:35 (212 occurrences)
Last logged: 12:26:57

Update for media_player.salon_link_play fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 487, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 691, in async_device_update
    raise exc
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/linkplay/media_player.py", line 2265, in update
    self._update_from_icecast(no_throttle=True)
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 195, in wrapper
    result = method(*args, **kwargs)
  File "/config/custom_components/linkplay/media_player.py", line 1826, in _update_from_icecast
    import chardet
ModuleNotFoundError: No module named 'chardet'
blavak68 commented 2 years ago

its the same for me

This error originated from a custom integration.

Logger: homeassistant.helpers.entity
Source: custom_components/linkplay/media_player.py:1826
Integration: Linkplay (documentation, issues)
First occurred: 12:06:01 (2 occurrences)
Last logged: 12:06:11

Update for media_player.wifi_baam_speaker_1 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 487, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 691, in async_device_update
    raise exc
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/linkplay/media_player.py", line 2268, in update
    self._update_from_icecast()
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 195, in wrapper
    result = method(*args, **kwargs)
  File "/config/custom_components/linkplay/media_player.py", line 1826, in _update_from_icecast
    import chardet
ModuleNotFoundError: No module named 'chardet'
nagyrobi commented 2 years ago

With 2 HA installations couldn't reproduce this. Can you please edit your custom_components/linkplay/manifest.json file to look like below: https://github.com/nagyrobi/home-assistant-custom-components-linkplay/blob/8b186c28a3119a868dc312373556f87e63cd9e54/custom_components/linkplay/manifest.json#L14-L18

And restart your HA instance.

bartekkw commented 2 years ago

Hi! This entry was missing in my config file: "chardet>=4.0.0"

After adding it and restarting HA my play / pause works as expected (refreshes) and I can again see music covers and music info in my mini media player :) No more such errors in log file. Thank you so much for helping with this annoying issue!

nagyrobi commented 2 years ago

Please update to the latest release 2.0.41 and test again.

bartekkw commented 2 years ago

I have deleted this line, updated to 2.0.41 and I confirm that it works!

nagyrobi commented 2 years ago

Thank you.

blavak68 commented 2 years ago

Thank you.

I confirm that it works!