Sonos Network Issues

Sonos Network Issues

We use Sonos at the office for easy music-access across the entire building. We’ve got 8 Sonos AMPs linked to Bowers And Wilkins built-in ceiling speakers, combined with a couple of Play:3 and Play:1 units for smaller offices.

It’s an elegant system. We hooked up one radio, tuned to Studio Brussel to the line-in of one of the AMPs, thus combining one of Belgiums better radio stations with a zero-bandwidth solution.
It’s better to share the line-in of an AMP than to have a dozen Sonos devices all streaming high quality internet radio all day.

Users who do want something different can use the build-in Tune-In radio to pick a radio station of their preference. All hooked up to ethernet.

A perfect solution. Or so we thought.


For a while now we had some serious issues on the network. Switches would randomly lock, internet would grind to a stop and internal network traffic would just drop.

Frustrated and confused, because there was no obvious culprit to be found, I spent last weekend rewiring and checking our entire server-backbone. To make this process easier I decided to turn off any devices that weren’t necessary to work productively.

Accidentally I noticed that the network behaved a lot better after I disconnected the switch that contained all the Sonos devices. And said switch still acted weird even when unpatched from the rest of the network.

Turns out: Managed switches and wired Sonos is a big no-go. If you have more than one Sonos connected via ethernet, things may go wrong.

Since Sonos also talk to each other, they have the downside of possibly creating a Broadcast Storm on your network, and thus taking down a part or all of the network.

Luckily there’s a solution: either use a dumb unmanaged switch (not gonna happen), or adjust the Spanning Tree State settings of your switch(es). So a few configuration changes later, we again have a stable setup.

If you happen to have some managed switches, and think about hardwiring your Sonos to reduce the load on your wi-fi network: file this article for future use. It may save you from spending a sunny afternoon in a server room surrounded by ethernet cables and switches.

Yosemite Open Directory Replicas

Summertime is the ideal time do to some heavy duty system maintenance. Lots of people are out of office, and those that are in house don’t mind a few hours of planned downtime. So today I finally upgraded our root- and fileservers from OS X Mavericks to OS X Yosemite. Finally, because it’s been I year since Yosemite was first released.

But since our fileserver is an Open Directory replica of our root server, updating one means updating the other, and combined with all the DiscoveryD issues that plagued OS X these last few months, I didn’t really dare to update any one of them.

Currently, when updating OS X server from one OS to another, we need to update its core OS first, which disables all server services. Only then can you download the new for this new OS, which upgrades all server services and hopefully launches successfully afterwards.

But OS X Server 5.0, which is being developed in tandem with El Capitan, will be the first Server app that can be installed on a previous system, without the need to upgrade OS X first. Getting all our servers on OS X 10.10.4 now, means upgrading from Server 4 to 5 in the fall will be as easy as moving from Server 4.0 to 4.1.

Luckily the upgrades went smoothly this time without any major problems. And in less than three hours, which was far less than I expected.

A quick note on Open Directory Replicas


Our two main servers are replicas of each other to spread the load over multiple servers. But after upgrading them according to Apple’s own guidelines, I somehow still destroyed our Open Directory Master-Slave link.

Turns out:
If you have passwords policies on your Open Directory Master, and your diradmin’s password does not comply with these policies, the Open Directory Replication will fail.
The solution: either change your diradmin password —and create an avalanche of permission troubles— or easier: temporarily disable your policies before relinking both servers.

Hiding the iTunes Music Store

Shortly after Apple released Apple Music last week plenty of people started posting various tutorials on improving the app’s interface. My favorites so far are:

Hiding @Connect

You can hide @connect and replace it with the playlist icon by going to Settings > General > Restrictions. If you turn off Apple Music Connect, the Connect icon is replaced with Playlists in Music app.  Update: Apple removed this option in iOS 9 beta 3.


You can check which songs are downloaded and how much space they use on your iOS device by going to Settings > General > Usage > Manage Storage > Music.

Update For You

By going to Music > Profile icon top left > Choose Artist for you, you can run the Setup process again and select other or better genres and artists.

