Htec Spotify
Controls Spotify Connect playback from Control4 through the Spotify Web API: play, pause, skip, volume,
shuffle, repeat, seek, queue, Liked Songs, playlists, search, device transfer and presets.
Spotify Premium is required for playback control.
Tip: the Setup Instructions property at the top of the Properties tab always shows your next step.
Htec license
- License: the driver works only on a licensed controller. Send the value of
Htec Controller ID to Htec. Then paste the License Key you receive into Htec License Key.
Htec License Status should change to Licensed.
Each Htec driver needs its own key for that controller (keys start with the product code: SPT- for Htec Spotify, SCD- for Htec SoundCloud). An Htec ALL- key unlocks every Htec driver.
- Online check: once a day the driver checks the license with www.htecmarine.com (it sends the Controller ID,
the license key and the driver version). If the controller cannot reach the site, the driver keeps working for
14 days and Htec License Status shows the date it will stop; it starts again as soon as the check succeeds.
A license disabled by Htec stops at the next check.
- Free trial: without a key the driver runs a free 2-day trial on this controller (it needs internet the first
time; Htec License Status shows the time left). The trial is counted by Htec per controller, so removing and re-adding
the driver does not restart it. Enter a license key at any time to keep using the driver.
- Universal license: Htec can also issue a key that works on any controller (for dealers, demos or several boats),
with a limit on the number of controllers and an optional end date. It starts with the product code and -U
(for example SPT-U1A2B-...). The controller must reach www.htecmarine.com the first time before it works.
Connect your Spotify account
Step 1: Create a Spotify app (one time, about 2 minutes)
- On a computer, go to https://developer.spotify.com/dashboard and log in with your Spotify account (Premium).
- Click Create app. Enter any name and description, for example "Control4".
- Under Redirect URIs, add exactly:
https://www.htecmarine.com/spotify/callback.php and click Add.
- Under Which API/SDKs are you planning to use, tick Web API. Accept the terms and click Save.
- Open the app, go to User Management, and add the name and email of every Spotify account
you want to control from Control4 (Spotify allows up to 5 per app).
- Open Settings and copy the Client ID. In Composer, paste the
Client ID into the driver's Client ID property and click Set.
No Client Secret is needed; leave that property empty.
Step 2: Log in to Spotify (no copying codes)
- As soon as the Client ID is set, Setup Instructions shows a 6-character login code, for example
K7P2QX.
If it doesn't, click Actions > Connect Spotify Account.
- On any phone or computer, open www.htecmarine.com/spotify and type the code
(or open the link shown in the Authorization URL property).
- Log in with the Spotify account you want to control and click Agree.
- That's it. Within a few seconds Connection Status shows Connected as <your name> (premium).
The login is stored on the controller, so you don't need to log in again after reboots.
The code is valid for about 15 minutes. If it expired, click Connect Spotify Account again.
Htec's website only passes the one-time login code to your controller; it is useless without a secret that stays on the
controller, and nothing about your account is stored there.
Older installs (Redirect URI http://127.0.0.1:8888/callback)
Drivers set up before version 2.2 keep working as before (Client ID + Client Secret, then paste the browser address into
Authorization Code). To switch to the easier login: in your Spotify app, add the Redirect URI above; in the driver,
set Redirect URI to https://www.htecmarine.com/spotify/callback.php, clear
Client Secret, then click Connect Spotify Account.
Speakers: which room plays where
Spotify plays on Spotify Connect speakers (amps, streamers, smart speakers that appear in the Spotify app).
You don't need to pick one each time. For every room the driver chooses, in this order:
- the speaker last picked in that room under Speakers in the Spotify page of the Control4 app;
- a speaker whose name matches the room name, for example room Salon → speaker Salon Amp
(tip: name your Spotify Connect speakers after the Control4 rooms);
- Target Device (the default speaker);
- the speaker that is already playing, or the only speaker that is online.
The Room Speakers property shows each room's speaker. Actions > Reset Room Speakers forgets the picks.
Switch to a different Spotify account
- Make sure the new account is listed in your Spotify app's User Management (Step 1.5).
- On the Actions tab click Clear Authorization.
- In the browser, log out at spotify.com, or use a private window, so you can log in as the other account.
- Click Connect Spotify Account and repeat Step 2.
Multiple accounts and zones
A Spotify account plays one thing at a time. If the same account starts playing on a second speaker, the music
moves there and stops on the first. Plan rooms with that in mind:
- Different music in different rooms: use a different Spotify account for each (Family or Duo plan members
work well). Add one copy of this driver per account and connect each copy to its account. You can reuse the same
Client ID, but every account must be listed in the Spotify app's User Management (5 accounts at most).
One Htec license covers every copy on the controller.
- The same music in several rooms: group the speakers (a Sonos group, or the Control4 audio matrix when the
Spotify speaker feeds a matrix input). The driver plays to one speaker and the group carries it to the other rooms.
Each copy shows its account in the Spotify Account property and at the top of the Speakers list in the
Control4 app. With Name Driver After Account set to Yes, a copy still called Htec Spotify is renamed
Spotify - <account> so the copies are easy to tell apart. A name you typed yourself is never changed.
When Another Room Presses Play decides what happens when music is already playing for one room and someone
presses play in another room on the same copy:
- Move music to that room (default): the music moves to the new room's speaker.
- Keep playing where it is: the music stays on the current speaker and the new room controls it.
Use this with grouped speakers or an audio matrix. Picking a speaker under Speakers still moves the music.
After updating the driver
If Connection Status or Setup Instructions says re-authorize, the new version needs more Spotify
permissions. Repeat Step 2. Your other settings are kept.
Spotify in the Control4 app and touchscreens
This driver adds an Htec Spotify service to the room's Listen menu, with these tabs:
Playlists, Liked Songs, Albums, Artists, Recently Played, Search, Speakers.
It also adds a Now Playing screen with cover art, the queue, play/pause/skip, shuffle and repeat.
- Install: the file must keep the name
htec_spotify.c4z, because the app loads its icons from that name.
In Composer Pro, go to Driver > Add or Update Driver or Agent, then add Htec Spotify to a room.
- Rooms: nothing to wire. When you add the driver, its Digital Audio Client and Digital Audio
connections bind to Digital Media > Digital Audio on their own, the same way TuneIn and other services do.
Htec Spotify then appears in the Listen menu of every room that has digital audio.
To check, open the driver's Connections tab: both should show Digital Media->Digital Audio.
- Connect your Spotify account (see above). Then in File > Refresh Navigators, refresh the touchscreens and apps.
- In the app, open a room, tap Listen > Spotify and pick something to play.
Where the sound plays: Spotify plays on a Spotify Connect speaker. Control4 itself does not receive the audio.
Pick the speaker in the Speakers tab or with the Target Device property.
If that speaker is a Control4 amplifier or matrix input, add programming so the room selects that input:
When Spotify > Playback Started, select input X on the amplifier.
Room volume works when the room's volume is routed to this driver. Otherwise, use the speaker's own volume.
Lists show up to 200 items each (playlists, Liked Songs, albums).
Control4 Favorites
- Playlist, album or artist: press and hold it, then choose Add to Favorites.
- Song: tap it, then choose Add to Favorites. The favorite plays the song inside its playlist or album.
- What is playing now: on the Now Playing screen, tap the star. This saves the whole playlist or album
when there is one, otherwise the song.
The favorite then appears in the room's Control4 Favorites. Tapping it switches the room to Htec Spotify and starts playing.
Spotify's own favorites are under the Liked Songs tab.
Choose a device
Click Refresh Devices on the Actions tab, then pick a Target Device. If you leave it on
(Currently active device), commands go to whatever device Spotify is currently playing on.
Spotify only lists devices that are online. Some speakers go to sleep and only show up after you
open them once in the Spotify app.
Programming
Commands: Play (optional URI), Pause, Play/Pause toggle, Next, Previous, Set Volume, Volume Up/Down,
Mute toggle, Set/Toggle Shuffle, Set/Cycle Repeat, Seek, Skip +/- seconds, Add to Queue, Like/Unlike current track,
Play Liked Songs, Play Playlist by Name, Search & Play (playlist/album/artist/track), Transfer Playback, Play Preset 1-5.
The URI fields accept either spotify:playlist:37i9dQZF1DXcBWIGoYBM5M or a share link such as
https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M?si=....
Events: Track Changed, Playback Started, Playback Stopped, Device Changed, Track Liked, Track Unliked.
Variables: TRACK, ARTIST, ALBUM, ALBUM_ART_URL, DEVICE, IS_PLAYING, VOLUME, SHUFFLE, REPEAT,
TRACK_URI, CONTEXT_URI, POSITION_SEC, DURATION_SEC.
Troubleshooting
- No active Spotify device: select a Target Device, or start Spotify on a speaker or phone first.
- Premium required: the account is Free. The Web API rejects playback commands for Free accounts.
- access_denied in the browser address: you clicked Cancel, or the account isn't in User Management.
- INVALID_CLIENT: Invalid redirect URI: the Redirect URI in your Spotify app doesn't exactly match the driver's.
- invalid_client: the Client ID or Client Secret is wrong.
- Set Debug Mode to On and watch the Lua output window. The Last Error property shows the latest problem.
Version history
- 2.8: no installer password needed: enter your Client ID directly.
- 2.7: free 2-day trial without a key.
- 2.6: universal licenses (any controller, with a controller limit and optional end date).
- 2.5: fixes from a full review: a revoked Spotify login is no longer retried every few seconds,
account and speakers load when the internet comes back after a reboot, speaker names with commas are remembered,
paste-mode logins survive a reboot, numbered copies ("Htec Spotify (2)") are named after their account,
safer license check and start-up.
- 2.4 (build 20): daily online license check with www.htecmarine.com (works 14 days without internet;
Htec can disable a license).
- 2.3 (build 19): multiple accounts and zones. Spotify Account property, the Control4 app shows the account,
copies are named after their account, new When Another Room Presses Play setting.
- 2.2: login through www.htecmarine.com with a short code, no Client Secret needed (PKCE),
automatic speaker per room, Room Speakers property and Reset Room Speakers action.
Htec Spotify © 2026 Htec. All rights reserved. Licensed per controller.
Unauthorized copying or redistribution is prohibited.