I think, “companion_app_name” also is not correct name for field. It may be misunderstand by user as “name of companion application”…
I think, best name for field is “device_name”, because it is short, already used in the companion application in approximately the same form and, together with the field “name”, will lead the user to think that this is some special device name, not a name for the frontend.
Error loading custom_components.media_player.linkplay. Make sure all dependencies are installed
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/loader.py”, line 147, in _load_file
module = importlib.import_module(path)
File “/usr/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/home/homeassistant/.homeassistant/custom_components/media_player/linkplay.py”, line 19, in
from homeassistant.components.media_player import (
ImportError: cannot import name ‘MEDIA_TYPE_MUSIC’
It’s weird, because MEDIA_TYPE_MUSIC is there…
Please, help. If I can help you in any way, just ask.
Thank you.
Thanks! I found that the constants had moved to the “const” file… However I’ll probably fix it with a try/except solution to make it compatible with both pre and post .88 versions of HA. I won’t be able to fix it in a few days though.
Could you explain the reasoning behind why you suggest the name change to linkplay/media_player.py? I haven’t looked very carefully at the last couple of commits yet
I’ve now added the “devicename” parameter which should be set to the name of the device from the ios/android companion app (it’s a required parameter). The “name” parameter is now optional and will be set to the same as the “devicename” parameter if not provided.
This change is only committed to the post-88 branch above.
I get this alot in the Logs. It bugs me to get big logs:
Log Details (ERROR)
Sat Mar 23 2019 13:17:28 GMT+0100 (centraleuropeisk normaltid)
Error fetching data: <PreparedRequest [GET]> from http://192.168.99.9/httpapi.asp?command=getPlayerStatus failed with HTTPConnectionPool(host=‘192.168.99.9’, port=80): Max retries exceeded with url: /httpapi.asp?command=getPlayerStatus (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fc3c18e3240>, ‘Connection to 192.168.99.9 timed out. (connect timeout=2)’))
Entity ID alb is an invalid entity id for dictionary value @ data[‘entity_id’]
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/websocket_api/commands.py”, line 148, in handle_call_service
connection.context(msg))
File “/usr/local/lib/python3.7/site-packages/homeassistant/core.py”, line 1113, in async_call
processed_data = handler.schema(service_data)
File “/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py”, line 267, in call
return self._compiled(, data)
File “/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py”, line 589, in validate_dict
return base_validate(path, iteritems(data), out)
File “/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py”, line 427, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: Entity ID alb is an invalid entity id for dictionary value @ data[‘entity_id’]
When it’s in master mode it works correctly, but I don’t use them separately mostly as multiroom. And if this is because of that then the component needs to be able to detect if they are paird or not.