I guess i exhausted my research in here in finding a 100% local solution in playing MP3 file in my house. I tried TTS, but locally TTS sounds like the robot in space invaders. So I gave up the tts idea. Since I don’t have that many messages I want to use (may be 5 or 6) I thought to create the mp3 and store them on a raspberry pi.
The HU and the raspberry pi are on the same local network which is a different network than my normal wifi. This is to make sure they are never on internet. They talk just fine.
I do not use Sono or GH. I really really want to stick with the pi. I’m sure somewhere there are drivers for that. But where? I searched and searched.
Sure. But it is probably easier setting up a small webserver on the Pi (even using something like a Python or Ruby one-liner), and then using http commands out of RM to run scripts that play the specified mp3.
I have been told that node red requires internet. And I think it does. Not so sure about that.
That sounds very interesting. I’m not yet familiar with all that stuff. I have HU for a month or so, and the pi for about a week. I’ll have to dig into it if I can’t find a ready option.
I wrote some code to do TTS from HE to MQTT to Ubuntu and OSX. It's uses the same voices as all HE TTS devices which means it requires internet (Amazon) to create the mp3. There's a groovy driver for HE and python code for Linux, OSX to pull the mp3 from HE and play it. Sound quality depends on your sound system (pi's are not good). It has no ability to detect or control who or what might be using the speakers. For Pulseaudio systems like Ubuntu the sounds mix. Same for OSX. I haven't tried the pi (which doesn't use PA by default).
TTS without the cloud is possible if you want dig deep enough and spend enough time and money.
If you configure you Pi as a webserver then I have an app that I have been using for almost 4 yrs to do this without problems
First on ST then ported to HE
I use it with mp3’s for some of my repetitive announcements
Andy's suggestion is the simplest solution for using your own mp3s for TTS. And really setting up a webserver on a Pi to serve up the mp3 files is simple.
This is exactly what I need to do. And I also need to make the webserver active to stores the mp3.
I can manage setting it up no problem. I’m very interested thanks.
The app I use is ‘mp3 event player’
It’s on my website under ‘apps -> unsupported apps’
I will actually support it, it’s just so old I haven’t developed anything on it for ages
Ok, got the webserver running, installed your app, but then.... I’m lost
First, I’m not understanding the concept of parent and child in an app. And then, when I select the mp3 event player, I need to select a “speaker”. In my mind, I thought that the mp3 event player would be the “speaker”. What other speaker I need to use?
I was hoping to get the sound directly out of the raspberry pi either on the earphone plug or using the Bluetooth option. What am I missing?
Yes I read about that. But my VCL does not have the menu I saw in screen snapshots. I was kind of lost there.
The idea was great, but when I saw that the menus were so different, I assumed that they were not talking of a vcl on a raspberry pi.
Ok, but I still don’t understand what VLC we are talking about. Are we talking about the VLC that comes built in to the raspberry pi? Caus I can’t find when to set up the http in that VLC.
Just set up Apache2 on the Pi. It is so simple a child can do it (I managed it, so that proves it It's literally one line typed into the terminal window and BOOM! There it is.
sudo apt install apache2 -y
(of course do your normal updates etc prior).
Here's the official info, direct from the horse's mouth...
Then navigate in the terminal window to where this is as follows...
cd /var/www/html
Create a directory to put your mp3 files/sounds in.
sudo mkdir sounds
Set the privileges you want to enable copying your files there... Something like
sudo chmod 666 sounds
Add your sounds (I use Teamviewer which is absolutely awesome and yet absolutely free and includes the file transfer functionality, with drag & drop) and reference them in your Rule Machine rules as....
If I'm understanding correctly, I think you're talking about playing the mp3 through some kind of network speaker that Hubitat can play to? I think the OP's issue is that he wants the Pi to play the mp3 out of its own speaker.