Library

We have an extensive library of various bOS configuration examples. Select your heating pump, AC, TV or almost any other device and import it to your smart building configuration. We also encourage all system integrators and DIYs to add their own examples to ComfortClick library.

Spotify icon

Spotify

Spotify integration via HTTP driver

DOWNLOAD

Spotify is a digital music, podcast, and video service that gives you access to millions of songs and other content from creators all over the world. It is available across a range of devices, including computers, phones, tablets, speakers, TVs, and cars, and you can easily transition from one to another with Spotify Connect.

Device preparation

For using Spotify API with bOS, authorization procedure has to be done first. In order to authorize, following steps are needed:

  1. Make a Spotify developer account and add a new app on a dashboard,
  2. Generate refresh token with a help of Postman or similar tool of choice.

To add an app on a dashboard click on Create app button, add App name and description, as Redirect URL https://localhost:8081 can be added and on the bottom select Web API. After that your app will be visible on the dashboard.

Now you can open Postman application and add new GET request so we will get the Access token. Select tab Authorization and Select OAuth 2.0 as authorization type fill the fields like in the description below:

Before getting the new access token Postman’s Callback URL (https://oauth.pstmn.io/v1/callback) has to be added as redirect URL to Spotify dashboard app. Once this is done, Get Access Token button can be clicked on the bottom. You will be redirected to the Spotify web site where you will need to click on Allow button so the Spotify will be connected to your app which was created on the dashboard. In postman the Access token will open and you need to copy your Refresh token.

Configuration

Download the example from our website and import it into configuration. Step by step instructions on how to import are available in our instructional video.

When the example is imported, the refresh token can be pasted under Spotify Authorization/Refresh Token String value. In both Spotify and Spotify Authorization nodes, the username and password need to be added. In both cases the Client ID is the username and Client secret is the password. After that the Refresh token command can be sent. If everything was done correctly, token should be visible under Token String value.

Once everything is set the Spotify control panel can be drag and dropped into visualization and you should be able to control the Spotify via bOS Client. To refresh the current state a small button can be used on the bottom of the Spotify frame but you can also set cyclical sending on the state command and the state will be refreshed automatically.

Comments

Please login to post a comment.

This website uses cookies

We use cookies to personalize content, use live chat, provide social media features and to analyze our traffic. We also share information about your use of our site with analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Join ComfortClick Best Project Competition