Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BastionNtB opened this issue Jul 3, 2023 · 7 comments
Open

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

BastionNtB opened this issue Jul 3, 2023 · 7 comments
Labels
good first issue Good for newcomers

Comments

@BastionNtB
Copy link

BastionNtB commented Jul 3, 2023

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
Copy link
Contributor

ejohb commented Jul 7, 2023

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
Copy link

tm24fan8 commented Oct 7, 2023

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
Copy link
Author

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 ejohb reopened this Oct 10, 2023
@ejohb
Copy link
Contributor

ejohb commented Oct 10, 2023

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
Copy link

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

@ejohb
Copy link
Contributor

ejohb commented Oct 24, 2023

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?

@ejohb ejohb added the good first issue Good for newcomers label Apr 19, 2024
@jaypi95
Copy link

jaypi95 commented Oct 5, 2024

Hey, I'm using a non-HA MQTT broker as well. My log is:

2024-10-05 23:37:22 INFO  amniotic.loop    : Attempting to connect to MQTT "homeassistant.local:1883"...
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/amniotic/mqtt/loop.py", line 80, in __init__
    self.client.connect(host=config.mqtt_host, port=config.mqtt_port)
  File "/usr/lib/python3.12/site-packages/paho/mqtt/client.py", line 1435, in connect
    return self.reconnect()
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/paho/mqtt/client.py", line 1598, in reconnect
    self._sock = self._create_socket()
                 ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/paho/mqtt/client.py", line 4609, in _create_socket
    sock = self._create_socket_connection()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/paho/mqtt/client.py", line 4640, in _create_socket_connection
    return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/socket.py", line 865, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.12/socket.py", line 850, in create_connection
    sock.connect(sa)
OSError: [Errno 22] Invalid argument

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/amniotic", line 8, in <module>
    sys.exit(start())
             ^^^^^^^
  File "/usr/lib/python3.12/site-packages/amniotic/mqtt/start.py", line 34, in start
    loop.start()
  File "/usr/lib/python3.12/site-packages/amniotic/mqtt/loop.py", line 305, in start
    loop = Loop(
           ^^^^^
  File "/usr/lib/python3.12/site-packages/amniotic/mqtt/loop.py", line 83, in __init__
    raise ConnectionError(msg) from exception
ConnectionError: Error connecting. This usually means your MQTT host is not available.

The MQTT broker is actually at mqtt..com and the HA MQTT integration is using that without issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants