ESPMuse as a target/platform in ESPHome?

Ok, this seem to work

Thank you!
At this point, I am still trying to make it work from the same subnet. I really hate these ā€œauto configā€ protocols. It just always generates headaches. Why canā€™t I just manually configure this and call it the day?

I added the SlimProto player in Home Assistant but just nothing happens. This is how it looks:

image

Is this how itā€™s supposed to look like?

Meanwhile I see this in the ESP console:

10.227.79.10 is the IP of my HA instance which is detected as ā€œLMSā€ so something was found but Iā€™m not sure what is even supposed to happen from hereā€¦

I think HA should now tell you that it has been discovered, and you should end up with a media_player entity, which you can use in the normal media_player way. Not sure how long the process will take.

I got this
image

when i opened firewall from wifi to home assistant on port 3483 TCP and UDP.
I also opened this port from home assistant to wifi network, but itā€™s not probably needed.

I get te player entity, i can set volume, but when i try to play something i donā€™t get sound.
the espmuse tries to contact my homeassistant ip on port 8095, i opened it too in firewall, but still no sound.

I tried tts only for now

I think your firewalling will not be helping at all. Although 3483 is fixed, there are other ports used by slimproto, and some a dynamically allocated. The code is here if that is any use to you. GitHub - home-assistant-libs/aioslimproto: SLIMProto implementation in async python allows you to control squeezebox players (and compatibles)

Yeah i donā€™t know, but i was capturing packets and no more packets were dropped

slimproto will allocate 9090 and 9091, unless something else is occupying them. Two ways to check:

  1. from the HA machine run
netstat -tanp|grep LISTEN

This will show what ports are listening

  1. From another linux machine on your LAN, run
nmap -p0-65535 IP.OF.HOME.ASSISTANT

This will show what the other machine finds open.

Thank you very much! Yes, 9090 and 9091 is open.

Wow this stuff is SO buggy. After long back and forth I think I finally got it working. Crashes with wrong FW version, crashes when changing Wifi etc.

But hereā€™s what I did:

  • Flash with 16.1223 (any other doesnā€™t seem to work)
  • Joined same Wifi as HA. After many re-flashes it showed up in HA as media player
  • Added the ā€œ-s X.X.X.Xā€ to the config as in the link above
  • Disabled telnet, Spotify, BT, Airplay (without, it crashed after attempting to switch Wifi)
  • Then I switched to my isolated devices VLAN

At least device is still in HA. Need to test tomorrow (donā€™t want to risk waking up people now)

Hm, i have port 9090 used by cockpit.
I will try to disable it and reload the player intergration and open all ports between espmuse and HA.

Still donā€™t know if it helps, i have not seen any packet to port other than 3483 (and 8095, but it also stopped to show)

Does anybody know, if it will be possible to use esphome as bluetooth speaker?

Ok, it does STILL not work. While the player finally shows up in HA, it does not play anything.

In the console I see:

[08:10:01.680967] decode_flush:251 decode flush
[08:10:01.682190] output_flush:446 flush output buffer
[08:10:01.683257] decode_flush:251 decode flush
[08:10:01.683910] output_flush:446 flush output buffer
[08:10:01.695849] codec_open:279 codec open: 'm'
[08:10:01.698731] stream_sock:508 connecting to 192.184.150.22:8323


[08:10:01.752518] stream_thread:246 error reading headers: closed

192.184.150.22 is my public IP. Why does it want to connect to my public IP?

I think because it gets url of your home assistant to play media from, in my case it was trying to connect to my nginix proxy manager when i first installed it, but it stopped later

I have filed a bug report on this: Media player ignores internal IP address; sends external IP such that media players do not work Ā· Issue #82713 Ā· home-assistant/core Ā· GitHub

I have explicitly configured to use the internal IP, yet the ESP receives the public one. This must be a bug.

Did configuring the internal URL work for you?

I have dns record set to internal ip of my nginx proxy inside my network, so i only have one url

So i managed to get it working

espmuse 10.0.33.60 (vlan33)
hassio 10.0.35.2 (vlan35)
proxy-www 10.0.37.2 (vlan37)

My internal DNS says, that my public ha url is on 10.0.37.2

Firewall rules i needed to add

  1. allow port 3483/tcp, 3483/udp from espmuse to hassio
  2. a. allow port 8095/tcp from espmuse to proxy-www
    b. allow port 8095/tcp from espmuse to hassio
  3. allow port 8095/tcp from proxy-www to hassio
  4. allow port 80/tcp from hassio to proxy-www

so rule 1) allow espmuse to connect to hassio and to receive commands

When i try to play some TTS, it connects to port 8095 on hostname from my HA url , so to my proxy-www.
I have setup port forward from proxy-www to hassio (stream in nginx proxy manager), so it returns some data (rule 2a, rule 3).
Or I tested NAT rule so it goes directly from espmuse to hassio on port 8095 (rule 2b)
Hassio tries to fetch the TTS data using http from my proxy-www (so i needed to allow rule 4)

Now it plays my TTS announces. It goes several times around my network :wink:

Ugh, i tried to play sound i have set to play when alarm triggers and now it plays it after every announce and i donā€™t know how to get rid of it

Sorry I donā€™t understand if with this firmware I can use the the ESPMuse Luxe like a voice assistant in home assistant and also use it for music streaming from spotify

You can use the Muse Luxe as a media player and a voice assistant.

Like others in the comments on that video I didnā€™t find it very responsive to wake words though and just went back to using it as a media player.

But with the configuration of this video can connect to the MuseLuxe through bluetooth?

No.

Ok so if I use the firmware of the video is there a way to stream music from spotify like if Iā€™m connect through bluetooth?