logo elektroda
logo elektroda
X
logo elektroda

Internet radio and audio file player on ESP32-S3

MAJSTER XXL 100725 1227
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1171 21545920
    robgold
    Level 20  
    @hevet
    Currently this is the case, a reset is required for the extended volume configuration to work. The audio object is only configured once at startup.
    I'll have a look at the configuration description maybe there is an inaccuracy there and correct it if I can, maybe even in the version I'm already testing with full websockets.

    As for the problem of titles, I have not noticed it at home. They are displayed correctly, unless the station uses a strange character coding, then "bushes" appear in place of Polish characters. If the station broadcasts a long "stationstext", it is scrolled and you have to wait a while.

    What browser are you using? If you have many tabs open, Chrome, for example, often puts the tabs to sleep and then java script and websocket no longer work after a while.
  • ADVERTISEMENT
  • #1172 21545928
    hevet
    Level 16  
    @robgold I am using Firefox. I've seen that in display Mode 0 the processText is removed, then in the browser it's fine, but in the radio I have no Polish characters.
  • #1173 21545968
    Lechuuu
    Level 13  
    I confirm, I also have no Polish characters.
    The small radio with soft v3.17.65, and the big radio with soft from yesterday v3.17.77

    Two black internet radio players with LCD displays showing missing Polish diacritical characters. .
  • #1174 21546077
    robgold
    Level 20  
    Yes, my mistake when I was testing the Scroller functions on the web I disabled the processing of Polish characters for a moment. I'll upload the fixes along with some other changes tonight.

    @hevet The problem turned out to be more complicated with this display, but kudos to you for spotting it. I've introduced a completely separate variable for web processing. This is due to the fact that WS accept text in UTF-8.

    @Lechuuu Very nice design. Like the larger display ?
    PS In the new softy you will have a problem, you have to for the second radio change the hostname to esp32radio2 or whatever. type "esp32kitchen" because the names will overlap for you. In the future I plan to make a counter that detects the host and they will number esp32radio, esp32radio2, esp32radio3, esp32radio4.... etc.
  • #1175 21546359
    Lechuuu
    Level 13  
    @robgold I'll remember before compiling to change hostname to something else. The big display is cool, you can't hear the inverter and there's no junk in the audio track either. Only thing I noticed is that the pixel colour is not as white as in the smaller one (brightness settings the same for both). The housings are such monstrosities - there are no cool plastic housings on the market, you sculpt from what is there.... It would be useful to have some Bamboo 3D in the future.
  • ADVERTISEMENT
  • #1176 21546369
    robgold
    Level 20  
    I have uploaded version 3.17.90 to GitHub

    - corrected PL fonts
    - corrected display of station text on www page
    - There is no longer scrolling station text on a web page. Everything is displayed as text in 3 lines
    - volume slider now reacts to the mouse wheel
    - all data updates on the web page are done via websocket, I removed the whole "processor" from AsyncWeb
    - I changed the description for volume range changes in the configuration: Max Volume Extended range -> 1-21 [Off], 1-42 [On].
    - changed the display order on the web page Bank/Station instead of Station/Bank which seems natural, first the bank number then the station number
    - I reduced the font size of the station list from 1.1 to 0.95 so that the whole thing fits on a fullHD monitor in a browser without scrolling
    - the menu button at the bottom of the page is in the style of the other buttons


    ESP32 Web Radio webpage with radio station list, volume slider, and bank selection buttons.
  • ADVERTISEMENT
  • #1177 21546491
    gabar5
    Level 12  
    I am trying to update via OTA UPDATE, seemingly finish, but still have the previous version. Any advice?
  • #1178 21546542
    robgold
    Level 20  
    @gabar5
    Switch off, switch on the radio and upload the file again. If this happens again, see what you get on the terminal. Perhaps you have too small an application partition, then you will get a corresponding message on the terminal that there is no space and ESP will not upload the new software.

    @Lechuuu
    See for yourself KM-106 Link .
    Basically all you need to do is the front and back panel. Price-wise a very affordable enclosure.
  • #1179 21547581
    nouki
    Level 25  
    Hello.
    After completing all the missing libraries, I get this error when compiling. And that I am a couple of days old in arduino :) not really know what to do next:) .

    Code: Arduino
    Log in, to see the code
  • #1180 21547652
    robgold
    Level 20  
    What version of the ESP Async WebServer library do you have, AsyncTCP ?
    You may have incompatible versions. I am currently using ESP Async 3.6.0, AsyncTCP 3.3.2

    Have you tried changing the h-file:

    Code: C / C++
    Log in, to see the code
    .

    ?
  • #1181 21547665
    nouki
    Level 25  
    Code: Arduino
    Log in, to see the code
    .

    after changing to another library another error occurs

    Code: Arduino
    Log in, to see the code
    .
  • ADVERTISEMENT
  • #1182 21547674
    robgold
    Level 20  
    Do you have these versions installed ? Because Arduino is not Platformio it will not work for you to write #define ASYNCTCP_VERSION "3.3.2".
    Show a screenshot of the library manager.

    I took a peek in Visual Studio/Platformio and there it compiles the radio with ESP32Async/ESPAsyncWebServer @3.7.2
    and ESP32Async/AsyncTCP @3.3.6 so the latest libraries also work.
  • #1184 21547795
    DJCheester
    Level 26  
    A question, will a software update from version 65 to the latest version but in a configuration without an SD card (i.e. SPIFFS) involve uploading files to memory again ???

    Greetings ...
  • #1185 21547890
    robgold
    Level 20  
    @nouki I don't know what you are doing wrong or which library you have in the wrong version. I uploaded on a completely fresh Arduino compilation with libraries as below:
    ESP32 Core 3.0.7
    AsyncTCP - 3.3.6
    ESP Async 3.7.2
    i2s audio 3.0.13

    The rest of the libraries as on GitHub and everything compiled elegantly.

    Second attempt (latest libraries) on:
    ESP32 Core 3.0.7
    AsyncTCP - 3.4.1
    ESP Async 3.7.7
    i2s audio 3.0.13

    On both the official release ino 3.17.90.

    Also a complete success !
    The sketch uses 1933253 bytes (57%) of program memory. The maximum is 3342336 bytes.
    Global variables use 69348 bytes (21%) of dynamic memory, leaving 258332 bytes for local variables. The maximum is 327680 bytes.
    .

    @DJCheester In theory it shouldn't. I tested this by uploading the soft via OTA and it didn't delete. I don't currently have a radio playing with SPIFFS to test this for you.
  • #1186 21548045
    nouki
    Level 25  
    After a battle since the last post lasting 2h went:)

    Code: Arduino
    Log in, to see the code
    .
    Come on, I don't know why the difference :) .
    Additionally, I have a question if it would be possible to add ws2812 support to the project along with adding to the settings on the page?
    The purpose of illuminating the encoder knob and keyboard. It would be simpler to control this by being able to illuminate the keyboard when running as well as the knob with one output, and leave the knob alone in a different colour when switched off.

    Regards.
  • #1187 21548627
    robgold
    Level 20  
    I have uploaded version 3.17.99 to GitHub

    I improved mainly the web interface:
    - stream information in the "www display" window (bitrate, sample rate, encoding i.e. e.g. 44.1kHz, 16bit 128kbps)
    - information on www "no audio stream" if our player cannot find the URL or the stream has stopped playing for some reason
    - there is no OLED Display Mode button. Now pressing on the "display" window on the www performs the Display Mode functions.


    ESP32 Web Radio panel showing currently playing station, stream parameters, volume control, and bank selection. .

    Screenshot of the ESP32 Web Radio interface with a green Display Mode Changed message, volume slider, and station bank selection buttons. .


    For those who use OTA via the website. Please do not update the I2S library. There is a problem, after updating to 3.0.13 the ESP module can't accept the file or will accept 4-10kb and loses the WiFi connection. Tested on Arduino and Platformio. Effects are the same.

    Errata:
    Situation with the library contained. I have found the cause. The author (Walle) has corrected and the current version of the i2s library already supports correctly the stream stop, which was causing the OTA to "lock up".

    @hevet I saw that you started a thread with the author of the audio library regarding the character encoding of the Baobab radio. Does this fix work for you? In the new library it is true stationtext is UTF8 but I don't see any improvement. Still some names are incorrectly encoded which causes problems with WebSockets and the Async server. I wrote an email to Radio Baobab to start encoding correctly in UTF8. So far no response.
  • #1188 21552041
    MAJSTER XXL
    Level 29  
    Hello after a little break, such is my case today, I finally reassembled my v2 version into a new chassis (as it finally came on sale at TME), once assembled everything started up and played as expected. Well, I decided to run the Arduino IDE, which I haven't switched on for a long time, and rebuild the code and load what I had last time I checked (the same as on my github). What was my surprise that now I have no audio output at all, all the radio functions work normally. I did an update of the Arduino IDE to the new version 2.3.6 - no change. I did an update with the board manager as it was calling something out there. ESP32 on version 3.2 as soon as connected to wifi resets the chip non-stop- well crap to the max. I reverted from ESP32 to version 3.1.3 the module now boots normally, but still no audio. Can anyone suggest what has happened here?


    A modern DIY internet radio with an LCD display on a wooden shelf, showing track information. .


    Screenshot of Arduino IDE 2.3.6 with board manager and console, showing multiple The channel is not enabled errors from i2s_channel_write for ESP32. .
  • #1190 21552050
    MAJSTER XXL
    Level 29  
    Great, that was it. I wonder, by the way, what kind of battered versions came out.
  • #1191 21552052
    hevet
    Level 16  
    There is precisely an error with I2S from one of the higher ones.
  • #1192 21552069
    robgold
    Level 20  
    The DMA access in the new ESP is implemented differently from what I understand on Wolle's website, but if you take the latest ESP package and manually replace the library with the latest one from this week with the stopSong fix, both radio and mp3 player should work.
  • #1193 21553207
    hevet
    Level 16  
    robgold wrote:
    I have uploaded version 3.17.99 to GitHub.

    @hevet I saw that you started a thread with the author of the audio library regarding Baobab radio character encoding. Does this fix work for you ? In the new library it is true stationtext is UTF8 but I don't see any improvement. Still some names are incorrectly encoded which causes problems with WebSockets and the Async server. I wrote an email to Baobab radio to get them to start encoding correctly in UTF8. So far no response.


    @robgold yes it works, it now displays the whole title, otherwise it cuts off after the html entity. Interesting fact, is that Baobab radio broadcasts in mp3 and ogg format, on ogg the encoding problem is not there. I've seen these bushes on another station yet, can't remember the name unfortunately.
    But do you mean just this station, or any others?
  • #1194 21553274
    robgold
    Level 20  
    @hevet only at this station the browser disconnects the WS with the information. that the text is not in UTF8 which unfortunately can be seen in the terminal and results in no control from the www after a while. Probably switching to JSON would "cover" this problem but that's not the point. I would rather have correct encoding or cut characters in incorrect encoding.
  • #1195 21553315
    Lechuuu
    Level 13  
    @robgold with this WS crashing is an interesting thing, I've noticed that at the 13th or 14th station switchover suddenly everything crashes in the browser, regardless of the station.... don't know if it's just me, but I've checked on firefox and on brave and it's the same on both
  • #1196 21553320
    robgold
    Level 20  
    @Lechuu_, there are still a lot of things to improve on version 99 which is on GitHub. The stations still switch with a simple GET. While for banks this doesn't bother me, with stations in the newer version I'll change this to WS as well. On the other hand, the question is whether WS stops working after time or immediately after switching ? Browsers have mechanisms to put WS to sleep after time.
  • #1197 21553325
    Lechuuu
    Level 13  
    @robgold switching stations say every 5-10 seconds, then after the 13th or 14th switch WS stops responding (immediately after switching). I've also tested chrome and edge still and it crashes on those too. I've tested this under Windows and Linux - same thing on both
  • #1198 21553373
    hevet
    Level 16  
    robgold wrote:
    @hevet only on this station the browser disconnects the WS with the information. that the text is not in UTF8 which unfortunately can be seen in the terminal and causes after a while no control from www. Probably switching to JSON would "cover" this problem but that's not the point. I would rather have correct encoding or cut characters in incorrect encoding.
    .

    73.Radio Baobab, Willy DeVille - Junkers Blues
    debug -> Display1 (zegar) stationStringScroll: 73.Radio Baobab, Willy DeVille - Junkers Blues
    displayDimmerActive: 1
    Kod NEC OK:9D62C837  MSB-LSB: EC1346B9  ADR:B9 CMD:13
    debug-- puls 9ms:0  4.5ms:0  1690us:0  690us:0
    Kod NEC OK:9D62C837  MSB-LSB: EC1346B9  ADR:B9 CMD:13
    debug-- puls 9ms:0  4.5ms:0  1690us:0  690us:0
    ### StationStringScroll lenght [chars]:33
    ### Station String Scroll Width (lenght * 6) [px]:198
    info        StreamTitle='Jan Chojnacki - Bielszy odcień bluesa 775 cz.1'
    streamtitle Jan Chojnacki - Bielszy odcień bluesa 775 cz.1
    ### StationStringScroll lenght [chars]:50
    ### Station String Scroll Width (lenght * 6) [px]:300


    I've had the radio on a bit, but haven't noticed a problem so far.
  • #1199 21554049
    robgold
    Level 20  
    @hevet
    exactly on this broadcast sometimes you get the correct stationString: Jan Chojnacki - Bielszy odcień bluesa 775 cz.1 and sometimes you get the UTF8 code U+FFFD ie: Jan Chojnacki - Bielszy odcie� blues 775 cz.1. Obviously there is some other number instead of cz.1.
  • #1200 21554061
    hevet
    Level 16  
    @robgold ok, right. There is another Radio Torun station where there is some other coding at all e.g. Anieli - Niemi³o?æ (Anieli - Unlove).

Topic summary

The discussion revolves around building an internet radio and audio file player using the ESP32-S3 microcontroller. The project includes features such as an OLED display, Wi-Fi connectivity, and audio playback capabilities. Users share their experiences with hardware setup, including issues with pin configurations, library compatibility, and troubleshooting compilation errors in the Arduino IDE. Suggestions for libraries, such as ESP32-audioI2S and WiFiManager, are provided to enhance functionality. Participants also discuss the importance of proper wiring, capacitor usage for encoders, and the potential for adding features like DLNA support and a web management interface for radio station management. Several users report on their progress, share code snippets, and offer solutions to common problems encountered during development.
Summary generated by the language model.
ADVERTISEMENT