Home Assistant Community Add-on: AirSonos

Has anyone else had issue with the AirSonos addon not detecting the Sonos on your LAN?
I installed it just now with default config on hassio on my RP3. Debug log looks fine and just repeats with “UpdateThread:643 Presence checking” about a minute after starting the addon.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Hass.io Add-on: AirSonos v0.3.1
 AirPlay capabilities for your Sonos (and UPnP) devices.
 From: Community Hass.io Add-ons
 By: Franck Nijhof <[email protected]>
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to DEBUG
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing... 
DEBUG: Requested API resource: http://hassio/supervisor/ping
DEBUG: API HTTP Response code: 200
DEBUG: API Response: {"result": "ok", "data": {}}
DEBUG: Requested API resource: http://hassio/addons/a0d7b954_airsonos/info
DEBUG: API HTTP Response code: 200
DEBUG: API Response: {"result": "ok", "data": {"name": "AirSonos", "slug": "a0d7b954_airsonos", "description": "AirPlay capabilities for your Sonos (and UPnP) devices.", "long_description": "# Community Hass.io Add-ons: AirSonos\n\nThis is just a configuration stub to make the Hass.io repository work.\n\nThe add-on itself can be found at the following URL:\n\n<https://github.com/hassio-addons/addon-airsonos>\n", "version": "0.3.1", "auto_update": true, "repository": "a0d7b954", "last_version": "0.3.1", "state": "started", "boot": "auto", "options": {"log_level": "debug", "address": "", "port": 49152, "latency_rtp": 1000, "latency_http": 2000, "drift": false}, "url": "https://community.home-assistant.io/t/community-hass-io-add-on-airsonos/36796?u=frenck", "detached": false, "build": false, "network": null, "host_network": true, "host_ipc": false, "host_dbus": false, "privileged": null, "seccomp": "default", "apparmor": "default", "devices": null, "icon": true, "logo": true, "changelog": false, "webui": null, "stdin": false, "hassio_api": true, "homeassistant_api": false, "gpio": false, "audio": false, "audio_input": null, "audio_output": null, "services": null, "discovery": null}}
DEBUG: Filtering response using: .version
DEBUG: Requested API resource: http://hassio/addons/a0d7b954_airsonos/info
DEBUG: API HTTP Response code: 200
DEBUG: API Response: {"result": "ok", "data": {"name": "AirSonos", "slug": "a0d7b954_airsonos", "description": "AirPlay capabilities for your Sonos (and UPnP) devices.", "long_description": "# Community Hass.io Add-ons: AirSonos\n\nThis is just a configuration stub to make the Hass.io repository work.\n\nThe add-on itself can be found at the following URL:\n\n<https://github.com/hassio-addons/addon-airsonos>\n", "version": "0.3.1", "auto_update": true, "repository": "a0d7b954", "last_version": "0.3.1", "state": "started", "boot": "auto", "options": {"log_level": "debug", "address": "", "port": 49152, "latency_rtp": 1000, "latency_http": 2000, "drift": false}, "url": "https://community.home-assistant.io/t/community-hass-io-add-on-airsonos/36796?u=frenck", "detached": false, "build": false, "network": null, "host_network": true, "host_ipc": false, "host_dbus": false, "privileged": null, "seccomp": "default", "apparmor": "default", "devices": null, "icon": true, "logo": true, "changelog": false, "webui": null, "stdin": false, "hassio_api": true, "homeassistant_api": false, "gpio": false, "audio": false, "audio_input": null, "audio_output": null, "services": null, "discovery": null}}
DEBUG: Filtering response using: .last_version
INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 03-version-requirements.sh: executing... 
DEBUG: Requested API resource: http://hassio/supervisor/ping
DEBUG: API HTTP Response code: 200
DEBUG: API Response: {"result": "ok", "data": {}}
[cont-init.d] 03-version-requirements.sh: exited 0.
[cont-init.d] 50-airsonos.sh: executing... 
[cont-init.d] 50-airsonos.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
INFO: Starting the AirSonos server
[05:17:24.725908] main:1205 Starting airupnp version: v0.2.0.5 (Mar 12 2018 @ 07:24:58)
[05:17:24.726267] main:1213 no config file, using defaults
[05:17:24.779342] Start:965 Binding to 10.66.77.4:49152
[05:17:44.000801] UpdateThread:643 Presence checking
[05:18:04.000413] UpdateThread:643 Presence checking