Change the icon of a Playlist

You can even change the icon of a playlist, replacing the 4×4 grid of album art with a custom photo by opening iTunes on the Mac and dragging a square image on top of the current image. iTunes will even change the header color to match your custom art.


iTunes Store

Cool tweaks, but they only apply to the Music app. What about the iTunes Store? Now that streaming is native on iOS, and integrated into iTunes, I don’t have any use for the music part of the iTunes Store anymore.

Luckily, you can hide music in the app, and put the remaining parts front and center. Which, in my case, means turning the iTunes Store app into a dedicated Movie Store app.

Somehow it’s a shame Apple didn’t fully exploit Apple Music launch to strip the iTunes Store app on iOS into separate parts. If they can put the iBook Store into iBooks, surely they can put the iTunes movie store into Maybe that’s something they’ll do once the Apple TV and video platform are relaunched?


How to hide music in the iTunes Store

  • Open the iTunes Store app
  • Click on the More-ellipsis icon in the toolbar
  • Press Edit top right
  • Drag any of the remaining icons on the Music icon (I picked purchases)
  • Rearrange the toolbar if needed
  • Press Done.


Moving from Spotify to Apple Music, an easier way

Moving from Spotify to Apple Music, an easier way


Update 04/04/2017

There’s an easier way: Stamp Music

Original article

Yesterday I posted a guide to move from Spotify to Apple Music. It involved a lot of manual labor and I ended my disclaimer with a request for a script that would match songs better.

A day later, someone send me a link to this Github Page, that solves that issue and promises a way better import. The script is currently running on my Mac and takes a while, but I’m already seeing a whole lot more songs showing up.

For those who speak Dutch: did a nice write up of the procedure that’s less technical.

Screenshot 2015-07-02 20.27.01

Moving from Spotify to Apple Music

Moving from Spotify to Apple Music


Update 04/04/2017

An even easier method: Stamp Music

Update 02/07/2015

There is an easier and better way: link

Original Article

Apple released Apple Music yesterday, and as often happens when a good service arrives later on the market: users need to migrate their data from existing solutions to the new one. Although Apple offers a convenient way to migrate from Beats to Apple Music, users of other platforms aren’t offered an easy solution.

After Googling around and playing with a couple of Spotify Exporters I’ve figured out a way to export my Spotify playlists to Apple Music.


This procedure requires a lot of manual labour. Most of it could be scripted, but since I only wanted to migrate my starred songs, I didn’t really botter.

Secondly, the import into Apple Music is based on track name, artist and album, and Apple only imports songs that 100% match the iTunes Store. So not all songs can be imported, but most of them do

What doesn’t get imported:

  • Spotify calls an album The Social Network, and Apple calls it The Social Network (Soundtrack)
  • Spotify has it written as Nick Cave and The Bad Seeds, and Apple used Nick Cave & The Bad Seeds.

Screenshot 2015-07-01 18.30.05Once you can export the song data out of Spotify the only work you really have is converting the file from a pattern that works for Spotify to one that Apple understands.

What bothers me a lot, and that’s currently out of our hands, is the 60% succes rate based on the way tracks match Apple’s database. If someone has a script that can search the iTunes Store for a better matching title based on the export from Spotify, feel free to share it.

Part 1: Getting data out of Spotify

  • Go to Exportify and authenticate with your Spotify account.
  • Select a playlist you would like to migrate and click the Export button.
  • A new tab opens with a text based view of your playlist, do a Select All and copy to BBEdit or your text editor of choice.
  • Replace the comma’s with semicolons to convert the data into a csv file Numbers can read.
  • Save as export.csv

If you want to verify the validity of the file you can use Quicklook to check if all the colums are correctly aligned. Often a misplaced , or ” in the middle of a songtitle can mess things up. Luckily this is easy to solve by either removing the character or by putting a backslash in front of it.

Part 2: Convert to iTunes Playlist format

  • Open export.csv in Numbers
  • Delete all columns that aren’t Artist, Album, Name, CD, Track
  • Sort alfabetically for convenience
  • Open this template file in Numbers. It contains all the necessary headers for iTunes to match tracks when you import it later.
  • Copy the corresponding columns from the first numbers file to this new one.
  • Export again as a your_playlist_name.csv and pick Unicode UTF-8 as a type.
  • Finally, open the csv in BBedit and replace the semicolons with a TAB so iTunes can work with it.

Part 3: Import into iTunes

  • Open iTunes 12.2.2
  • Make sure you have Apple Music enabled and are logged in correctly to your account.
  • Go to File > Library > Import Playlist and pick your_playlist_name.csv
  • iTunes will take a few moments to match the songs and a new playlist should appear with your songs.



Last year Apple released TestFlight, their in-house beta testing platform that allows Developers to easily distribute beta’s to testers. Throughout the year I tried (and bug reported!) a lot of apps this way, and I collected a nice set of (mostly expired) beta’s.

The months after WWDC are traditionally a beta season, when not only iOS, but also plenty of third party developers, are trying out new things, and bug-fixing their apps to become compatible with the new API changes.

Since most of the TestFlight Apps in my list are currently Expired, and a couple of developers are moving their last iPad only apps to a Universal model, my TestFlight contains a lot of stuff that will probably never be updated.

It’s easy to clear the list though: just swipe to the left on the app, select Unsubscribe, confirm and the app is gone from your list. Extra benefit for the developer: they gain 1 slot in their list of 1000. (Or is it 2000 now?)

Rock Werchter with an Apple Watch

Next week I’ll be enjoying four days of music at Rock Werchter. I love festivals and enjoy both listening to bands I already know (come on Dave Grohl, heal your leg!), and discovering new bands.

Werchter is one of Belgian’s biggest festival and it has multiple stages with bands playing at overlapping times. A few years ago I used to carry a paper program around the park, upgraded to a screenshot of the program on my iPhone’s homescreen a few years later, but this year I thought: why not use my Apple Watch? 

Checking when the next band comes up takes only a glance, I’m far less likely to lose my Watch than my iPhone in a crowd (moshpits) and — when it comes to easily glanceable information — the Watch is king.

I decided that, until native apps are available in September, the easiest approach at this moment would be the creation of a separate calendar in iCloud which contains all the performances as events. I can add that calendar as a glance to the Apple Watch (I’ll probably use the Modular watchface) and voila, a Festival schedule on my wrist.


The festival’s website only offers an overview and no downloadable .ics-file, so getting the program on the Watch required some scripting I copied the schedule to Drafts, used a bit of Javacript to prepend each line with a date, and append a location (the stage name) followed by /w to point it to a new Werchter calendar I created in advance.

I ended up with a long list of performances:

  • 25/06 14:00 – 14:50 Marmozets at Main Stage /w
  • 25/06 15:30 – 16:30 Eagles of Death Metal at Main Stage /w
  • 25/06 17:15 – 18:15 Rise Against at Main Stage /w
  • 25/06 19:00 – 20:00 Florence + the Machine at Main Stage /w
  • 25/06 21:00 – 23:30 Foo Fighters at Main Stage /w

Up next: getting this list, which is formatted in a parseable string, into Fantastical. I used this Drafts‘s Action to batch import all the events. After seeing my iPad quickly flipping back and forth between Drafts and Fantastical for a few minutes, everything calmed down and I ended up with a nice overview of all the performances in my Agenda.

So next week while ordering a fresh pint and listening to some awesome band, I can quickly glance at my Watch and see if I how long they’ve got left, and if there’s still time to play that one hit song they didn’t play yet.


After finishing this small project I realised that watchOS 1 only shows the current event on the watchface. If I easily want to see upcoming bands, I either need to open the Calendar or Fantastical app each time.. or install watchOS 2 and use the awesome Time Travel feature. It’s tempting..

For those who want to skip those steps and quickly import the schedule into iCal: here’s a downloadable ics-file..

