#Failed to connect

1 messages · Page 1 of 1 (latest)

wary viper
#

Hi, I added Music Assistant via integration but I keep getting the error "failed to connect". I have even tried to set up my HA IP as static but it still doesn't work. I run HA on a docker in CasaOS. Any help will be highly appreciated, cheers

stuck jasper
#

How have you installed the server?

wary viper
wary viper
#

Logger: root
Source: /usr/src/homeassistant/homeassistant/bootstrap.py:613
First occurred: 7:30:04 AM (1 occurrences)
Last logged: 7:30:04 AM

Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.13/threading.py", line 1041, in _bootstrap_inner
self.run()
~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/tuya_sharing/mq.py", line 118, in run
self.__run_mqtt()
~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/tuya_sharing/mq.py", line 131, in __run_mqtt
mq_config = self._get_mqtt_config()
File "/usr/local/lib/python3.13/site-packages/tuya_sharing/mq.py", line 47, in _get_mqtt_config
response = self.api.post("/v1.0/m/life/ha/access/config", None,
{"linkId": link_id})
File "/usr/local/lib/python3.13/site-packages/tuya_sharing/customerapi.py", line 192, in post
return self.__request("POST", path, params, body)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/tuya_sharing/customerapi.py", line 121, in __request
raise Exception(f"network error:({ret['code']}) {ret['msg']}")
Exception: network error:(-9999999) Remote api run unknown failed

wary viper
#

Logger: root
Source: /usr/src/homeassistant/homeassistant/bootstrap.py:613
First occurred: 7:30:04 AM (1 occurrences)
Last logged: 7:30:04 AM

Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.13/threading.py", line 1041, in _bootstrap_inner
self.run()
~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/tuya_sharing/mq.py", line 118, in run
self.__run_mqtt()
~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/tuya_sharing/mq.py", line 131, in __run_mqtt
mq_config = self._get_mqtt_config()
File "/usr/local/lib/python3.13/site-packages/tuya_sharing/mq.py", line 47, in _get_mqtt_config
response = self.api.post("/v1.0/m/life/ha/access/config", None,
{"linkId": link_id})
File "/usr/local/lib/python3.13/site-packages/tuya_sharing/customerapi.py", line 192, in post
return self.__request("POST", path, params, body)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/tuya_sharing/customerapi.py", line 121, in __request
raise Exception(f"network error:({ret['code']}) {ret['msg']}")
Exception: network error:(-9999999) Remote api run unknown failed

stuck jasper
#

You are still looking at the integration installation instructions. You need to install the server

sterile prairie
#

The CasaOS version of HA lacks Supervisor and container management (ie add-ons) that are a large part of HA under HAOS. Music Assistant is an add-on to HA that runs in a container and uses an HA integration to bind them together.

#

If you are using CasaOS then you need to manually install and configure MA in a container. before HA integration will work

#

Other common HA components that are add-ons are ESPHome, Zigbee2MQTT, Speech-to-Phrase and would also likely need manual installation under CasaOS

wary viper
#

update: I have installed HAOS on my zimaboard and everything seems to work better, thank you!

#

I was able to make MA working

#

Last issue I have now is apple music auth. please see below

sterile prairie
#

I just submitted a PR this afternoon with fixes to AppleMusic auth. If you are now using HAOS then you installed MA from the add-on store. Can I ask which version you used?

GitHub

The previous version of this PR has issues with HA ingress as tokens were passed back to auth helper via url params that were truncated by an intermediate process causing workflow to fail.
The MA a...

wary viper
#

@sterile prairie

sterile prairie
# wary viper

You are using the Beta which explains the error. I broke the Beta and I am working to fix it. The problem is related to how HA manages ingress to add-ons. If you connect directly to MA on the IP of the container on port 8095 then Apple Auth should work on the current beta

wary viper