Edzelf / ESP32-Radio

Internet radio based on ESP32, VS1053 and a TFT screen.
GNU General Public License v3.0
965 stars 227 forks source link

ESP32Radio #415

Open andrus-65 opened 3 years ago

andrus-65 commented 3 years ago

Hello! I encountered such a problem when making your WEB-radio project on ESP 32. For some reason, the volume is constantly decreasing. Regardless of whether I press the button or twist the encoder. What could be the reason? I used the following modules: ESP32 DEVKITV1, LCD I2C 2004, vs1053 module. I tried connecting other pins, but the problem remained. And another question. Is it possible to enable MP3 player using an encoder or remote control? It is now enabled via the WEB interface.

Edzelf commented 3 years ago

Show your logging.

andrus-65 commented 3 years ago

Show your logging.

17:56:58.750 -> D: 89 tracks on SD 17:56:58.784 -> D: Create list with acceptable WiFi networks 17:56:58.784 -> D: Added Keenetic-3339 to list of networks 17:56:58.784 -> D: Added SSID2 to list of networks 17:56:58.784 -> D: End adding networks 17:56:58.953 -> D: Scan Networks 17:57:01.032 -> ets Jun 8 2016 00:22:57 17:57:01.032 -> 17:57:01.032 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) 17:57:01.032 -> configsip: 0, SPIWP:0xee 17:57:01.032 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 17:57:01.065 -> mode:DIO, clock div:1 17:57:01.065 -> load:0x3fff0018,len:4 17:57:01.065 -> load:0x3fff001c,len:1044 17:57:01.065 -> load:0x40078000,len:8896 17:57:01.065 -> load:0x40080400,len:5816 17:57:01.065 -> entry 0x400806ac 17:57:01.404 -> 17:57:01.404 -> D: Starting ESP32-radio running on CPU 1 at 240 MHz. Version Thu, 16 May 2019 12:10:00 GMT. Free memory 282948 17:57:01.437 -> D: Display type is LCD1602 17:57:01.437 -> D: Partition nvs found, 20480 bytes 17:57:01.437 -> D: Read 52 keys from NVS 17:57:01.437 -> D: pin_ir set to 35 17:57:01.437 -> D: pin_enc_clk set to 25 17:57:01.437 -> D: pin_enc_dt set to 26 17:57:01.437 -> D: pin_enc_sw set to 27 17:57:01.437 -> D: pin_tft_cs set to -1 17:57:01.437 -> D: pin_tft_dc set to -1 17:57:01.437 -> D: pin_tft_scl set to 33 17:57:01.437 -> D: pin_tft_sda set to 32 17:57:01.437 -> D: pin_tft_bl set to -1 17:57:01.437 -> D: pin_tft_blx set to -1 17:57:01.437 -> D: pin_sd_cs set to 21 17:57:01.472 -> D: pin_vs_cs set to 5 17:57:01.472 -> D: pin_vs_dcs set to 16 17:57:01.472 -> D: pin_vs_dreq set to 4 17:57:01.472 -> D: pin_shutdown set to -1 17:57:01.472 -> D: pin_shutdownx set to -1 17:57:01.472 -> D: pin_spi_sck set to 18 17:57:01.472 -> D: pin_spi_miso set to 19 17:57:01.472 -> D: pin_spi_mosi set to 23 17:57:01.472 -> D: GPIO0 is HIGH 17:57:01.472 -> D: GPIO2 is LOW, probably no PULL-UP 17:57:01.504 -> D: GPIO4 is HIGH 17:57:01.504 -> D: GPIO5 is HIGH 17:57:01.504 -> D: GPIO12 is HIGH 17:57:01.538 -> D: GPIO13 is HIGH 17:57:01.538 -> D: GPIO14 is HIGH 17:57:01.538 -> D: GPIO15 is HIGH 17:57:01.538 -> D: GPIO16 is HIGH 17:57:01.571 -> D: GPIO17 is HIGH 17:57:01.571 -> D: GPIO18 is HIGH 17:57:01.571 -> D: GPIO19 is HIGH 17:57:01.604 -> D: GPIO21 is HIGH 17:57:01.604 -> D: GPIO22 is HIGH 17:57:01.604 -> D: GPIO23 is HIGH 17:57:01.638 -> D: GPIO25 is HIGH 17:57:01.638 -> D: GPIO26 is HIGH 17:57:01.638 -> D: GPIO27 is HIGH 17:57:01.638 -> D: GPIO32 is HIGH 17:57:01.672 -> D: GPIO33 is HIGH 17:57:01.672 -> D: GPIO34 is LOW, probably no PULL-UP 17:57:01.672 -> D: GPIO35 is HIGH 17:57:01.705 -> D: GPIO39 is LOW, probably no PULL-UP 17:57:01.705 -> D: gpio_00 will execute uppreset = 1 17:57:01.705 -> D: gpio_12 will execute upvolume = 2 17:57:01.705 -> D: gpio_13 will execute downvolume = 2 17:57:01.705 -> D: Enable pin 35 for IR 17:57:01.705 -> D: Start display 17:57:01.705 -> D: Init LCD1602, I2C pins 32,33 17:57:01.774 -> D: Locate mp3 files on SD, may take a while... 17:57:14.529 -> D: 89 tracks on SD 17:57:14.529 -> D: Create list with acceptable WiFi networks 17:57:14.529 -> D: Added Keenetic-3339 to list of networks 17:57:14.529 -> D: Added SSID2 to list of networks 17:57:14.529 -> D: End adding networks 17:57:14.698 -> D: Scan Networks 17:57:17.019 -> D: Scan completed 17:57:17.019 -> D: Number of available networks: 5 17:57:17.019 -> D: 1 - Keenetic-3339 Signal: -60 dBm, Encryption WPA2_PSK, Acceptable 17:57:17.019 -> D: 2 - Madfaceinvasion Signal: -84 dBm, Encryption WPA2_PSK, 17:57:17.053 -> D: 3 - NATALI Signal: -85 dBm, Encryption WPA_PSK, 17:57:17.053 -> D: 4 - Beeline_2G_F19411 Signal: -91 dBm, Encryption WPA_WPA2_PSK, 17:57:17.053 -> D: 5 - internet9057968900 Signal: -91 dBm, Encryption OPEN, 17:57:17.053 -> D: End of list 17:57:17.053 -> D: Command: clk_dst with parameter 1 17:57:17.053 -> D: Command: clk_offset with parameter 3 17:57:17.053 -> D: Command: clk_server with parameter pool.ntp.org 17:57:17.087 -> D: Command: gpio_00 with parameter uppreset = 1 17:57:17.087 -> D: Command: gpio_12 with parameter upvolume = 2 17:57:17.087 -> D: Command: gpio_13 with parameter downvolume = 2 17:57:17.087 -> D: Command: ir_22dd with parameter uppreset = 1 17:57:17.087 -> D: Command: ir_52ad with parameter mute 17:57:17.087 -> D: Command: ir_629d with parameter upvolume = 2 17:57:17.087 -> D: Command: ir_a857 with parameter downvolume = 2 17:57:17.087 -> D: Command: ir_c23d with parameter downpreset = 1 17:57:17.121 -> D: Command: mqttbroker with parameter none 17:57:17.121 -> D: Command: mqttpasswd with parameter *** 17:57:17.121 -> D: Command: mqttport with parameter 1883 17:57:17.121 -> D: Command: mqttprefix with parameter none 17:57:17.121 -> D: Command: mqttuser with parameter none 17:57:17.121 -> D: Command: pin_enc_clk with parameter 25 17:57:17.121 -> D: Command: pin_enc_dt with parameter 26 17:57:17.121 -> D: Command: pin_enc_sw with parameter 27 17:57:17.121 -> D: Command: pin_ir with parameter 35 17:57:17.155 -> D: Command: pin_sd_cs with parameter 21 17:57:17.155 -> D: Command: pin_tft_scl with parameter 33 17:57:17.155 -> D: Command: pin_tft_sda with parameter 32 17:57:17.155 -> D: Command: pin_vs_cs with parameter 5 17:57:17.155 -> D: Command: pin_vs_dcs with parameter 16 17:57:17.155 -> D: Command: pin_vs_dreq with parameter 4 17:57:17.155 -> D: Command: preset with parameter 3 17:57:17.155 -> D: Command: preset_00 with parameter 109.206.96.34:8100 17:57:17.155 -> D: Command: preset_01 with parameter airspectrum.cdnstream1.com:8114/1648_128 17:57:17.189 -> D: Command: preset_02 with parameter 198.58.98.83:8258/stream 17:57:17.189 -> D: Command: preset_03 with parameter montecarlo.hostingradio.ru/montecarlo96.aacp 17:57:17.189 -> D: Command: preset_04 with parameter uk3.internet-radio.com:8021/ 17:57:17.189 -> D: Command: preset_05 with parameter us2.internet-radio.com:8443/ 17:57:17.189 -> D: Command: preset_06 with parameter us4.internet-radio.com:8197/ 17:57:17.224 -> D: Command: preset_07 with parameter 205.164.62.15:10032 17:57:17.224 -> D: Command: preset_08 with parameter 213.59.4.27:8000/silver128.mp3 17:57:17.224 -> D: Command: preset_09 with parameter chanson.hostingradio.ru:8041/chanson128.mp3 17:57:17.224 -> D: Command: preset_10 with parameter icecast.vgtrk.cdnvideo.ru/mayakfm_mp3_192kbps 17:57:17.224 -> D: Command: preset_11 with parameter icecast.vgtrk.cdnvideo.ru/rrzonam_mp3_192kbps 17:57:17.224 -> D: Command: preset_12 with parameter icecast.vgtrk.cdnvideo.ru/vestifm_mp3_192kbps 17:57:17.257 -> D: Command: preset_13 with parameter 107.181.227.250:8040/ 17:57:17.257 -> D: Command: preset_14 with parameter 199.233.234.34:25373/ 17:57:17.257 -> D: Command: preset_15 with parameter us5.internet-radio.com:8166/ 17:57:17.257 -> D: Command: preset_16 with parameter ic2.101.ru:8000/v3_1 17:57:17.257 -> D: Command: preset_17 with parameter europaplus.hostingradio.ru:8014/radiosept320.mp3 17:57:17.290 -> D: Command: toneha with parameter 0 17:57:17.290 -> D: Command: tonehf with parameter 0 17:57:17.290 -> D: Command: tonela with parameter 0 17:57:17.290 -> D: Command: tonelf with parameter 0 17:57:17.290 -> D: Command: volume with parameter 0 17:57:17.392 -> D: Slow SPI, Testing VS1053 read/write registers... 17:57:17.629 -> D: Fast SPI, Testing VS1053 read/write registers again... 17:57:18.808 -> D: endFillByte is 0 17:57:18.909 -> D: Connect to WiFi 17:57:21.983 -> D: Connected to Keenetic-3339 17:57:21.983 -> D: IP = 192.168.1.49 17:57:24.978 -> D: Start server for commands 17:57:24.978 -> D: Network found. Starting mqtt and OTA 17:57:25.013 -> D: MDNS responder started 17:57:25.991 -> D: Rotary encoder is enabled 17:57:25.991 -> D: Sync TOD 17:57:26.059 -> D: Sync TOD, new value is 17:58:14 17:57:26.059 -> D: STOP requested 17:57:26.059 -> D: New preset/file requested (3/0) from montecarlo.hostingradio.ru/montecarlo96.aacp 17:57:26.059 -> D: Connect to new host montecarlo.hostingradio.ru/montecarlo96.aacp 17:57:26.059 -> D: Connect to montecarlo.hostingradio.ru on port 80, extension /montecarlo96.aacp 17:57:26.126 -> D: Connected to server 17:57:26.159 -> D: nvs_get_str failed 1102 for key basicauth, keylen is 9, len is 150! 17:57:26.159 -> D: Contents: 17:57:26.159 -> D: Duration mp3loop 1 17:57:26.159 -> D: Switch to HEADER 17:57:26.159 -> D: Headerline: Content-Type: audio/aacp 17:57:26.193 -> D: audio/aacp seen. 17:57:26.193 -> D: Headerline: icy-br:96 17:57:26.193 -> D: Headerline: ice-audio-info: channels=2;samplerate=44100;bitrate=96 17:57:26.193 -> D: Headerline: icy-br:96 17:57:26.193 -> D: Headerline: icy-description:Stream transcoder based on liquidsoap 17:57:26.193 -> D: Headerline: icy-genre:various 17:57:26.193 -> D: Headerline: icy-name:montecarlo 17:57:26.193 -> D: Headerline: icy-pub:1 17:57:26.193 -> D: Headerline: Server: Icecast 2.4.0-kh15 17:57:26.193 -> D: Headerline: Cache-Control: no-cache, no-store 17:57:26.227 -> D: Headerline: Expires: Mon, 26 Jul 1997 05:00:00 GMT 17:57:26.227 -> D: Headerline: Connection: Close 17:57:26.227 -> D: Headerline: Access-Control-Allow-Origin: * 17:57:26.227 -> D: Headerline: Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type, Icy-MetaData 17:57:26.227 -> D: l-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type, Icy-MetaData seen. 17:57:26.227 -> D: Headerline: Access-Control-Allow-Methods: GET, OPTIONS, SOURCE, PUT, HEAD, STATS 17:57:26.261 -> D: Headerline: icy-metaint:8192 17:57:26.261 -> D: Switch to DATA, bitrate is 96, metaint is 8192 17:57:26.261 -> D: Duration mp3loop 77 17:57:26.261 -> D: Metadata block 16 bytes 17:57:26.261 -> D: Streamtitle found, 15 bytes 17:57:26.261 -> D: StreamTitle=''; 17:57:26.566 -> D: Duration mp3loop 300 17:57:27.539 -> D: Rotation count -1 17:57:29.224 -> D: Rotation count -1 17:57:30.439 -> D: Rotation count -1 17:57:31.819 -> D: Rotation count -1 17:57:32.221 -> D: Rotation count -1 17:57:32.724 -> D: Rotation count -1 17:57:33.498 -> D: Rotation count -1 17:57:34.400 -> D: Rotation count -1 17:57:36.047 -> D: Rotation count -1 17:57:36.652 -> D: Rotation count -1 17:57:38.027 -> D: Rotation count -1 17:57:38.429 -> D: Rotation count -1 17:57:39.336 -> D: Rotation count -1 17:57:40.381 -> D: Rotation count -1 17:57:40.987 -> D: Rotation count -1 17:57:42.063 -> D: Rotation count -1 17:57:43.311 -> D: Rotation count -1 17:57:44.962 -> D: Rotation count -1 17:57:45.471 -> D: Rotation count -1 17:57:46.450 -> D: Rotation count -1 17:57:46.954 -> D: Rotation count -1 17:57:47.424 -> D: Rotation count -1 17:57:49.439 -> D: Rotation count -1 17:57:50.720 -> D: Rotation count -1 17:57:51.090 -> D: Rotation count -1 17:57:52.947 -> D: Rotation count -1 17:57:54.060 -> D: Rotation count -1 17:57:54.839 -> D: Rotation count -1 17:57:55.781 -> D: Rotation count -1 17:57:56.188 -> D: Rotation count -1 17:57:56.661 -> D: Rotation count -1 17:57:56.864 -> D: Rotation count -1 17:57:58.516 -> D: Rotation count -1 17:57:59.995 -> D: Rotation count -1 17:58:00.501 -> D: Rotation count -1 17:58:02.665 -> D: Rotation count -1 17:58:03.038 -> D: Rotation count -1 17:58:04.627 -> D: Rotation count -1 17:58:05.438 -> D: Rotation count -1 17:58:06.725 -> D: Rotation count -1 17:58:08.009 -> D: Rotation count -1

