ESP Muse proto: no audio [under investigation]

Spend some time with the muse board today and did not reach my goals.

Changed to the Squeezelite firmware and updated to the latest version (that was a struggle to do since it was slow and unstable). Could play one mp3 using Airplay. I could also play a mp3 from the dlna server once and after a long time again, but good luck stopped there.

Then updated the firmware to the muse 16 bit version; did not succeed to do something structural with it.

Reinstalled the ESPhome version and that brought me right back to the same problems I started with today.

Local stored files on the HA server could never be played on either Squeezelite or Muse firmware. If I succeed to play a mp3 (on Squeezelite) it is from a dlna source. In the browser I can play from dlna and local from the HA server. Using the browser I can see the file name playing in HA, which is not showing using mediaplayer muse proto.

Question to RaspiAudio guys:
1: what problem is found that the HA team have to take care of?

Regards,
OWK

Lets try again, sorry i just posted the important part of the yaml file, i did not realised that you maybe did not knowing how to setup the yaml file completely.
So here is the complete file what you could test.

substitutions:
  name: raspiaudio-muse-proto-d40a44

esphome:
  name: ${name}

  on_boot:
    priority: 10
    then:
     - lambda: |-
          gpio_reset_pin(GPIO_NUM_23);
          gpio_set_direction(GPIO_NUM_23, GPIO_MODE_OUTPUT);           
          gpio_set_pull_mode(GPIO_NUM_23, GPIO_PULLDOWN_ONLY);
          gpio_set_level(GPIO_NUM_23, 0);      

wifi:
  networks:
  - ssid: !secret wifi_ssid
    password: !secret wifi_password

  #fast_connect: true

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: ${name} hotspot

# si pas de connexion WiFi, créer un hotspot wifi
captive_portal:

# Enable logging
logger:

api:

ota:

esp32:
  board: esp-wrover-kit
  framework:
    type: arduino

media_player:
  - platform: i2s_audio
    id: media_out
    name: ${name} player
    dac_type: external
    i2s_lrclk_pin: GPIO25
    i2s_dout_pin: GPIO26
    i2s_bclk_pin: GPIO5
    mode: mono
    mute_pin:
      number: GPIO21
      inverted: true

Before you can install this you need to setup your WIFI’s SSID and password.
that can be done by clicking the secrts button at the top right corner of the esphome dashboard.
After that the installation of this version should work as it should be.

Thanks for your help.

The secrets file was setup already with the correct credentials

I was close compiling a yaml file myself, but took yours and tested it. The result is the same: it uploads the yaml file successfully and then tries to download the log, which fails reporting:

WARNING Can’t connect to ESPHome API for raspiaudio-muse-proto-d40a44.local: Error resolving IP address: [Errno -2] Name or service not known
INFO Trying to reconnect to raspiaudio-muse-proto-d40a44.local in the background

Going to the Github site and connecting to the console reports:

[I][wifi:248]: WiFi Connecting to ‘XXXXXXX’…
[W][wifi_esp32:495]: Event: Disconnected ssid=‘XXXXXX’ bssid=FC:EC:DA:B7:2B:F6[redacted] reason=‘4-Way Handshake Timeout’
[W][wifi:557]: WiFi Unknown connection status 0

My conclusion: the WiFi setting are incorrect after the upload and it does not allow me to access the device anymore.

Regards
OWK

Interesting, could you check your router and find the IP address for this device?
We can tell esphome to use that IP address to upload the firmware.
by adding: use_address: "192.168.178.64" # << use your ip address here
under the wifi: line and space it out so that use_address and networks starting at the same column.

Now try to rename the name: raspiaudio-muse-proto-d40a44 into something smaller like espaudio_1
I do not know what the max size is of the device name allowed is,
And let see what happens.

OK, fixed it :wink:

Since there is a captive network option enabled I could reset the WiFi password using the AP.

Now I can play music from the DLNA server (in my case a NAS), but can’t play from the local storage location on the HA server.

Music is louder having an external speaker connected than expected based on the onboard speaker. Good enough to start with.

I see that 2022.8 is now supplied on the Github site, but with that software the WiFi is still corrupt after installing the YAML file.

Regards,
OWK

My thought as well :wink:
I was expecting to see the IP address in the router IP list, but it was not showing. Then I found the AP option to reset the WiFi password and hit the jackpot

Now: how to kill that annoying blue LED that is flashing… :thinking:

Btw: still can’t play TTS google

So to recap:

Working:
-play mp3 and Wav files from a dlna server

Not working:
-play audio files from the local storage on the HA server
-play TTS from Google
-Upload a yaml file from HA ESPHome without damaging the WiFi password (requires manual intervention using the temporary AP)

Improvement required:
-a way to switch off the flashing and very bright blue charging LED on the muse proto.

Regards
OWK

how did you setup the google TTS?

i have in my configuration.yaml:

# Text to speech
tts:
  - platform: google_translate
    cache: true
    cache_dir: /tmp/tts
    time_memory: 300
    service_name: google_say

Did you checked the secrets settings ?

Yes I did, it’s correct.

I’m not aware it needs set-up. Viewing others on Youtube they do not configure TTS, that makes things confusing

I see now that it requires set-up in HA configuration.yaml. I had only set the first line there, so added your config to it. Will test it later

Thanks for your efforts in helping me

Regards
OWK

Hello, sorry for the late reply, most of the team is in annual leave and will be back at 100% 7th of September.

But for the blue led you cannot disable it by software, I recommand a low-tec solution by adding a piece of electricl tape on top or use a permanent black marker to paint it.

For my TTS I did do anything for the confirguration. A simple idea, could you try to move your Proto closer to your wifi router and try again?
if that does not work, I encourage you to check the HA support channel on Discord, they are very efficient.

The other lines should not be required, indeed, i used found them useful.
I’m just trying to find the differences between your not so good working setup and
the setup i have which somehow works fine.

And until now i do not see any big issue’s /differences.

The only thing i can think of is how Home-assistant is setup. Lets check what we have different there.
How do you have HA running on your system?

I use a RPI 4b with 2MB to run latest HAOS 64bit version with all the updates that popped up,
and i use the build-in media player to test the TTS functionality.

side note: i have also installed Media-assistant via hacs ( experimental features enabled ). But i do not using it, jet.

I’m using HA on RPI4 with 64bit version just like you, and also try on a linux VM.

Could you add item to your revision todo list; add bigger resistor to the charging let so it is not that bright.
thanks

and both works, i assume?

the TTS worked on both VM and RPI for the Luxe. But for the Proto I had sometime no sound at all when using the HA installer but working fine with the Squeezlelite method. After that colnclusion I sent a Proto board to my contacts at HA for investigation. Let me check if HA had the time to try it.

Tested the adjusted configuration.yaml. No improvement so far, no TTS playing via the muse proto.

The funny thing is that TTS plays ok in the browser, as btw did playing mp3/wav from the local storage on the HA server (that does not play on the muse proto). I will publish my conclusions in the HA forum

This is my setup: Intel nuc i3, Ubuntu 20.04.4 LTS, HA release 2022.8.6 in containers (as unsupported). I don’t use HA cloud.

Do you use of HA cloud?

@Raspiaudio: Enjoy your leave for the part that’s left.

Regards,
OWK

nope, i do not use any cloud service.