# Issue with Bluetooth and Spotify

**URL:** <https://forums.balena.io/t/issue-with-bluetooth-and-spotify/155372>\
**Category:** Product support\
**Created:** [July 15, 2020, 2:42pm UTC](https://forums.balena.io/t/issue-with-bluetooth-and-spotify/155372 "2020-07-15T14:42:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nutella02](https://avatars.discourse-cdn.com/v4/letter/n/b487fb/32.png) [@Nutella02](https://forums.balena.io/u/Nutella02)\
**Post date:** [July 15, 2020, 2:42pm UTC](https://forums.balena.io/t/issue-with-bluetooth-and-spotify/155372/1 "2020-07-15T14:42:14Z")

</div>

Hi there!

I installed balenaCloud on my Rasberry Pi3. I used to have problems with Dockerfile.template because I had to change the ‘d’ to capital ‘D’. But after doing that it uploaded nicely. Now I want to connect my device to the speakers. When I use Spotify, the device doesn’t show up as a ‘Spotify Device’, it’s invisible. I have Spotify premium account so this shouldn’t be an issue.  
The other problem is the Bluetooth. My phone finds the balenaSound and it connects but there is no sound when I play music or video. Also after a few minutes it disappears as an option from the Bluetooth list, I mean I can’t see it on the Bluetooth list on my phone, but it still connected somehow.  
What should I do? What is the problem?  
I would use Spotify so I would like solve that problem first.

---

<div class="post-metadata">

**Author:** ![jtonello](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jtonello/32/3246_2.png) [@jtonello](https://forums.balena.io/u/jtonello)\
**Post date:** [July 15, 2020, 3:52pm UTC](https://forums.balena.io/t/issue-with-bluetooth-and-spotify/155372/4 "2020-07-15T15:52:08Z")

</div>

Hi @Nutella02,

If you want to use Spotify Connect over the internet, you’ll need to provide your Spotify credentials. To enable Spotify login you can add your username/e-mail and password, which are set with two environment variables: `SPOTIFY_LOGIN` and `SPOTIFY_PASSWORD`. It sounds like you configured that, but can you confirm?

For the output issue, it could be related to the volume settings. This can be set with the `SYSTEM_OUTPUT_VOLUME` environment variable. The balenaSound docs page also has some other [troubleshooting tips](https://sound.balenalabs.io/docs/troubleshooting#no-audio). Also, balenaSound has a Deploy to balena option, which will provide base configurations and load the GitHub content automatically. You can also add environmental variables during the application-creation. [https://dashboard.balena-cloud.com/deploy?repoUrl=https://github.com/balenalabs/balena-sound](https://dashboard.balena-cloud.com/deploy?repoUrl=https://github.com/balenalabs/balena-sound)

John

---

<div class="post-metadata">

**Author:** ![Nutella02](https://avatars.discourse-cdn.com/v4/letter/n/b487fb/32.png) [@Nutella02](https://forums.balena.io/u/Nutella02)\
**Post date:** [July 15, 2020, 4:31pm UTC](https://forums.balena.io/t/issue-with-bluetooth-and-spotify/155372/6 "2020-07-15T16:31:51Z")

</div>

Is there an option to give my Spotify credentials to balenaSound?

---

<div class="post-metadata">

**Author:** ![jtonello](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jtonello/32/3246_2.png) [@jtonello](https://forums.balena.io/u/jtonello)\
**Post date:** [July 15, 2020, 4:34pm UTC](https://forums.balena.io/t/issue-with-bluetooth-and-spotify/155372/7 "2020-07-15T16:34:22Z")

</div>

Hi,

Yes, in the balenaCloud dashboard, click on the balenaCloud application, then click on “Device variables”. Create two new variables `SPOTIFY_LOGIN` (your email address usually) and `SPOTIFY_PASSWORD`. I’ve just done a fresh deployment on an RPi 3 and notice that the bluetoothXXX device is not staying visible in Spotify. I’ll check with our engineers on this.

Also, if you’re using just a single device, create another device environment variable called `DISABLE_MULTI_ROOM` and set the value to `1`.

John

---

<div class="post-metadata">

**Author:** ![Nutella02](https://avatars.discourse-cdn.com/v4/letter/n/b487fb/32.png) [@Nutella02](https://forums.balena.io/u/Nutella02)\
**Post date:** [July 17, 2020, 10:20am UTC](https://forums.balena.io/t/issue-with-bluetooth-and-spotify/155372/9 "2020-07-17T10:20:59Z")

</div>

This sound good. I’m a beginner at this can you explain me this step-by-step? I mean, I found the ‘Add Device Variables’ option but I don’t know what should I write in the boxes. Can you show me this configuration step-by-step?

---

<div class="post-metadata">

**Author:** ![majorz](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/majorz/32/639_2.png) [@majorz](https://forums.balena.io/u/majorz)\
**Post date:** [July 17, 2020, 12:40pm UTC](https://forums.balena.io/t/issue-with-bluetooth-and-spotify/155372/11 "2020-07-17T12:40:36Z")

</div>

Hi, here is the link with the detailed description on how to enter variables: [https://www.balena.io/docs/learn/manage/serv-vars/](https://www.balena.io/docs/learn/manage/serv-vars/)

Here is the GitHub issue that my colleague commented on when he tested the Spotify integration and it did not work for him: [https://github.com/balenalabs/balena-sound/issues/224](https://github.com/balenalabs/balena-sound/issues/224)

Thanks,  
Zahari

---

<div class="post-metadata">

**Author:** ![Nutella02](https://avatars.discourse-cdn.com/v4/letter/n/b487fb/32.png) [@Nutella02](https://forums.balena.io/u/Nutella02)\
**Post date:** [July 20, 2020, 8:45am UTC](https://forums.balena.io/t/issue-with-bluetooth-and-spotify/155372/13 "2020-07-20T08:45:48Z")

</div>

Hi there! It looks like I solved the problem. Now I’m able to see the device on ‘Spotify Connect’. The problem is that there is no sound when I play the song. On Spotify I can see that the song is on but I can’t hear it. I’m using a HiFi berry AMP 2 and HiFi berry digi. What is the issue? What should I do?

---

<div class="post-metadata">

**Author:** ![phil-d-wilson](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/phil-d-wilson/32/3730_2.png) [@phil-d-wilson](https://forums.balena.io/u/phil-d-wilson)\
**Post date:** [July 20, 2020, 1:43pm UTC](https://forums.balena.io/t/issue-with-bluetooth-and-spotify/155372/15 "2020-07-20T13:43:12Z")

</div>

Hi,

Have you configured your device to use the Hifiberry DAC? See here:

> **[DAC Configuration - Home](https://sound.balenalabs.io/docs/dac-configuration/)**
>
> Build a single or multi-room streamer for an existing audio device using a Raspberry Pi! Supports Bluetooth, Airplay and Spotify Connect

Thanks,  
Phil
