esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 34 forks source link

Unable to get any device working with the media-player module #4085

Open DJBenson opened 1 year ago

DJBenson commented 1 year ago

Having discovered ESPHome worked with audio I ordered a number of devices to try it out with, including;

None of them work.

I am running ESPHome 2022.12.3 and flashed all devices directly from the web installer on the ESPHome media-players page and made no modifications to the config.

I've tried various source with varying degrees of "nothingness" happening;

Here's the debug log for the crash but the other two scenarios produce no meaningful output besides the call to the URL for the respective media file.

`[D][media_player:059]: 'M5Stack Atom Echo' - Setting [D][media_player:066]: Media URL: http://192.168.1.134:50002/m/NDLNA/41356.mp3 E (51596) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time: E (51596) task_wdt: - loopTask (CPU 1) E (51596) task_wdt: Tasks currently running: E (51596) task_wdt: CPU 0: IDLE E (51596) task_wdt: CPU 1: IDLE E (51596) task_wdt: Aborting.

abort() was called at PC 0x4010d234 on core 0

Backtrace:0x40083e7d:0x3ffbe9fc |<-CORRUPTED

ELF file SHA256: 0000000000000000

Rebooting... ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 188777542, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:1184 load:0x40078000,len:13132 load:0x40080400,len:3036 entry 0x400805e4`

I am running multiple VLANs at home but I have ruled this out as a cause as it does not work when on my main network (same as Home Assistant is). All my other ESPHome devices are fine on my IoT VLAN with mdns turned on but I thought audio may be more fussy so added the test devices to the main VLAN but got the same result.

mycanaletto commented 1 year ago

Same problem, radio streaming = crash reboot...

randybb commented 1 year ago

Just playing with it and no issues when connecting to stream from HA or connecting to anything in the Internet. But it is crashing while trying to play something that is not responding. So probably this is your case - esp is not able to connect to that stream.

mycanaletto commented 1 year ago

I can play mp3 streams but not aac

https://gist.github.com/JV-conseil/7063daeadf0041cb845d0ec22f8c418f

http://icecast.radiofrance.fr/franceinter-midfi.mp3 : OK

randybb commented 1 year ago

It is based on https://github.com/schreibfaul1/ESP32-audioI2S/wiki . I have tested some acc streams and it is always crashing.

Anyway, this issue needs to be created here https://github.com/esphome/issues/issues, issues in this repo should be related only to the media-player template.

mycanaletto commented 1 year ago

When I installed it in October it worked. This problem exists since the ESPHome update in December...

alucryd commented 1 year ago

Probably same issue here, I just got an ESP32-LyraTD-MSC, the media player is extremely finicky. Playing TTS has a good chance of crashing the board (like 50%), and playing local media crashes it every single time:

[19:33:18][D][media_player:059]: 'Media Player' - Setting
[19:33:18][D][media_player:066]:   Media URL: http://192.168.2.13:8123/api/tts_proxy/d9832b0a9d90b4dc814cce610ba0de96605958c2_en-us_a877e2b3bf_tts.piper.wav
[19:33:19][V][component:204]: Component i2s_audio.media_player took a long time for an operation (0.54 s).
[19:33:19][V][component:205]: Components should block for at most 20-30ms.
[19:33:24][V][component:204]: Component i2s_audio.media_player took a long time for an operation (0.51 s).
[19:33:24][V][component:205]: Components should block for at most 20-30ms.
[19:33:24][V][component:204]: Component i2s_audio.media_player took a long time for an operation (0.50 s).
[19:33:24][V][component:205]: Components should block for at most 20-30ms.
[19:33:27][D][esp32.preferences:114]: Saving 1 preferences to flash...
[19:33:27][V][esp32.preferences:137]: NVS data not changed skipping 2658603775  len=1
[19:33:27][D][esp32.preferences:143]: Saving 1 preferences to flash: 1 cached, 0 written, 0 failed
[19:33:32][D][media_player:059]: 'Media Player' - Setting
[19:33:32][D][media_player:066]:   Media URL: http://192.168.1.12:8123/media/local/1.01%20WORLD%20ORDER.mp3?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI0ODFkNjU4ZjU1YTY0NTdlYjc5N2UwMDc5YWVkNmFiNyIsInBhdGgiOiIvbWVkaWEvbG9jYWwvMS4wMSBXT1JMRCBPUkRFUi5tcDMiLCJwYXJhbXMiOltdLCJpYXQiOjE2ODQ2OTA0MTIsImV4cCI6MTY4NDc3NjgxMn0.Nm0ITM0vXYOLpRwS66tFbXlS-On2GSlByRl9duMbnlM
WARNING lyratd.local: Connection error occurred: [Errno 104] Connection reset by peer
INFO Processing unexpected disconnect from ESPHome API for lyratd.local
WARNING Disconnected from API
INFO Successfully connected to lyratd.local
Kosygor commented 1 year ago

I have experienced similar issue. Fixing HA URL helped me.

kizovinh commented 9 months ago

I got the same issue, but for me sometime the speaker work normally, sometime it play only after pipeline end, and most of the time it wont play anything