Heos devices unavailable after installing custom integration
prismplex opened this issue · comments
First of all thank you for this great work!
After installing your configuration all my HEOS devices are shown as unavailable in home assistant. Configured all devices with the original integration, also tried to reset everything and start by configuring everything with the custom integration. In this case the integration can be set up, but no devices are shown/none can be set up.
Am I doing something wrong or did somebody experience the same problem and solved it?
I have a similar problem, the new custom component doesn't work neither when I install it instead of the old version (https://github.com/tmjo/custom_components), nor when I delete everything and install it clean. It appears in the list of integrations, but without any devices or entities.
Here is the error message I see in logs:
Logger: homeassistant.components.media_player
Source: custom_components/heos/__init__.py:390
Integration: Media Player (documentation, issues)
First occurred: 17:29:25 (2 occurrences)
Last logged: 17:29:25
heos: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 465, in async_device_update
await task
File "/config/custom_components/heos/media_player.py", line 290, in async_update
await self.get_groups() # group
File "/config/custom_components/heos/media_player.py", line 460, in get_groups
self._group_list = groupmgr.get_grouplist(self._groupid)
File "/config/custom_components/heos/__init__.py", line 407, in get_grouplist
grouplist.append(self.entity_id_from_player_id(group.leader.player_id))
File "/config/custom_components/heos/__init__.py", line 390, in entity_id_from_player_id
if playerid == device.player_id:
AttributeError: 'UniversalMediaPlayer' object has no attribute 'player_id'
@prismplex let me know if this has nothing to do with your issue, then I'll create a separate one.
Hi guys! Not sure what can be the problem here, I am using the custom integration daily myself with four HEOS-devices and no problems. Also, I don't understand why the last line in the log there talks about UniversalMediaPlayer. Could you let me know a bit more about your setup?
Did you install it through HACS?
Hi guys. I seem to get a similar error after I updated to 2021.4 today, while my devcontainer which is running an older version still works fine. It could be something is broken in the newest versions, did you guys run a beta version of the latest HA release or something like that? Anyways, I'll try to figure it out now that I am able to reproduce it.
Hey @tmjo, thanks a lot for looking into it!
Regarding your questions:
- I had this issue with the latest stable March version of HA (2021.3.4)
- I used HACS to install the integration (version 2021.3.2)
- Mention of universal media player in the error message seems strange to me too. My only assumption is that I have a universal media player that has some of HEOS speaker entities as children. May be it inherits some HEOS specific attributes and the integration is "confused" by it?
I checked it now, it doesn't really seem related to the new HA release and thus I don't understand why the error didn't appear on my installation before. Anyways, I believe it is fixed in the latest release of the custom integration (v2021-4-1). Please let me know if you can test and if it is working for you. If installed through HACS you can click on the three dots and "Update information" to force updating the info before HACS does automatically.
Installed it today through hacs, no problems!
@KoltesPunti ; thanks for the feedback, good it is working! @prismplex @sashamik did you guys have a chance to test?
Just tested it with the latest HA version, but have the same error message :(
@sashamik did you upgrade the custom integration to v2021.4.1 through HACS and then restart HA? As said above, I found a bug so you need to update the integration too. If you still have problems, please provide a log and I believe we are able to fix it. Remember to enable debug logging to see more details. Add this to configuration.yaml and restart HA:
logger:
logs:
custom_components.heos: debug
I tried it again, this time restarting HA not only in the end, but also after deleting the old integration and it worked! Thank you so much 😊
That's great! I'll close the issue, let me know if some other stuff appears. Hopefully not too long until an official feature will be available.