Community Hass.io Add-on: AirSonos

Tags: #<Tag:0x00007f3f27bcd370> #<Tag:0x00007f3f27bd98f0>

This add-on is provided by the Community Hass.io Add-ons project.

GitHub Release GitLab CI Project Stage Project Maintenance

Supports armhf Architecture Supports armv7 Architecture Supports aarch64 Architecture Supports amd64 Architecture Supports i386 Architecture

sonos

About


AirPlay capabilities for your Sonos (and UPnP) players.

Apple devices use AirPlay to send audio to other devices, but this is not compatible with Sonos players. This add-on tries to solve this compatibility gap.

It detects Sonos players in your network and creates virtual AirPlay devices for each of them. It acts as a bridge between the AirPlay client and the real Sonos device.

Since Sonos uses UPnP, the add-on might also work for other UPnP players (e.g., newer Samsung televisions).

Installation


The installation of this add-on is pretty straightforward and not different in comparison to installing any other Hass.io add-on.

  1. Add our Hass.io add-ons repository to your Hass.io instance.
    Add the following URL: https://github.com/hassio-addons/repository
  2. Install the “AirSonos” add-on.
  3. Start the “AirSonos” add-on
  4. Check the logs of the “AirSonos” add-on to see if everything went well.

After ~30 seconds you should see some log messages appear in the add-on log.
Using your iOS/Mac/iTunes/Airfoil/other clients, you should now see new AirPlay devices and can try to play audio to them.

:books: Please read the documentation for more information about the use and configuration of this add-on.

Support


You can always try to get support from the community here at the Home Assistant community forums, join the conversation!

Questions? You have several options to get them answered:

You could also open an issue on GitHub, in case you ran into a bug, or maybe you have an idea on improving the addon:

:information_source: At this moment our Community Hass.io Add-ons Discord chat server and GitHub are our only official support channels. All others rely on community effort.

Repository on GitHub


Looking for more add-ons?


The primary goal of our add-ons project is to provide you (as an Hassio / Home Assistant user) with additional, high quality, add-ons that allow you to take your automated home to the next level.

Check out some of our other add-ons in our Community Hass.io Add-ons project.

4 Likes

About the author of this add-on

Hi there!

I am Franck Nijhof, and I have 30 years of programming experience, in many languages. I am using this experience to work on the Home Assistant project by giving back my knowledge and time to the open source community.

The add-on you are currently looking at right now was developed/packaged by me. It is not the only add-on I have created; there are many many more :wink:

However, I have a problem… I am an addict. A :coffee: addict that is. Lucky for you, I turn that C8H10N4O2 (caffeine molecule) into code (and add-ons)!

If you want to show your appreciation, consider buying me a cup of high octane wakey juice by clicking on the “By me a coffee” image below! :heart:

Buy me a coffee

Or, become a Patron and support my work!

Support my work on Patreon

Enjoy your add-on, while I enjoy the brain juice. :coffee:

Thanks for all the :two_hearts:

…/Frenck

Join our Discord server Follow me on Twitter Flollow me on Instragram Follow me on GitHub Follow me on YouTube Follow me on Twitch patreon-icon

P.S.: In case you want to ask me a question: AMA (Ask Me Anything). Most of the time I am online at the Discord chat. (I go by @Frenck in there as well).

Wow, really great add-ons you are making!
Thanks!

1 Like

Works like a charm, thank you very much for making this add-on!!!

1 Like

Works fantastic!! Thx a lot.

1 Like

The add-on works great, but I noticed that after playing something on a Sonos speaker and then stopping that, the text on the Sonos card remains “Streaming from Airconnect” and the logs shows multiple records per minute containing:

Wed Dec 27 2017 23:16:59 GMT+0100 (West-Europa (standaardtijd))

Update for media_player.kantoor fails
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 199, in async_update_ha_state
    yield from self.async_device_update()
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 306, in async_device_update
    yield from self.hass.async_add_job(self.update)
  File "/usr/lib/python3.6/asyncio/futures.py", line 332, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/media_player/sonos.py", line 528, in update
    track_info = self._player.get_current_track_info()
  File "/usr/lib/python3.6/site-packages/soco/core.py", line 1219, in get_current_track_info
    index = trackinfo.find(' - ')
AttributeError: 'NoneType' object has no attribute 'find'

Not sure if the add-on can use the Sonos snapshot and restore function? https://home-assistant.io/components/media_player.sonos/#service-sonos_snapshot

Interesting, I’ll look into that.

:tada: Release: AirSonos v0.2.0

Full Changelog

Fixed

  • Fixes Unexpected high system load

Changed

  • Upgraded base image to v0.2.1
  • Updated maintenance year, it is 2018

This update is now available on your Hassio panel.

1 Like

this is GREAT

thank you so much

1 Like

Just installed on a Pi 1 HASSIO using default options and all I can seem to get is:

[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…
[cont-init.d] 00-banner.sh: exited 267.
[cont-finish.d] executing container finish scripts…
[cont-finish.d] 99-message.sh: executing…
s6-maximumtime: warning: child process crashed
[cont-finish.d] 99-message.sh: exited 111.
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.

What am I doing wrong?

Euhm wait what?!

Could you please set the log level to debug and share the result? Thx!

Debug level makes no difference it’s like the main proceans is not even starting. I am pretty docker savvy but cannot figure out how to interact with individual containers on Hassio.

Is there a standard docker image I can use?

The thing is… it makes no sense…

[cont-finish.d] 99-message.sh: executing…
s6-maximumtime: warning: child process crashed
[cont-finish.d] 99-message.sh: exited 111.

That script right there is just displaying something and contains no magic or logic at all…

Source: https://github.com/hassio-addons/addon-base/blob/master/base/rootfs/etc/cont-finish.d/99-message.sh

So… like… yeah… there is nowhere I can go from this.

:tada: Release v0.3.0

Full Changelog

Added

  • Adds add-on logo and icon

Changed

  • Upgrades add-on base image to v1.0.0
  • Upgrades AirUPnP server to v0.2.0.5

:tada: Release v0.3.1

Full Changelog

Fixed

  • Fixes executable permission issue on amd64

Hi

Great add-on, but I get this error message:

[14:39:57.537801] main:1205 Starting airupnp version: v0.2.0.5 (Mar 12 2018 @ 07:24:58)
[14:39:57.538176] main:1213 no config file, using defaults
[14:39:57.541828] Start:953 UPnP init failed: -208
[14:39:57.541905] main:1246 Cannot start
INFO: Starting the AirSonos server

I can see my speakers as Airplay units, but cannot connect.

Any ideas ?

it’s really good job, frenck,Thanks

Works like a charm. This is what I have missed for all those years. Thanks alot, you are a champ :slight_smile:

Hey,
Is there a option / setting to exclude devices? My AV-Receiver has AirPlay build in and is now 2 times in my AirPlay list.

Daranto

No, currently, there is not an option for that @daranto.