Last week Dropbox released a new API endpoint that allows to lazily download files to your Dropbox folder without you needing to wait until the file is uploaded.

We’ve recently introduced a new feature to the Dropbox API: /save_url. This new endpoint lets app developers upload files to Dropbox by just providing a URL, without having to download the file first. – Dropbox Developer Blog

My first thought when I read this was: this is useful on iOS.

An example: I wanted to download Gruber’s Phil Schiller interview to my Dropbox for archiving while browsing on my iPad. Vimeo has a download option on their website, but due to restrictions in iOS this means: download the file in Safari first, wait for it to download completely (5GB!!), and then upload that same file via the Dropbox Extension hoping the thing doesn’t timeout or run out of RAM. In short, doing this is quasi impossible on iOS. and doing this over 3G is just insane, you’ll run out of data before the video has even downloaded completely.

Using the API

To solve this issue and using the new API I came across the following idea: what if I could somehow copy the link of a large file I want to download on iOS and pass it to a service that would trigger a download on Dropbox’s servers without any further user interaction.

This is what I came up with:
I hosted a file on my webserver that uses PHP to CURL a POST string to Dropbox’s servers. I surf to that webpage with a link that contains two parameters: $download_link and $token.

I then created a Workflow action that stores your Dropbox API token as a variable (local on device for security reasons), and captures a link in the clipboard, HTTP encodes it, and stores it as a second variable. The Workflow then generates an url that passes these two strings to my custom webpage, which than submits that data to Dropbox. A few moments later the file appears in your Dropbox folder.

The Webpage

I hosted the following code on my webhost:

  1. Parse you want to download)&token=(your Dropbox API token)
  2. Uses the last part of the download link ($end) as a filename.
  3. It tells Dropbox to save the file to /Inbox

//Parse URL
$download_link = $_GET[‘link’];
$access_token = $_GET[‘token’];

//Set POST variables
$end = end((explode(‘/’, $download_link)));
$url = “”.$end;
$data = array(‘url’ => $download_link);
$headers = array(‘Authorization: Bearer ‘ . $access_token);

//Open connection
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch,CURLOPT_POST, true);
curl_setopt($ch,CURLOPT_POSTFIELDS, $data);

//Execute post and close connection.
$result = curl_exec($ch);

Dropbox Token

You can get a temporary Dropbox token by following the steps described on this Dropbox page. It’s a temporary token for personal use only (it maps to your Dropbox), but for this project it serves its purpose.

Testing with a generated access token
If you’d like to test out the Dropbox APIs quickly using your own Dropbox account, you can generate an access token from your newly created app in the App Console by pressing the button that says “Generate” in the OAuth 2 section of your app settings page. Keep in mind that this is only for your own account and you’ll need to use the standard OAuth flow to obtain access tokens for other users.

Screenshot 2015-06-13 14.38.47


Since I want to use this script to send very large files from iOS to Dropbox without needing to download the files first, I needed an easy way to generate the correct link and open it in Safari. Which means: Workflow!

The workflow works as follows:

  • First I created a text-field that stores my Dropbox token, and I save it as a variable Token.
  • Then I get the clipboard from my device and HTTP Encode it so I can use it as a parameter value in the link I need to generate.
  • Finally I generate the complete link you want to download)&token=(your Dropbox API token).
  • And I open the link in Safari which shows you status message.

IMG_0135 copy

The Result

Combining it all together gives me a workflow like this:

  • Go to a webpage and copy a download link to a large file. (A 950MB WWDC movie in this case)
  • Open Workflow and open the select the script.
  • Safari will immediately open with a {pending} message, this means it’s uploading. You can close Safari and do something else.
  • A few moments later the file shows up in Dropbox. (took around 5 minutes)


In conclusion

This workflow will save me a lot of time but there are a few things I would love to improve. Currently this process needs access to a custom webpage to run the Curl command. It would be better if I could just call Curl POST from within Workflow or by triggering another app via an URL- scheme.

Secondly the webpage currently shows the first response you get after doing the POST command, which is a {{pending}} message. It’s a rather ugly result. There are some API calls to ask for the status until you get an {{uploaded}} message, but doing this would make the workflow a lot more complex.

And finally I’d like to expand the workflow so it searches for downloadable links on a webpage, offers them in a list so you can pick one and upload it without needing to manually copy the download link.

Merging iCloud and App Store Accounts

A friend of mine asked me the following question today:

I’ve got two AppleIDs, and The former I use for purchases, the latter for iCloud. Is there a way to merge these so I can start buying apps with the iCloud account; but don’t lose my existing purchases?

This used to be impossible, but thanks to Family Sharing this is now finally possible.

How it works

Let’s consider the current ecosystem: iCloud is the basis for Apple’s device integration going forward. You need it to sync data, you’ll need it for hand-off and continuity, and when HomeKit becomes widely available, your iCloud Account will connect all your devices, even when your outside. So it’s advisable to use your iCloud account as your main account on all your Apple devices.

Family Sharing means you link all AppleIDs in your family so they can each download the apps purchased by other family members. One AppleID is considered the Organizer, it holds the credit card and pays for all purchases not done via iTunes Store credits.

So in the scenario described above we decided to use the iCloud account as the Organizer, and add the Gmail App Store as a family member. This way my friend can use his iCloud account on all devices and sign in with a single AppleID, and go to App Store > Purchases > His other AppleID to download apps he bought previously.


Setting it up

  • I used his Mac to setup Family Sharing across the two accounts: and
  • First we logged both iCloud, App Store and iTunes into his iCloud AppleID under his current admin account on the Mac.
  • Next we went to System Preferences > iCloud and enabled Family Sharing. We added his old App Store account as a family member.
  • We need to accept this invitation with a user accounts that logged into the old App Store account. Instead of logging out of iCloud at this point, it’s easier to login as a guest user on the Mac. This way the Mac doesn’t need to resync all iCloud data after login in and out.
  • After you’re logged into the Guest user, go to iCloud, login with the old App Store ID, and accept the Family Sharing invitation.
  • All that’s left now is going to all the other devices and log out of the old account, and log in with the iCloud account where needed.

Possible Issues

Wrong iCloud Account

We ran into an issue after doing this — fully supported — procedure. After we logged into the App Store with the iCloud account we got the following error:

“This iTunes account is set up to use Family Sharing with a different iCloud account”

It’s a confusing error, but luckily it’s easily fixable:

  • On the iPhone go to iCloud > Family and click on the Organizer’s account
  • You’ll see that the mail address under Family Purchases won’t show the iCloud address, but rather the old AppleID.
  • Click on the email address and login with the iCloud account when prompted.
  • Reboot the iPhone.

No Apps Visible?

After you first login to the iCloud account in the App Store and select the old account under Purchases no apps will show up. If you wait 5-10seconds all apps will suddenly appear.


What we end up with is one iCloud account configured as an mail address. When you open the App Store under this Apple ID and go to Purchases, you’ll not only see the Apps bought with this AppleID, but also an entry for the old Apple ID, which allows you to download (and update!) all previously bought apps.

You can purchase new Apps with your iCloud account, but any updates to existing apps will be downloaded without any login prompts.

Starting on iOS 9, apps will have to declare what URL schemes they would like to be able to check for and open in the configuration files of the app as it is submitted to Apple. This is essentially a whitelist that can only be changed or added to by submitting an update to Apple. (…) This will also practically kill any sort of launcher app, and prevent apps like Drafts and Workflow from accessing services in other apps, chaining URL callbacks and other complicated automation tasks. – Greg Pierce

Serious chance in iOS 9 with implications for a lot of apps. Not only will launchers like Launch Center Pro become very limited, but also apps like Workflow or any app that wants to integrate with party services needs to rethink their strategy or plan a lot in advance. 

I understand why Apple is doing this, they want to protect user’s privacy, and URL schemes were a hack to begin with, most of which become useless once extensions became available. But it still has its uses, some apps even depend on it, so I hope Apple finds a better way to implement this.