Your debug log looks absolutely normal / fine.
E.g., I cannot think of a reason why it is not working atm. :worried:

Thanks Frenck.

I might have a go at getting AirConnect working. It works for me on Raspian so I’ll try and figure out how to get the Dockerised version working as a Hassio addon.

Is there a guide on how to create an addon? I have a lot of experience with Docker.

Well i finally got this to work. By simply plugging out the Sonos for a minute and then plugging it back in! After all that!

And I had been playing around with getting AirConnect to work as an addon (without success)…

:tada: Release v0.4.0

This release is exciting, at least, for me it is. I’ve been working on this for months! And for you? Well, almost nothing changed :stuck_out_tongue:

So what did change? I’ve updated the workflows of the Community Hass.io Add-ons project. Things include:

  • Replaced CircleCI and CodeClimate. We are now using GitLab CI, backed by a couple of custom servers building and testing these add-ons.
  • All add-ons are now scanned during built and release by Clair to prevent security issues in our add-ons.
  • All add-ons are constantly scanned and monitored by Anchore.io. We will be notified immediately in case of security issues occur. (Major thanks to Anchore.io for helping us out!)
  • The add-ons repository is now entirely generated and automatically synced with all the add-ons. This ensures repositories are in sync, never forgotten and releases are almost instantly.
  • The base images that these add-ons are built on are entirely revised.
  • All add-ons have been updated to follow the Docker best practices. These are checked on every code change by GitLab CI.
  • All add-ons had maintenance. All software is updated to the latest and greatest and the documentation has been revisited.
  • There are now 2 bots in place on the GitHub project. The Add-ons Assistant is helping us out with the GitHub issues and pull requests and the AddonsBot is fully active taking care of updating code across the different GitHub Repositories.
  • We now have Edge & Beta add-ons repositories available. This allows everybody to test the latest and greatest (in case you don’t care about stability that much, or just wanna help out!)
  • I’ve removed all the PayPal, Bitcoin, … buttons. If you’d like to show your appreciation, then please, just buy me a coffee.

So that’s quite a lot, right? So what changed in this specific add-on?

Full Changelog

Added

  • Adds .yamllint configuration
  • Adds Probot configuration
  • Adds initial add-on README template
  • Adds Gitlab CI

Fixed

  • Fixes Markdownlint warning in License
  • Fixes hadolint warnings

Changed

  • Replaces Changelog with GitHub releases
  • Adds all architectures to add-on config
  • Changes add-on base to Ubuntu
  • Updates README
  • Updates AirConnect to v0.2.0.8

Removed

  • Removes CodeClimate
  • Removes CircleCI

:tada: Release v0.5.0

Full Changelog

Fixed

  • Fixed incorrect base images in GitLab CI

Changed

  • Moves build-env to latest
  • Adds known issues and limitations to README
  • Upgrades Ubuntu base image to 2.0.0
  • Rewrites GitLab CI

@frenck is this still the case, or did it change in later revisions. I have a mix of Support and Unsupported AirPlay2 Sonos devices and would love to omit the newer ones to make it easier on the family.

:tada: Release v0.6.0

Full Changelog

