Giter Club home page Giter Club logo

nfcsonos's Introduction

NFC Controller for Sonos

This app starts a Sonos favorite by scanning a NFC tag.

app icon

I started this project to simplify starting audio books on Sonos for the kids. Now they have a set of printed CD covers from which they can choose what they want to listen to. Choosing the same on the display of a smartphone or tablet always felt odd somehow. Now they can search through their collection of CD cover cards and pick one. By holding the card on a smartphone the Sonos box starts playing the linked album.

Get it on Google Play Buy Me A Coffee

How to

  1. Print a CD cover
  2. Stick a NFC tag on the back
    (I'm using photographic paper for printing. After sticking the NFC tag on the back I glue a cardboard over it.)

Sonos App

  1. Create a favorite in the Sonos app for a specific album

NFC Controller App

  1. Login with your Sonos credentials
  2. Select the Sonos group which the app should control
  3. Go to the "Pairing" section
  4. Choose the Sonos favorite from the dropdown and hit the "Pair" button
  5. Hold the NFC tag on (or behind) the phone to link the tag with the favorite

Now you can put the printed CD cover on your phone to start the album on the Sonos box. The app doesn't have to be started but the screen have to be turned on.

animation

Technical considerations

Sonos cloud

The app requires a Sonos login as it controls the box by sending commands to the Sonos cloud. In an early stage I was using UPNP commands which were sent to the Sonos box directly (no Sonos login necessary). But that turned out as too slow and too unstable. So I decided to send the commands through the Sonos cloud.

Need for Sonos favorites

The Sonos Cloud API doesn't allow to play an album from e.g. Spotify in a direct way (see Stackoverflow). The workaround is to create a Sonos favorite of an album.

TODO

  • Set speaker volume to a level which was configured in the app preferences

Screenshots

1 2 3 4

Credits

Sounds: https://mixkit.co/
CD cover placeholder image: Designed by rawpixel.com / Freepik
App icon made by Flat Icons from www.flaticon.com

nfcsonos's People

Contributors

kaiwinter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

immaneb erichier

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.