Edzelf commented 3 years ago

Probably you have no rotary decoder. Remove lines in your config that configures the rotary encoder: pin_enc_clk, pin_enc_dt and pin_enc_sw.

andrus-65 commented 3 years ago

Probably you have no rotary decoder. Remove lines in your config that configures the rotary encoder: pin_enc_clk, pin_enc_dt and pin_enc_sw.

The encoder is standing. And it works. When I turn its rotor to +, it turns up the volume. I assumed that the encoder was faulty, so I put another one on. The result is the same. Sorry. I delete encoder. Now all works. Thanks! But i no understand, whay encoder no function?

andrus-65 commented 3 years ago

Dear Ed! Possible is turn on MP3 player with the help Ir remote controle? if so, how?

Edzelf commented 3 years ago

See issue 413.

andrus-65 commented 3 years ago

See issue 413.

Thanks!

fenyvesi commented 3 years ago

Program VERSION "Mon, 19 Oct 2020 14:12:00 GMT"

I also get continuous (3/sec) encoder switch interrupt with this setup. The encoder pins are pulled up with resistors. pin_enc_clk = 39 # GPIO Pin number for rotary encoder "CLK" pin_enc_dt = 26 # GPIO Pin number for rotary encoder "DT" pin_enc_sw = 25 # GPIO Pin number for rotary encoder "SW" I can't relocate PINs, because the bulit-in OLED version has no more appropriate pin. This version also identfies the VS chip as not VS1053, but perhaps 1001 (I can't remeber exactly). I think it is 1053.

I went back to an older version (VERSION "Fri, 18 Aug 2017 14:15:00 GMT") and it works wihout any problem.

Thanks.