Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add verbose log to indicate, that the restart is on purpose #354

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5b32bcf
Update github action for platformio
Sep 24, 2024
ebdbbcb
PlatformIO package 6.9.0
tueddy Sep 27, 2024
7646706
make compile on Arduino 3.0.5
tueddy Sep 29, 2024
6e93af8
clang
tueddy Sep 29, 2024
91054fb
disable bluetooth for Arduino 3
tueddy Sep 29, 2024
4b1995f
switch back to Arduino 2.0.17
tueddy Sep 29, 2024
7ba93fa
clang
tueddy Sep 30, 2024
de08152
Removal of support for non-PSRAM HALs + ESP32-A1S
Oct 14, 2024
7abedc9
Merge pull request #346 from biologist79/removal_of_non_psram_HALs
biologist79 Oct 17, 2024
f99feda
Cleaning up `management.html` (#348)
Trainbird Oct 22, 2024
e3e9d1b
Update 3rd party libraries
tueddy Oct 22, 2024
5157cbe
clang
tueddy Oct 22, 2024
e109726
pio arduino 3.0.7, ESPAsyncWebServer v3.3.20
tueddy Oct 25, 2024
f783005
Enable CONFIG_ESP32_REV_MIN_3 to save some IRAM
tueddy Oct 29, 2024
36822d0
Update ESP32-audioI2S to latest version, seems to work fine with Ardu…
tueddy Oct 29, 2024
f3afa51
SdCard.cpp -> simplify 'SdCard_ParseM3UPlaylist' and fix parsing (#351)
h4kun4m4t4t4 Nov 17, 2024
5b5eda9
update changelog & revision
tueddy Nov 17, 2024
f052c50
Update Audio library
tueddy Nov 18, 2024
624cfab
webserver library v3.3.23
tueddy Nov 25, 2024
8323438
Moving settings to the Web UI (#350)
Trainbird Nov 25, 2024
9182dbd
update changelog & revision
tueddy Nov 25, 2024
e7e8d22
Set max volume of 21 as default volume for speaker+hp
Dec 8, 2024
cb17f78
Update README
Dec 8, 2024
4ecf328
add verbose log to indicate, that the restart is on purpose
thebino Dec 10, 2024
49cb606
LPCD: Only wake up if card is present in NVS (#352)
fox34 Dec 16, 2024
532c90a
Merge branch 'dev' into feature/add-logs
tueddy Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .github/workflows/test-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,8 @@ jobs:
strategy:
matrix:
variant:
- esp32-a1s
- lolin32
- lolin_d32
- lolin_d32_pro
- lolin_d32_pro_sdmmc_pe
- nodemcu-32s
- az-delivery-devkit-v4
- ttgo_t8
- complete

Expand All @@ -40,15 +35,15 @@ jobs:
${{ runner.os }}-pip-

- name: Cache PlatformIO
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}

- name: Setup Python 3.9
- name: Setup Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.11'
- name: Install PlatformIO Core
run: |
pip install -U setuptools platformio
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ html/*.min.html
html/locales/*.min.json
html/js/*.min.min.js
html/js/swaggerInitializer.min.js
managed_components/
95 changes: 45 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,25 @@ signal of it: I did all my tests with
[UDA1334](https://www.adafruit.com/product/3678),
[MS6324](https://forum.espuino.de/t/kopfhoererplatine-basierend-auf-ms6324-und-tda1308/1099/) and
[PCM5102a](https://github.com/biologist79/ESPuino/tree/master/PCBs/Headphone%20with%20PCM5102a%20and%20TDA1308).
General advice: ESPuino makes use of library
[ESP32-audioI2S](https://github.com/schreibfaul1/ESP32-audioI2S/); so everything that's supposed to
work with this library should work with ESPuino, too (but maybe not right out-of-the-box).
Especially this is true for
[ES8388](https://github.com/schreibfaul1/ESP32-audioI2S/blob/master/examples/ESP32_ES8388/ESP32_ES8388.ino).

## Hardware setup

You could start on a breadboard with jumper wires but I _strongly_ recommend to start right away
with a PCB that was especially developed for ESPuino. There are several available, but
[ESPuino-mini 4L (SMD)](https://forum.espuino.de/t/espuino-mini-4layer/1661) can be considered as
being the latest generation. Furthermore you need a ESP32-develboard like (or another one that's
being the latest generation. This pcb can obtained via the forum.

![mini4L](https://forum.espuino.de/uploads/default/original/2X/b/b2762236b56ea3d4aa776dcbb5f5c7254f8a02b4.jpeg "Mini4L carrier PCB")

Furthermore you need a ESP32-develboard like (or another one that's
pin compatible):

- [D32 pro LiFePO4](https://forum.espuino.de/t/esp32-develboard-d32-pro-lifepo4/1109)
- [E32 LiPo](https://forum.espuino.de/t/esp32-develboard-e32-lipo/1135)
- [Wemos Lolin D32 pro](https://www.wemos.cc/en/latest/d32/d32_pro.html)

LiFePO4-Develboard was developed my myself can be obtained obtained via the forum. This is how it looks like:
![LiFePO4-Develboard](https://forum.espuino.de/uploads/default/original/2X/b/b0b6d9562a5b33e396850a9ab307dfc6f2a913cc.jpeg "LiFePO4-Develboard")

> :warning: **Due to memory restrictions meanwhile it's mandatory to use ESP32 with
PSRAM.** This being said you need to make sure that your develboard carries an ESP32-WROVER.
And you should make sure that 16 MB flash memory is available (both is true for all
Expand All @@ -69,8 +70,7 @@ develboards named above).
Optionally a [headphone-pcb](https://forum.espuino.de/t/kopfhoererplatine-basierend-auf-ms6324-und-tda1308/1099/)
can be attached to [ESPuino-mini 4L (SMD)](https://forum.espuino.de/t/espuino-mini-4layer/1661).

However, feel free to develop PCBs yourself. But again, be advised your ESP32 needs PSRAM in order to
run ESPuino properly.
However, feel free to develop PCBs yourself. But again, be advised your ESP32 needs PSRAM in order to run ESPuino properly.

## Getting started

Expand All @@ -97,13 +97,12 @@ run ESPuino properly.
lolin_d32_pro_sdmmc_pe).
- Edit `src/settings.h` according your needs.
- Edit board-specific (`HAL`) config-file (e.g. `settings-lolin_d32_pro_sdmmc_pe.h` for Lolin
D32/D32 pro). If you're running a board that is not listed there: start with `settings-custom.h`
D32 pro). If you're running a board that is not listed there: start with `settings-custom.h`
and change it according your needs.
- Connect your develboard via USB, click the alien-head icon in the left sidebar, choose the project
task that matches your desired HAL and run `Upload and Monitor`. All libraries necessary are
fetched automatically and compilation of the code gets started. After that, your ESP32 is flashed
with the firmware. Depending on your develboard it might be necessary to push a button in order to
allow ESP32 to enter flash mode (not necessary für Lolin32, D32 und D32 pro).
with the firmware.
- Now have a look at the serial output at the bottom of Visual Studio Code's window. At the first
run there might appear a few error messages (related to missing entries in NVS). Don't worry, this
is just normal. However, make sure the SD card is detected as this is mandatory!
Expand All @@ -128,9 +127,9 @@ run ESPuino properly.

## SD-card: SPI or SD-MMC (1 bit)-mode?

Having the SD card working is mandatory, ESPuino doesn't start without working SD card (at least
Having the µSD card working is mandatory, ESPuino doesn't start without working SD card (at least
unless `NO_SDCARD` hasn't been enabled previously). However, there are two modes available to
interface SD cards: SPI and SDMMC (1 bit). Be advised that SDMMC is twice as fast as SPI and
interface µSD cards: SPI and SDMMC (1 bit). Be advised that SDMMC is twice as fast as SPI and
needs one GPIO less. So basically it's a no-brainer.

## Which RFID-reader: RC522 or PN5180?
Expand Down Expand Up @@ -253,49 +252,45 @@ width="30%"></img>

It's not just simply playing music; different playback modes are supported:

- `Single track` => plays one track one time
- `Single track (loop)` => plays one track forever
- `Single track of a directory (random). Followed by sleep` => picks and plays one single track out
of a directory and falls asleep subsequently. Neopixel gets dimmed.
- `Audiobook`=> single file or playlist/folder; last play position (file and playlist) is saved
(when pushing pause or moving to another track) and reused next time
- `Audiobook (loop)` => same as audiobook but loops forever
- `Folder/playlist (sorted)` => plays all tracks in order from a folder one time
- `Folder/playlist (random order)` => plays all tracks in random order from a folder one time
- `Folder/playlist (sorted)` => plays all tracks in order from a folder forever
- `Folder/playlist (random order)` => plays all tracks in random order from a folder forever
- `All tracks of a random subdirectory (sorted)` => plays of tracks in order of a
randomly picked subdirectory of a given directory
- `All tracks of a random subdirectory (random order)` => plays all tracks in random order of a
randomly picked subdirectory of a given directory
- `Webradio` => always only one "track": plays a webstream
- `List (files from SD and/or webstreams) from local .m3u-File` => can be one or more files /
webradio stations with local .m3u as sourcefile
| Type | Action |
| ------------- | ------------- |
| `Single track` | Plays one track one time |
| `Single track (loop)` | Plays one track forever |
| `Single track of a directory (random). Followed by sleep` | Picks and plays one single track out of a directory and falls asleep subsequently. Neopixel gets dimmed.|
| `Audiobook` | Single file or playlist/folder; last play position (file and playlist) is saved (when pushing pause or moving to another track) and reused next time |
| `Audiobook (loop)` | Same as audiobook but loops forever |
| `Folder/playlist (sorted)` | Plays all tracks in order from a folder one time |
| `Folder/playlist (random order)` | Plays all tracks in random order from a folder one time |
| `Folder/playlist (sorted)` | Plays all tracks in order from a folder forever|
| `Folder/playlist (random order)` | Plays all tracks in random order from a folder forever |
| `All tracks of a random subdirectory (sorted)` | Plays of tracks in order of a randomly picked subdirectory of a given directory |
| `All tracks of a random subdirectory (random order)` | Plays all tracks in random order of a randomly picked subdirectory of a given directory |
| `Webradio` | always only one "track": plays a webstream |
| `List (files from SD and/or webstreams) from local .m3u-File` | Can be one or more files / webradio stations with local .m3u as sourcefile |

### Modification RFID tags

There are special RFID tags, that don't start music by themselves but can modify things. If applied
There are special RFID tags, that don't start music by themselves but can modify ESPuinos behaviour. If applied
a second time, it's previous action/modification will be reversed.

So first make sure to start the music then use a modification card in order to apply your desired
modification:

- Lock/unlock all buttons
- Sleep after 5/30/60/120 minutes
- Sleep after end of current track
- Sleep after end of playlist
- Sleep after five tracks
- Dim Neopixel
- Loop track
- Loop playlist
- Toggle WiFi (enable/disable) => disabling WiFi while webstream is active will stop a running
webstream instantly!
- Toggle Bluetooth sink (enable/disable) => restarts ESPuino immediately. In this mode you can
stream to your ESPuino via BT.
- Toggle Bluetooth source (enable/disable) => restarts ESPuino immediately. In this mode your
ESPuino can stream via BT to an external device.
- Toggle through the different modes (Normal => BT-Sink => BT-Source => Normal)
- Speech output of IP-address or current time
| Type | Action |
| ------------- | ------------- |
| Lock/unlock all buttons | Locks / unlocks all buttons (might be useful for toddlers|
| Sleep after 5/30/60/120 minutes | ESPuino falls asleep automatically after the given period |
| Sleep after end of current track | ESPuino falls asleep after the current track |
| Sleep after end of playlist | ESPuino falls asleep after the current playlist |
| Sleep after five tracks | ESPuino falls asleep after five tracks |
| Dim Neopixel | Dim Neopixel to nightmode |
| Loop track | Loops / unloops current track |
| Loop playlist | Loops / unloops current playlist |
| Toggle WiFi (enable/disable) | Enables / disables WiFi. Please note: disabling WiFi while webstream is active will stop a running webstream instantly! |
| Toggle Bluetooth sink (enable/disable) | Restarts ESPuino immediately. In this mode you can stream to your ESPuino via BT whereas websteam / SD is not available. Hint: if you lost this modification card you can 'escape' this mode with an RFID tag that's unknown to ESPuino. |
| Toggle Bluetooth source (enable/disable) | Restarts ESPuino immediately. In this mode your ESPuino can stream via BT to an external device whereas websteam / SD is not available. Hint: if you lost this modification card you can 'escape' this mode with an RFID tag that's unknown to ESPuino.|
| Toggle through the different modes | Normal => BT-Sink => BT-Source => Normal |
| Speech output of IP-address or current time | Speech output of IP address or current time |

> :information_source: All sleep modes do dimming (Neopixel) automatically because it's supposed to
be used in the evening when going to bed. Well, at least that's my children's indication :-)
Expand Down Expand Up @@ -354,7 +349,7 @@ Most designs use a Neopixel ring, but a linear strip is also possible.

> :warning: This section describes my default-design: 3 buttons + rotary-encoder. Feel free to
change number of buttons (up to 5) and button-actions according your needs in `settings.h` and
your develboard-specific config-file (e.g. `settings-lolin32.h`). At maximum you can activate five
your develboard-specific config-file (e.g. `settings-lolin_d32_pro_sdmmc_pe.h`). At maximum you can activate five
buttons + rotary-encoder. Minimum duration for long press (to distinguish vom short press) in ms
is defined by `intervalToLongPress`. All actions available are listed in `src/values.h`. If using
GPIO \>= 34 make sure to add a external pullup-resistor (10 k).
Expand Down
43 changes: 26 additions & 17 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## DEV-branch

* 25.11.2024: Moving some settings to the Web UI (#350), thanks to @trainbird !
* 17.11.2024: Simplify 'SdCard_ParseM3UPlaylist' and fix parsing, thanks to @h4kun4m4t4t4 !
* 29.10.2024: Update Audio lib
* 29.10.2024: Enable CONFIG_ESP32_REV_MIN_3 to save some IRAM
* 22.10.2024: Cleaning up `management.html` (#348), thanks to @trainbird !
* 22.10.2024: Update Arduino-IRremote to support the ESP 3.0 core
* 29.09.2024: Removal of support for non-PSRAM HALs (Lolin32, LolinD32, DevkitC) and ESP32-A1S
* 29.09.2024: Prepare for Arduino 3.0.5
* 27.09.2024: PlatformIO package 6.9.0

## Version 2.3 (23.09.2024)

Expand All @@ -17,8 +28,8 @@
* 20.05.2024: PlatformIO package 6.7.0 (Arduino 2.0.16, ESP-IDF 4.4.7)
* 20.05.2024: Disable bluetooth support for A1S (IRAM too small)
* 09.05.2024: Upgrade to Bootstrap v5.0 + Web-UI Enhancements (#328), thanks to @caco3 !
* 23.04.2024: Enhance UI minification (#323), thanks to @caco3 !
* 22.04.2024: Added virtual RFID-Cards (#319), thanks to @caco3 !
* 23.04.2024: Enhance UI minification (#323), thanks to @caco3 !
* 22.04.2024: Added virtual RFID-Cards (#319), thanks to @caco3 !
* 18.04.2024: Correct calculation of newFilePos for SEEK_POS_PERCENT, thanks to @sfields!
* 18.04.2024: Correct calculation of gPlayProperties.currentRelPos, thanks to @sfields!
* 18.04.2024: Get title from-VORBISCOMMENT and ID3, thanks to @sfields!
Expand All @@ -31,13 +42,13 @@
* 28.03.2024: Fix some warnings with upcoming Arduino 3 (ESP-IDF v5.1)
* 16.03.2024: Reduce memory usage by measurement of JSON payload length
* 15.03.2024: MQTT receive: Bug fix and avoid payload copy (#309), thanks to @eikel
* 15.03.2024: Add coverimage support for ogg, vorbis, opus (and some flac), thanks to @sfields !
* 15.03.2024: Add coverimage support for ogg, vorbis, opus (and some flac), thanks to @sfields !
* 19.02.2024: Add coverimage support for M4A files in Web-UI
* 18.02.2024: Add coverimage support for flac files in Web-UI, thanks to @sfields !
* 15.02.2024: Rework playlist generation (#275), thanks to @laszloh !
* 18.02.2024: Add coverimage support for flac files in Web-UI, thanks to @sfields !
* 15.02.2024: Rework playlist generation (#275), thanks to @laszloh !
* 15.02.2024: Update sorting strings (#306), thanks to @freddy36 !
* 15.02.2024: Set title and navbar heading to hostname (#305), thanks to @freddy36 !
* 15.02.2024: Include mac address in info (#304), thanks to @freddy36 !
* 15.02.2024: Set title and navbar heading to hostname (#305), thanks to @freddy36 !
* 15.02.2024: Include mac address in info (#304), thanks to @freddy36 !
* 12.02.2024: Use natural sort (#296), thanks to @freddy36 !
* 09.02.2024: Remove explorerCreateParentDirectories (#301), thanks to @freddy36 !
* 08.02.2024: Remove convertFilenameToAscii (#298), Playlist fixes (#299), thanks to @freddy36 !
Expand All @@ -55,7 +66,6 @@
* 21.01.2024: Build (tag 2.2) is broken when NEOPIXEL_ENABLE is not set #289, thanks to @RolinBert !
* 21.01.2024: PN5180: Save about 500 Bytes of RAM


## Version 2.2 (17.01.2024)

* 14.01.2024: Modify CMD_DIMM_LEDS_NIGHTMODE to toggle night light mode (#287), thanks to @laszloh !
Expand All @@ -68,31 +78,31 @@
* 29.12.2023: /rfid endpoint: List all assigned nvs entries (#280)
* 29.12.2023: Enhanced capabilities for task runtime debugging
* 28.12.2023: Bugfix 1: DONT_ACCEPT_SAME_RFID_TWICE_ENABLE and web frontend, thanks to @sfields !
* 28.12.2023: Add configuration for critical (shutoff) voltage in Web-UI, thanks to @SZenglein !
* 28.12.2023: Add configuration for critical (shutoff) voltage in Web-UI, thanks to @SZenglein !
* 28.12.2023: New official PlatformIO package 6.5.0 (Arduino 2.0.14, ESP-IDF 4.4.6)
* 28.12.2023: Improve port expander handling (#283), thanks to @r-schmidt !
* 23.12.2023: Update audio library, avoid waiting in i2s_channel_write() to have more time in other tasks #636
* 22.12.2023: Web-UI: Preselection of root folder after load to avoid nasty warning when uploading files
* 17.12.2023: Update audio library, fixes click-noise seeking in file
* 13.12.2023: Immediately go to sleep if battery is critical (#274), thanks to @SZenglein !
* 12.12.2023: Long press behaviour, execute cmd directly after longpress-time (#279), thanks to @Joe91 !
* 17.12.2023: Update audio library, fixes click-noise seeking in file
* 13.12.2023: Immediately go to sleep if battery is critical (#274), thanks to @SZenglein !
* 12.12.2023: Long press behaviour, execute cmd directly after longpress-time (#279), thanks to @Joe91 !
* 12.12.2023: Fix false-positive error (Audio playback timeout)
* 10.12.2023: Distribute vTaskDelay() in main loop to avoid rare audio dropouts
* 10.12.2023: Fix wrong states on PE output pins (and SD-card failure on restart) #278, thanks to @36b6fp6s !
* 10.12.2023: Fix wrong states on PE output pins (and SD-card failure on restart) #278, thanks to @36b6fp6s !
* 09.12.2023: Fix webstream playlist abort when track fails (#276), thanks to @laszloh !
* 07.12.2023: Show RC522 firmware version at startup, same as PN5180
* 04.12.2023: fix stuttering sound with some WAV & MP3 files, thanks to @wolle !
* 04.12.2023: change trackprogress communication from websocket to http to improve stability
* 04.12.2023: Remove some convertAsciiToUtf8() #272
* 04.12.2023: Remove some convertAsciiToUtf8() #272
* 30.11.2023: Fix a nullptr access after trying to replay an invalid filename (#271), thanks to Olaf!
* 29.11.2023: Updated audio library to play more MP3s, faster track change & delivery of the cover image
* 25.11.2023: Save some cpu time in audio task by only updating the playtime statistics every 250ms
* 22.11.2023: Web-UI: Search for files feature #268
* 22.11.2023: Web-UI: Search for files feature #268
* 21.11.2023: New command CMD_TOGGLE_MODE to switch Normal => BT-Sink => BT-Source
* 21.11.2023: Bugfix: Some commands e.g. Play/Pause did not work in BT-Source mode
* 21.11.2023: Faster pairing animation in BT-Source mode to better distinguish between the two BT modes
* 19.11.2023: Give audiotask a higher task priority, fixes crackling sound
* 19.11.2023: bugfix_same_rfid_twice init #262, see Github comments
* 19.11.2023: bugfix_same_rfid_twice init #262, see Github comments
* 17.11.2023: Show track progress, current playtime & duration in web-ui (#267)
* 16.11.2023: Fix delay with getLocalTime()
* 14.11.2023: Multi Wlan improvements (#266), thanks to @laszloh !
Expand All @@ -101,7 +111,6 @@
* 08.11.2023: Better logging for boards without PSRAM, fewer logs when compiling with NO_SDCARD
* 07.11.2023: Set timezone after startup, thanks to @Joe91 !


## Version 2.1 (07.11.2023)

* 04.11.2023: LPCD: wakeup check for ISO-14443 cards also with IRQ connected to port-expander
Expand Down
Loading
Loading