Added

  • Adds support for tweaking AirCast using its configuration file (#7)
  • Documents tweaking possibilities using a configuration file (#7)

Changed

  • Upgrades airconnect/airupnp to 0.2.1.1 (#6)
1 Like

Hi guys,

Just installed AirSonos and I’m constantly getting the following error and my iPhone doesn’t show my Sonos device in thr Airplay menu. Any ideas?

[08:49:07.903092] XMLGetFirstDocumentItem:1319 (BUG) ixmlNode_getFirstChild(tmpNode) 
returned NULL
[08:49:27.017146] MasterHandler:565 [0x8c1bc]: Auto-renewal failed, re-subscribing
[08:49:27.031136] MasterHandler:588 [0x8c1bc]: subscribe success

I got it working. Just turned off my Sonos device and turned it back on. Started working after about 5 mins.

1 Like

:tada: Release v1.0.0

Full Changelog

Changed

  • Upgrades base image to v2.1.0
  • Upgrades hadolint to latest
  • Sets default Shell
  • Upgrades airsonos to 0.2.2.0
  • Upgrades libssl1.0.0 to 1.0.2n-1ubuntu5.1
  • Less aggressive cleanup
  • Updates README and links
  • Marks add-on stable

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

:tada: Release v1.0.1

Full Changelog

Changed

  • Upgrades base image to v2.1.1

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

Is it possible to also get support for AirPlay 2?

Nope, it is currently unknown how the protocol works and not yet reversed engineered.

:tada: Release v1.1.0

Full Changelog

Changed

  • Upgrades Ubuntu Base image to 2.2.0
  • Adds Hassio API security role

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

Ok, thank you for the information.

First of all i would sey thank you for this addon!
After i installed the DuckDNS addon with Let‘s encrypt support the AirSonos stoped working.

I got the following message in the log:

[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 00-banner.sh: executing…
curl: error while loading shared libraries: libhx509.so.5: cannot open shared object file: No such file or directory
ERROR: Something went wrong contacting the API
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing…
jq: error while loading shared libraries: /usr/lib/arm-linux-gnueabihf/libjq.so.1: invalid ELF header
jq: error while loading shared libraries: /usr/lib/arm-linux-gnueabihf/libjq.so.1: invalid ELF header
jq: error while loading shared libraries: /usr/lib/arm-linux-gnueabihf/libjq.so.1: invalid ELF header
jq: error while loading shared libraries: /usr/lib/arm-linux-gnueabihf/libjq.so.1: invalid ELF header
jq: error while loading shared libraries: /usr/lib/arm-linux-gnueabihf/libjq.so.1: invalid ELF header
jq: error while loading shared libraries: /usr/lib/arm-linux-gnueabihf/libjq.so.1: invalid ELF header
jq: error while loading shared libraries: /usr/lib/arm-linux-gnueabihf/libjq.so.1: invalid ELF header
jq: error while loading shared libraries: /usr/lib/arm-linux-gnueabihf/libjq.so.1: invalid ELF header
jq: error while loading shared libraries: /usr/lib/arm-linux-gnueabihf/libjq.so.1: invalid ELF header
jq: error while loading shared libraries: /usr/lib/arm-linux-gnueabihf/libjq.so.1: invalid ELF header
/var/run/s6/etc/cont-init.d/01-log-level.sh: line 44: log_level: unbound variable
[cont-init.d] 01-log-level.sh: exited 1.
[cont-finish.d] executing container finish scripts…
[cont-finish.d] 99-message.sh: executing…

            Oops! Something went wrong.

We are so sorry, but something went terribly wrong when
starting or running this add-on.

Be sure to check the log above, line by line, for hints.

[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.

has everyone the same problem and a solution?

Hi
Not tried this out yet, but is it still not possible to exclude devices? Planning on giving my daughter an old Play:1 for her room, so that she can listen to some music on YouTube. I just don’t want her to be able to airplay to the other Sonos in my system.

:tada: Release v1.2.0

Full Changelog

Changed

  • Configure Renovate (#11)
  • Replaces add-on link with GitHub link
  • Updates maintenance year to 2019
  • Removes BountySource links
  • Removes Anchore.io links
  • Upgrades libssl1.0.0 to 1.0.2n-1ubuntu5.2
  • Refactor of GitLab CI
  • Upgrades add-on base image to 2.2.1
  • Fixes spelling error in Dockerfile
  • Upgrades AirConnect to 0.2.2.4

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

:tada: Release v2.0.0

Full Changelog

Changed

  • Upgrades add-on base image to 3.0.0
  • Updates documentation for ARMv7
  • Removes custom log format override
  • Makes log_level optional
  • Upgrades libssl1.0.0 to 1.0.2n-1ubuntu5.3
  • Rewrite add-on onto Bashio
  • Correct AirSonos binary filename

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck