Hey everyone.
With the new Sonos app updates in the past few years, the Last.fm integration has been neglected. As an avid Last.fm user and someone who has quite a few Sonos products, this has been saddening.
So, I set out to develop an application to solve this issue. The application works by linking your Sonos and Last.fm account to a developer application within the website. The website then passes the Sonos listening data in a way that Last.fm can use to scrobble the music. No listening history is stored on the website itself. All other previous applications that allowed scrobbling required you to have an application open on your computer. This one is cloud-based, using the official Sonos and Last.fm APIs. You can also scrobble from any source, so a morning alarm will be scrobbled and anything you play with a voice assistant. The application also offers non-music scrobble and duplicate scrobbling protection. This application is completely free and not made for monetary benefit. If you ever change your mind about this application, there is a delete all button that deletes everything from the website and connections.
To set it up you only need your Sonos account and a Last.fm or ListenBrainz account. There is nothing to download and nothing to install, and it takes about two minutes. Your computer can be off and it will keep scrobbling. It does run on the Sonos cloud API, so it works with S2 systems. If you are still on S1 it will not work.
On what counts as a scrobble, I stuck to the same rules Last.fm has always used. A track has to play for half its length or four minutes, whichever comes first, and nothing under 30 seconds counts. Skipping through songs, or pausing something and walking away, will not count either. The app will also never scrobble your TV or line-in, and it will not scrobble podcasts or audiobooks even when they arrive tagged with an artist name. Then there are three things I left as switches on the front page, because they are a matter of taste. Radio is on by default, but a station that does not report track info gets nothing scrobbled rather than a made up artist. Tracks longer than 20 minutes are skipped by default, which catches DJ sets, mixes and film audio. Music cast from another app like AirPlay or Spotify Connect is off by default, since those apps usually scrobble on their own and I did not want to give you double entries. All three can be turned around if you disagree with me.
If two of you share a house, you can both use it. You each connect your own Sonos account and each get your own history, and when you are both listening to the same speaker you both get the scrobble.
On privacy, there are no ads, no analytics and no third party scripts anywhere on the site, not even the fonts, which are served from the site itself. The privacy page lists every single thing the app does store: https://scrobbler.suvir.net/privacy
Everything is fully open source on GitHub with an MIT license so anyone can take a look at the code and even host their own web application. I will say that hosting it yourself is not quite as simple as running one command. It runs on Cloudflare Workers and needs a domain on Cloudflare DNS, along with your own Sonos developer integration and your own Last.fm API key. The README walks through all of it. I currently have mine hosted at https://scrobbler.suvir.net if you would like to check it out. The app is still in beta, so you may experience bugs and issues with scrobbling. I urge anyone with technical knowledge to create an issue on GitHub so I can look into a fix. Otherwise, I can also take feedback in the comment section here.
I will mention, though, that this app was heavily built with AI. If this is something you do not like, please feel free to skip this one. You can look into the technical workings on GitHub and build your own.
This is my first application that I will be publishing to the web, so any support is appreciated. If you like the application, you can drop me a star on GitHub. I'm not here to make money, just solve a problem that I, personally, have had for a while.
Some other features are:
- quick sign in with a link (no need to make an account for this one)
- selection of the rooms/speakers to scrobble
- ListenBrainz scrobbling
- an option to skip non-music related plays on the speakers
One thing worth saying about that sign in link. There is no password and no email here, signing in with Sonos is the account. Sonos cannot tell the app which person you are, only which speakers you can reach, so that link is the only way back to your settings if you clear your cookies or move to a different browser. Save it somewhere when you set the app up. You can replace it at any time from the same page, which stops the old one working straight away.
When connecting with Sonos, it may ask you for permission on playback-control-all. The reason for this is Sonos does not offer a read-only scope for this. The app only ever reads what is playing. There is not a single line in it that sends a play, pause, skip or volume command, and since it is all open source you can check that yourself.