I am beating my head against a wall doing something that I thought should be more simple but has become complicated.
I have a small device flashed with ESPHOME but that doesn’t actually connect to Home Assistant, it is set up to read from an MQTT server on a rPi on a weather station, and sound an alert under certain conditions based on MQTT subscription.
It works fine but is rather a mess of case, hardware, etc. and I was going to get some M5Stack stuff to make it a bit more professional and maybe one of their batteries (right now it needs a plug-in).
The old one is simple – rtttl, a esp8266_pwm output, and I provide a bunmch of notes and duration in a string. Simple, a bit arcane, but works.
The SPK that I got from M5Stack has i2s_audio, and I can set it up as a media player through HA and it works fine. A ha… thinks I… this must be easy now to play a tune, either hard coded or a wave file or something.
Everything I can find posted is either about being a media player for some other thing (e.g. HA), or are not really esphome items, but direct arduino. Maybe I haven’t found the right keyword combination. And it’s not apparent I can drive the SPK from M5Stack with rtttl, I’m afraid to try and might blow it up.
Am I missing something straightforward, is there a simple way to just make some noises with i2s without a media server coming into play? I use this out in isolated places for astronomy and the only device readily available is that rPi (and this is also the thing that, if MQTT disappears, needs to make noise to wake me up, so it needs to be self contained).
Any examples out there of ESPHOME using i2s to make noise in isolation, just itself, no HA. (Yes, I realize a certain discontinuity in asking abuot espHOME and not wanting HOME assistant involved, but I use esphome a lot and it’s very handy and it worked great for rtttl).
Linwood
PS. Yes, I plan to not use the SPK which has a dangly speaker, but could not get the atom with built in speaker, it was out of stock, so this is just a draft version.