Skip to content

Commit f1dd892

Browse files
Add Tips and Known Issues. Minor code cleanup.
1 parent 6426b6a commit f1dd892

File tree

7 files changed

+44
-14
lines changed

7 files changed

+44
-14
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,8 @@ See [full user settings documentation](./documentation/UserSettings.md) for deta
137137

138138
<img src="./images/platformio-task-upload.png" width="400">
139139

140-
See [instructions](https://docs.thingpulse.com/guides/esp32-color-kit-grande/#development-environment) if you encounter problems and need Trouble Shooting tips.
140+
See [instructions](https://docs.thingpulse.com/guides/esp32-color-kit-grande/#development-environment) if you encounter problems and need Trouble Shooting tips.
141+
142+
## Tips and Known Issues
143+
144+
To see a list of tips and known issues, see [Tips and Known Issues](./documentation/TipsAndKnownIssues.md).

documentation/TipsAndKnownIssues.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Tips
2+
- To surpress logging from the SpotifyAruduion library, goto the `SpotifyArduino.h` and commend out the following lines:
3+
```
4+
#define SPOTIFY_DEBUG 1
5+
6+
// Comment out if you want to disable any serial output from this library (also comment out DEBUG and PRINT_JSON_PARSE)
7+
#define SPOTIFY_SERIAL_OUTPUT 1
8+
9+
// Prints the JSON received to serial (only use for debugging as it will be slow)
10+
#define SPOTIFY_PRINT_JSON_PARSE 1
11+
```
12+
13+
- If you have a Color Kit Grande with 8 MB or more of Flash memory, you can expand the album art cache from 10 albums to 60 albums by using these settings in `platformio.ini`. See the file for additional comments.
14+
```
15+
board = custom_esp-wrover-kit
16+
board_build.partitions = partitions/custom_no_ota.csv
17+
```
18+
19+
- If you want to update your WiFi and Spotify credentials without modifying the source code, use the optional `user.ini` file. The file is ignored by Git and does not require changing code. See [full user settings documentation](./UserSettings.md) for details.
20+
21+
# Known Issues
22+
- Some capabilities require a Spotify Premium subscription and may not work fully on the ad supported tier. https://developer.spotify.com/documentation/web-playback-sdk
23+
24+
- At startup if nothing is playing the following may be logged repeatedly:
25+
`20:13:34.148 > [ 15318][E][ssl_client.cpp:37] _handle_error(): [data_to_read():361]: (-76) UNKNOWN ERROR CODE (004C)`
26+
When there isn't currently an active device or a device has been stopped for a period of time, playback controls may not work and these errors may be seen in the logs. Once music is started/resumed on the active device the errors will go away.
27+
28+
- When playback operations are performed, the SpotifyArdiuno library may log the following. It doesn't appear to affect the operation from actually working.
29+
```
30+
23:24:36.283 > [ 67244][V][ssl_client.cpp:369] send_ssl_data(): Writing HTTP request with 0 bytes...
31+
23:24:36.440 > [ 67407][V][ssl_client.cpp:381] send_ssl_data(): Handling error -80
32+
23:24:36.446 > [ 67408][E][ssl_client.cpp:37] _handle_error(): [send_ssl_data():382]: (-80) UNKNOWN ERROR CODE (0050)
33+
23:24:36.452 > [ 67412][V][ssl_client.cpp:321] stop_ssl_socket(): Cleaning SSL connection.
34+
23:24:36.457 > Failed to send request
35+
```

documentation/UserSettings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Color Kit Grande Spotify Controller User Settings
22

3-
This document explains how to configure the required user settings for the Color Kit Grande Spotify Controller. These include your Wi-Fi credentials, Spotify developer information, and timezone configuration.
3+
In order for this project to function, it needs to be able to connect to a WiFi network and authenticate with Spotify. This document explains how to configure it to do these things.
44

55
These values must be set before the device can connect to your network or Spotify account.
66

src/SCFileIO.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ void SCFileIO::giveSemaphore()
446446
void SCFileIO::hexDump(const char* tag, const char* filePath)
447447
{
448448

449-
spLogI(tag, "attempting hexDump in SCFileIO::hexDump()... ");
449+
spLogV(tag, "attempting hexDump in SCFileIO::hexDump()... ");
450450
// Check if logging level is at least verbose
451451
if (SCLogger::getInstance().getLogLevel(tag) < ESP_LOG_VERBOSE)
452452
{

src/SpotifyPlayer.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -556,9 +556,7 @@ void SpotifyPlayer::refreshCoverArt()
556556
*/
557557
void SpotifyPlayer::refreshCurrentSong(CurrentlyPlaying currentlyPlaying)
558558
{
559-
// Use the details in this method or if you want to store them
560-
// make sure you copy them (using something like strncpy)
561-
// const char* artist =
559+
562560
spLogI(LOGTAG_MULTITASK, "Refreshing current song. SpotifyPlayer::refreshCurrentSong(CurrentlyPlaying currentlyPlaying)");
563561

564562
// If not a track or episode, update the UI accordingly and indicate music isn't available

src/ThingPulse/spotify.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,10 @@ extern const char *spotify_image_server_cert;
3636
// If you change the value here, you need to modify the redirect URI on Spotify as well.
3737
#define SPOTIFY_ESPOTIFIER_NODE_NAME "tp-spotify"
3838

39-
// the spotify-api-arduino library sets this to 1 (i.e. enabled) by default
40-
#define SPOTIFY_DEBUG 0
41-
//#define SPOTIFY_DEBUG 1
42-
#define SPOTIFY_SERIAL_OUTPUT 0
43-
#define SPOTIFY_PRINT_JSON_PARSE 0
44-
4539
#define SPOTIFY_REFRESH_TOKEN_FILE_NAME "/refresh-token.txt"
4640
// the '/callback/' path is essential as spotify.h#fetchSpotifyAuthCode() registers a handler for it
4741
#define SPOTIFY_REDIRECT_URI "http%3A%2F%2F" SPOTIFY_ESPOTIFIER_NODE_NAME ".local%2Fcallback%2F"
4842

49-
5043
String authCode = "";
5144
String scope = "user-read-playback-state%20user-modify-playback-state";
5245
WebServer server(80);

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ void setupLogging()
316316
logger.setLogLevel(LOGTAG_HEAP, ESP_LOG_INFO);
317317
//logger.setLogLevel(LOGTAG_TRACE, ESP_LOG_INFO);
318318
logger.setLogLevel(LOGTAG_FILEIO, ESP_LOG_INFO);
319-
logger.setLogLevel(LOGTAG_CACHE, ESP_LOG_INFO);
319+
// logger.setLogLevel(LOGTAG_CACHE, ESP_LOG_INFO);
320320
logger.setLogLevel(LOGTAG_VAULT, ESP_LOG_INFO);
321321

322322
// Supress logs for ESP32 components

0 commit comments

Comments
 (0)