In 2017 Spotify finally deprecated their public vanilla C SDK library, libspotify, and officially replaced it with dedicated SDKs for iOS and Android and this new-fangled web thing we’ve all heard so much about. This is probably great for their maintainability but makes writing a native application for a Linux or a hardware device significantly harder, at least without an application process and NDA. Or is it? Instead of using that boring slab of glass and metal in their pocket [Dani] wanted to build a handy “now playing” display and remote control interface but was constrained by the aforementioned SDK limitations. So they came up with a series of clever optimizations resulting in the clearly-named ESP8266 Spotify Remote Control.
The Spotify Remote Control has a color LCD with a touchscreen. Once attached to a Spotify account it will show the album art of the currently playing track (with a loading indicator!) and let you play/pause/skip tracks from its touch screen, all with impressively low latency. To get here [Dani] faced two major challenges: authorizing the ESP to interact with a user’s Spotify account, and low latency LCD drawing.
The latest version of the Spotify desktop player (finally) fixes this shortcoming. Mac and Windows users can now connect to your Google devices through the Spotify desktop player’s “Connected.
If you’re not on iOS or Android, the Spotify web API is the remaining non-NDA’d interface available. But it’s really designed to be used on relatively rich platforms such as fully featured web browsers, not an embedded device. To that end, gone are the days of asking a user to enter their username and password in a static login box, the newer (better) way is to negotiate for a per-user token (which is individually authorized per application), then to use that to authenticate your interaction. With this regime 3rd party applications (in this case an ESP8266) never see a user’s password. One codified and very common version of this process is called OAuth and the token dance is called a “workflow”. [Dani] has a pretty good writeup of the process in their post if you want more detail about the theory. After banging out the web requests and exception handling (user declines to authorize the device, etc) the final magic ended up being using mDNS to get the user’s browser to redirect itself to the ESP’s local web server without looking up an IP first. So the setup process is this: the ESP boots and displays a URL to go to, the user navigates there on a WiFi connected device and operates the authorization workflow, then tokens are exchanged and the Remote Control is authorized.
The second problem was smooth drawing. By the ESP’s standards the album art for a given track at full color depth is pretty storage-large, meaning slow transfers to the display and large memory requirements. [Dani] used a few tricks here. The first was to try 2 bit color depth which turned out atrociously (see image above). Eventually the solution became to decompress and draw the album art directly to the screen (instead of a frame buffer) only when the track changed, then redraw the transport controls quickly with 2 bit color. The final problem was that network transfers were also slow, requiring manual timesharing between the download code and the display drawing routing to ensure everything was redrawn frequently.
Check out [Dani]’s video after the break, and take a peek at the sources to try building a Spotify Remote Control yourself.
Requirement: Davaar64 on Linn DS/DSM and minimum Kazoo 4.13
What is a PINA PIN is a shortcut on the Linn DS to allow to quickly select inputs, Radio stations, Albums etc. This from subscribed services such as Tidal, Qobuz Calm Radio and UPnP Media servers, (currently only Kazoo Server). Pin support for more UPnP Media Servers will be added in the near future.
Creating PINSYou create the PINS actions from Kazoo for
Note: Windows7 Kazoo and MAC OSX 10.10 does not have the PIN function.
Selekt DSMThe six buttons on the front panel of the Selekt DSM are PIN buttons. Press one of those to get your selected Pin.
Series3 - 301 The six numbered buttons on the top plate of the Series 3 are PIN buttons. Press one of those to get your selected Pin.
Majik DSM (2020 variant)The six buttons on the front panel of the Majik DSM are PIN buttons. Press one of those to get your selected Pin.
IR Remote control PIN use
The REM 022 IR handset has six direct selection PIN buttons
The Linn IR handsets allow to select a defined PIN on your Linn DS/DSM using the number (1-6) keypad.
...
If you have any difficulty after creating new PIN's in Kazoo:
PIN FAQs:
The Series3 can also be setup as Bluetooth speaker for Alexa and get the best sound from your Music
Instructions on how to setup Linn Smart Home There are a limited number of commands available using Alexa mainly volume, basic source switching, PIN selection and Sleep state. Here are some sample commands, some are self explanatory):
Currently only supporting the English language, but more can be added to the Wishlist on request.
Released in Feb 2017 for use with 'Kazoo Server (4.7 or later)' :
Control4 with Kazoo Server
***THESE ARE NOW AVAILABLE UNDER CERTIFIED ONLINE DATABASE***
Note:
{UPDATE: Previous versions, before V156, will NOT work with Control4 OS 3.20)
Crestron with Kazoo Server
***Downloadable from Crestron Application Market under Linn DS SmartMedia***
Note:
Spotify Ir Remote Mac Software
Other modules:
Spotify Connect can now be used on Linn products using firmware Davaar59 (Aug 2017) or later firmware. (That is, if your Linn DS/DS/HUB has had a software update after Aug 2017 then you can use Spotify connect)
This allows you to select and Play your Spotify music on your Linn DS/DSM players and use the internal volume control on the Linn DS/DSM.
To connect up your Spotify account to the Linn DS/DS/HUB:
This is web controlled and if your Linn DS/DS/HUB has already been paired with your Spotify account you will be able to control even if you are not on the same ethernet network.(So be careful that if you accidentally select the Linn DS/DS/HUB as a Spotify speaker and put the volume up high and you are not at home)
'Roon Tested'
The Linn DS/DSM IS a ROON CERTIFIED device
The Linn DS/DSM requires Davaar63 (May 2018) or later firmware to work with Roon V1.5 and above.(That is, if your Linn DS/DS/HUB has had a software update after May 2018 then you can use Roon) The Linn DS/DSM is a 'Roon Tested network player' This allows full hi-res audio, (192k/24bit) playback controlled by the Roon system Songcast is used to share audio between Linn Products when using Roon. It does not use RAAT (Roon Advanced Audio Transport) for sharing Music so cannot be setup as a Roon-Ready sharer.
Setup
On Linn DS proxy setups, Linn DS with Linn Kontrol preamplifer connected with RS232, the Roon volume control will not control the Linn Kontrol volume. This will only work with Linn DSM or Linn DS with internal volume control disabled. A Roon HUB is required in your network system to allow Roon to control your Linn DS/DSM. ENABLE the Linn DS/DSM player in the Roon - Settings - Audio - NETWORKED section.
Control
Primary control is through Roon. :Transport IR is disabled on the Linn DS/DSM when the Roon input is selected from Linn DS firmware release Davaar80 (Nov 2020) Spotify Ir Remote Mac Desktop
Issues
Roon uses the Linn DS/DSM as a media player, the control interface IS Roon.
Spotify Ir Remote Mac DownloadSpotify Ir Remote Mac Os
Retrieved from 'https://docs.linn.co.uk/wiki/index.php?title=Linn_DS/DSM_control&oldid=22436'
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |