Forked from https://github.com/vergoh/micropython-spotify-status-display
The Spomacropad is a MicroPython implementation for ESP32, featuring a small OLED display to show the "currently playing" information of a Spotify playback device. You can customize it by adding a display, buttons, or a potentiometer according to your preference. For optimal usability, it is highly recommended to include the buttons.
- "currently playing" information with progress bar
- artist + track
- show/podcast + episode
- playback control (optional)
- previous track
- play / pause
- next track
- pause after current track
- add current track to library
- switch device playing
- configurable poll interval and behavior
- access token stored in the device after initial login
- buzzer (optional) for confirming button presses
- screensaver for standby mode
- self-contained implementation
- custom 3D printable case or custimze the model in Thinkercad
- ESP32 with MicroPython 1.14 or later
- version 1.18 or later recommended
- (I had problems with version 1.22, but 1.21 works fine)
- SSD1306, SSD1309, or SSD1315 compatible 128x64 pixel OLED display in I2C mode
- 0.96" SSD1306
- 0.96" SSD1315 (used in the images)
- 2.42" SSD1309
- most likely okay
- not verified
- 4 Cherry MX switches
- 4 keycaps
- 1 10k potentiometer
- WLAN connectivity
- Spotify account
- Premium needed for playback control
- control buttons (optional)
- buzzer (optional)
See also the beginning of Case.md for a full list of needed components for building the cased solution shown above.
- buttons don't react during API requests / server communication
- buttons require Spotify Premium due to API restrictions
- default font supports mainly US-ASCII characters
- unsupported Western characters are, however, automatically mapped to the closest US-ASCII equivalents
- playback device isn't aware of the status display, resulting in delayed status changes when the playback device is directly controlled
- better handling of rare cases of
ECONNABORTED
followed byEHOSTUNREACH
which gets displayed - async API requests / server communication (if possible)
- 3D printed case build or DIY wiring explains the hardware setup
- Configuration contains the install instructions
active, short press | active, long press | standby | |
---|---|---|---|
previous button | previous track | ||
stop button | play / pause / resume | save track | wake up and resume playback |
next button | next track | pause after current track | wake up |
switch button | switch playing to another available device | ||
potentiometer | volume control (when available) |
Long press is >= 500 ms by default.
file | description |
---|---|
ssd1306.py |
based on https://github.com/adafruit/micropython-adafruit-ssd1306 |
uurequests.py |
based on https://github.com/pfalcon/pycopy-lib/blob/master/uurequests/uurequests.py |
helpers.py |
reduced from https://github.com/blainegarrett/urequests2 |