Beta: To play an MP3 on command - without SONOS or GOOGLE or ALEXA

I got so tired of battling SONOS or my other speakers that might work
for some but were never that reliable for me. So I decided to create my
own vocalizer. It is a web based rest API which (for me) runs on a
Raspberry-PI B+ - an old one that has a built in speaker jack. I suppose
that it might work for other devices as well but that will be a follow-on
exercise later.

This is not a production ready - polished app ready for the entire
hubitat community - but I envision it can be eventually.
Is it reinventing the wheel? Perhaps - but it allows me to create
the MP3 that I want to play when certain things happen and its working
in my home right now under test conditions.

First off - I don't think Hubitat would care with this type of announcement -
and asking for volunteers - but if I've gone off the rails and this is
frowned upon - then please let me know and I'll pull this post.

Otherwise - the requirements to participate:

  1. You are willing to help get this to work on a machine not-my-own
  2. You should have an RPI laying around and should know how to boot and get to a console.
  3. You should know how to install apps on the device.

The tasks that I need help with are these:

  1. Can you follow my readme and make it work
  2. Are additional instructions warranted to make it easier
  3. I can establish an FAQ if there are many questions
  4. And mostly - does it work for you and is it easy enough to integrate into Hubitat.
  5. Bonus - with some tweaking might this work on a PC or MAC or LINUX as well?

The README has 2 TBD sections - how to create the MP3 and upload them to the device,
and how to make hubitat speak through the app. I will also be adding another section
on how to use Visual Studio Code and setup SSH on the RPI so that you can remotely
code and upload new MP3 files easily.

I dont really want to support more than about 3-4 beta testers - but since everyone here
is going to be a github expert - you are probably all going to figure out where the repo
is located - so I might as well give you the link and ask for inputs.

And finally - if this beta request is a stupid idea - I'll gladly take the lump and just keep it private. It's served my own need locally and if I can clean it up a bit - then I think it might
help someone else as well.

Todd Lindstrom

1 Like

i don't have a pi but can spin up a linux vm if needed

that would work - i think the code would have to change just a bit. espeak is for all OS but I think the omxplayer is really just for pi - but I'm sure an os.command or equivalent different command if its linux could be supplied just as easy. If you wish to try it - the setup instructions would be the same you would just replace omxplayer with whatever you find is best for your VM.

One caution on VM - I tried using windows WSL and never figured out how to make it visible to the rest of the network - I could go to localhost:5000 but never could get the routing tables right to let another computer (hubitat) see the right port...... thats a task for another time.

I did something similar for MQTT and Linux, and OSX. I used the 'mpg123' program on Linux and 'afplay' on OSX to play the mp3/wav. I wanted the ability to cancel an active stream playing and those two were the easiest to work with.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.