fmtr / amniotic

A multi-output ambient sound mixer for Home Assistant. Amniotic lets you use a single device to create on-the-fly, custom ambient audio mixes to suit your tastes and environment.
20 stars 1 forks source link

New Setup, can't get it to run. #15

Open BastionNtB opened 1 year ago

BastionNtB commented 1 year ago

New setup, installed in supervised HA as addon. Getting a lot of errors, not sure how to go about resolving any of them, everything is in the container. Any tips? The documentation seems to just say it should pretty much work out of the box as an addon. Unless I'm supposed to do something in the manual steps as well.

s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[23:52:45] ERROR: Got unexpected response from the API: Service not enabled
WARNING:root:Unknown config field "audio_subdirectory". Will be ignored.
2023-07-02 23:52:45 WARNING amniotic.audio   : You are running as root. This could cause issues with PulseAudio, unless it is configured in system-wide mode.
2023-07-02 23:52:45 INFO  amniotic.audio   : Loading new Theme "Default Theme"
2023-07-02 23:52:45 WARNING amniotic.audio   : Theme "Default Theme" directory is empty: "/media/Amniotic/Default Theme"
2023-07-02 23:52:45 INFO  amniotic.audio   : Loaded temporary player to get devices...
2023-07-02 23:52:46 INFO  amniotic.audio   : Unloading temporary player.
2023-07-02 23:52:46 WARNING amniotic.audio   : Current device "None" no longer available for theme "Default Theme". Defaulting to "auto_null". Theme will be disabled.
2023-07-02 23:52:46 INFO  amniotic.audio   : Changing scaled volume for theme "Default Theme": from 0 to 0
2023-07-02 23:52:46 INFO  amniotic.audio   : Changing scaled volume for theme "Default Theme": from 0 to 4
2023-07-02 23:52:46 INFO  amniotic.loop    : Amniotic 0.5.8 has started.
2023-07-02 23:52:46 INFO  amniotic.loop    : Amniotic 0.5.8 starting MQTT...
/usr/lib/python3.11/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
Traceback (most recent call last):
  File "/usr/bin/amniotic", line 8, in <module>
    sys.exit(start())
             ^^^^^^^
  File "/usr/lib/python3.11/site-packages/amniotic/mqtt/loop.py", line 297, in start
    loop = Loop(
           ^^^^^
  File "/usr/lib/python3.11/site-packages/amniotic/mqtt/loop.py", line 76, in __init__
    self.client.connect(host=config.mqtt_host, port=config.mqtt_port)
  File "/usr/lib/python3.11/site-packages/paho/mqtt/client.py", line 914, in connect
    return self.reconnect()
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/paho/mqtt/client.py", line 1044, in reconnect
    sock = self._create_socket_connection()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection
    return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/socket.py", line 827, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/socket.py", line 962, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -3] Try again
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
ejohb commented 1 year ago

Yes it should just work. Could you describe your MQTT configuration? Are you running a broker? If so, is it on the same machine as the add-on?

tm24fan8 commented 10 months ago

Same exact problem, same log as above.

In accordance with the questions above...I am running Home Assistant OS on Proxmox. I am running an MQTT broker in an LXC container, also on Proxmox, and Home Assistant's MQTT integration is pointed to that container's IP address. All other MQTT entities are working properly, it's just this one that doesn't seem to want to run.

BastionNtB commented 10 months ago

Hey sorry about the lack in response. My issue was that I didn't have MQTT setup at all. Lol.

Its been awhile, and I ended up not being able to use the service unfortunately, I was hoping it would run streams locally and then you could play them on another speaker like casting to a Google speaker or what not. But I remember needing to also setup MQTT which I hadn't done before, don't remember how I configured it unfortunately. Wish I could help others a bit more.

ejohb commented 10 months ago

Same exact problem, same log as above.

In accordance with the questions above...I am running Home Assistant OS on Proxmox. I am running an MQTT broker in an LXC container, also on Proxmox, and Home Assistant's MQTT integration is pointed to that container's IP address. All other MQTT entities are working properly, it's just this one that doesn't seem to want to run.

Ah ok. A non-HA MQTT broker might be an issue. I'll take a look.

tm24fan8 commented 10 months ago

Sounds good. Let me know if you need any other info.

ejohb commented 10 months ago

Sounds good. Let me know if you need any other info.

It would be super useful if you could have a look for this message in your logs:

f'Attempting to connect to MQTT "{client._host}:{client._port}": {self.CONNECTION_MESSAGES[code]}'

Does the host reflect your actual MQTT host?