Ulrar / hassio-addons

Repo for hassio addons
MIT License
23 stars 10 forks source link

Support for other arch types #4

Closed staraxis closed 3 years ago

staraxis commented 4 years ago

Hi,

Thanks for your work on this! Is it possible to add support for other arch types? I think the config.json file needs to be updated. Currently it's like this: "arch": [ "armv7" ], This results on me getting the "This add-on is not available on your system" message.

I'm currently running Home Assistant Supervised in Ubuntu 18.04.

Let me know if you need more info. Thanks!

Ulrar commented 4 years ago

Hi @staraxis,

I don't have anything to test it with, which is why I didn't have them in there, but I do believe it should work. I added amd64 and i386, could you reload the repo and test ? Thanks !

staraxis commented 4 years ago

Thanks @Ulrar I managed to get it installed but when I start the addon I get this in a constant loop from the logs:


[2020-06-09 12:41:11] [  LOG]     main: Forked Media Server Version 27.1 taking off
[2020-06-09 12:41:11] [  LOG]     main: Built with:
[2020-06-09 12:41:11] [  LOG]     main: - ffmpeg
[2020-06-09 12:41:11] [  LOG]     main: - iTunes XML
[2020-06-09 12:41:11] [  LOG]     main: - Spotify
[2020-06-09 12:41:11] [  LOG]     main: - Chromecast
[2020-06-09 12:41:11] [  LOG]     main: - MPD
[2020-06-09 12:41:11] [  LOG]     main: - Device verification
[2020-06-09 12:41:11] [  LOG]     main: - Websockets
[2020-06-09 12:41:11] [  LOG]     main: - ALSA
[2020-06-09 12:41:11] [  LOG]     main: - Pulseaudio
[2020-06-09 12:41:11] [  LOG]     main: - Webinterface
[  LOG]     main: Forked Media Server Version 27.1 taking off
[  LOG]     main: Built with:
[  LOG]     main: - ffmpeg
[  LOG]     main: - iTunes XML
[  LOG]     main: - Spotify
[  LOG]     main: - Chromecast
[  LOG]     main: - MPD
[  LOG]     main: - Device verification
[  LOG]     main: - Websockets
[  LOG]     main: - ALSA
[  LOG]     main: - Pulseaudio
[  LOG]     main: - Webinterface
[2020-06-09 12:41:11] [  LOG]     main: mDNS init
[  LOG]     main: mDNS init
forked-daapd: client.c:791: avahi_client_errno: Assertion `client' failed.```
Ulrar commented 4 years ago

Ah sorry, I missed the part where you say you're using supervised mode, not hassio. You'll need to install and start avahi-daemon on your host, and map dbus in the container for it to work as forked-daapd depends heavily on it.

This is all done automatically by hassio when host_dbus is enabled, so I'm not sure what it does in detail but googling it yields multiple results like this one.

mouth4war commented 4 years ago

Did you get this to work? I've got the same setup and issue.

Ulrar commented 3 years ago

I'm using supervised mode myself now, and it's been working out of the box. Do you have avahi-daemon running ?

$ systemctl status avahi-daemon
* avahi-daemon.service - Avahi mDNS/DNS-SD Stack
     Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: disabled)
     Active: active (running) since Thu 2020-07-16 07:07:52 UTC; 1 weeks 4 days ago
TriggeredBy: * avahi-daemon.socket
   Main PID: 513 (avahi-daemon)
     Status: "avahi-daemon 0.8 starting up."
      Tasks: 2 (limit: 2208)
     Memory: 2.6M
     CGroup: /system.slice/avahi-daemon.service
             |-513 avahi-daemon: running [ha.local]
             `-518 avahi-daemon: chroot helper
staraxis commented 3 years ago

Yes I do have avahi-daemon running. Still not sure what the issue could be. I might try running this on a fresh install and see if the issue still persists.

$ systemctl status avahi-daemon
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
   Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor pre
   Active: active (running) since Thu 2020-08-06 12:57:46 AEST; 2 days ago
 Main PID: 989 (avahi-daemon)
   Status: "avahi-daemon 0.7 starting up."
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/avahi-daemon.service
           ├─ 989 avahi-daemon: running [hasserver.local]
           └─1123 avahi-daemon: chroot helper
febalci commented 3 years ago

I tried to install your addon on a Supervised HA 0.115.6 on an Intel NUC with Ubuntu 18.04.5 with the same

forked-daapd: client.c:791: avahi_client_errno: Assertion `client' failed.```

message. avahi-daemon is running. Thanks...

UPDATE: I wonder if it could it be related to avahi-daemon version since @Ulrar has v0.8 and all of us has v0.7 since Ubuntu 18.04 apt package is still avahi-daemon 0.7.3.1 ?? I couldn't update it to 0.8.

Ulrar commented 3 years ago

Hi,

That seems possible, looking at the release notes for 0.8 :

 * 2020-02-18: We have released Avahi 0.8! This release has a number of new features and a D-Bus/avahi-core API change related to racing signals with D-Bus object creation. For full details of all bug fixes, changes and new features check out the release page or docs/NEWS! 

Since this is indeed using D-Bus to talk to avahi, a change in that API could very well be the issue. You might be able to pin an older version of the lib in the dockerfile when building the addon to get around this, but it might be simpler to just update to a more recent version, I'm assuming ubuntu 20 would have 0.8.