Walkie Talkie with chromecast audio


(Nakh Home) #1

Hi Guys

i want to make this funny scenario.

i want from my android phone to speak and that my voice will be broadcasted in the audio speaker connected to my openhab.

Any ideas, how to implement it ?


SONOS: notificationsound and TuneIn-Radio
(Stuart Hanlon) #2

Wild idea :slight_smile:
I like it :smile:

Are you thinking more like a PA (Public Address) system, rather than a 2-Way communication system?

I guess getting your donor audio file into the OpenHab2 sounds folder is the first part.

Sending a Rest command to OpenHab2 is fairly easy to trigger a rule.

Running the playSound command from a rule is the easy bit then :slight_smile:


(Stuart Hanlon) #3

Hi

Just for a giggle I’m trying to get something like this to work.

I’ve created an item to store the new filename of an uploaded announcement file (without .mp3 as this didn’t work with the rule)

When the Item changes, the rule plays the file :slight_smile:

So you just need to work out how to record your message, upload it to sounds folder and pass the filename to the Item (one word filenames work, but as a test I tried “It Must Be Love - Madness” and that works too)

I hope this helps…

rule "new announcement"
  when  Item Announce received update
 then
  say("Playing filename "+Announce.state+" dot M P 3", "voicerss:enGB", "webaudio")
  
playSound(Announce.state+".mp3") // this works
     //   playSound(Announce.state) // this didn't work if I included the .mp3 in the filename item
 end

FYI

If I do all the steps manually, this works…

Record announcement as mp3 file

Save to Sounds folder

Update Announce Item with filename (without .mp3 suffix) with a simple curl command like

http://192.168.***.***:8080/rest/items/Announce

Request body is just the file name

**** Of course, when the file is in the sounds folder, I can use a selection widget in HabPanel to play the sound

Update…

I’ve added a samba share to my Ubuntu server that exposes the sound folder, so now I can quickly drop new files in :slight_smile:

I think I’m at the end of my skills now, so does anyone want to move this forward ???