HomePod support..?

Posted on
Sat Dec 03, 2022 6:27 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

HomePod support..?

I know you didn’t plan to add HomePod support to this plugin, but it does seem to find all my HomePods, and the atv GitHub repo has many people reporting it works fine with theirs so I’m hoping there’s a way to get them to work here too. The problem I’m having is that when I try to pair nothing happens on the HomePod. As best I can tell it’s supposed to read out the code, but nothing happens.. any ideas?


Sent from my iPhone using Tapatalk Pro

Computer says no.

Posted on
Mon Dec 05, 2022 2:01 pm
GlennNZ offline
User avatar
Posts: 1555
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: HomePod support..?

Hi

Unfortunately don’t have a HomePod to test with - although did look… but a bit Alexa dominant in this household and suspect the WAF would drop - with Alexa/Siri confusion!

There also may be some OS16 issues..

Can you PM me a log of the attempt? I’ll have a look - hopefully something simple….

Glenn


Sent from my iPad using Tapatalk

Posted on
Thu Dec 08, 2022 4:17 am
GlennNZ offline
User avatar
Posts: 1555
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: HomePod support..?

Fixed the lack of a Homepod to test with…

Try version 0.1.1
On github now

Should enable HomePod support and a few other changes…

Glenn


Sent from my iPad using Tapatalk

Posted on
Sat Dec 10, 2022 12:29 am
GlennNZ offline
User avatar
Posts: 1555
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: HomePod support..?

Image

0.1.1- 0.1.10
Adds & Extend Homepod support

0.1.9-0.1.10

Add Action Group to Send Text to Speech annoucement to HomePods with current OSX System voice
(Change current voice in OSX settings voices)

Allows Device and Variable subsitution so can read weather forcast etc. depending on setup

NEEDS ffmpeg (included in plugin), likely to need quaranatine command run on new install
Add messaging for this.
Converts text to speech with system say command and then converts to mp3 for playback. Add a slight delay but seems to be under a second in my testing.

Image

0.1.1

Add support for Homepod and potentially other devices...

Notes for HomePods

These devices do not need to be paired - but once created setup the connect in the Device Edit screen

Play_URL for Homepod reports unsupported.

However Stream_File, or the Remote setting:
"Stream local file or remote file to device"

Works

Optional Argumment:
https://www.soundhelix.com/examples/mp3 ... Song-1.mp3
or
Local file: (like)
/Users/Indigo/Desktop/doorbell-1.mp3
Works.

To generate voice file:
In terminal
Code: Select all
say "Person arrived Home" -o personhome.aiff


Homepod Stream File seems to need a mp3 files
ffmpeg commandline tool can convert say generated aiff

Code: Select all
ffmpeg -i Input.aiff -f mp3 -acodec libmp3lame -ab 192000 -ar 44100 Output.mp3


Tempted to add a Action Group to automate all this.. (done in new version 0.1.9 above)

Homepod:
Appears Pause/Play toggle button unsupported.

But volume control and seperate play, and Pause button function fine.

The above Stream file means can use TTS and play your own mp3 files as annoucement action Groups

Posted on
Sat Dec 10, 2022 9:09 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: HomePod support..?

Hey sorry for my lack of reply, I’m actually on holiday in NYC at the moment but I will test it out when I get home!


Sent from my iPhone using Tapatalk Pro

Computer says no.

Posted on
Sun Jan 08, 2023 5:12 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: HomePod support..?

Just FYI this seems to be working well! Thank you very much :D

Computer says no.

Posted on
Fri Mar 10, 2023 12:13 pm
anyone offline
User avatar
Posts: 125
Joined: Apr 03, 2011
Location: Norfolk, VA

Re: HomePod support..?

Wow! Just wow. Thanks for creating this and then making it so damn flexible.

I got the Text-to-Speech working on a HomePod. I am wondering if you have any suggestions on this implementation.

My solution was to place a bash script in '/Library/Application Support/Perceptive Automation/Scripts' that creates the audio files and does the conversions, storing the files in /tmp.

I then created an Action Group to play the /tmp/output.mp3 on the HomePod with your appleTV Plugin Action.

Then I created a Trigger to watch a variable. When the variable changes, it runs the script, that plays the speech file, on the HomePod.

convert_to_speech.sh
Code: Select all
#!/bin/bash

if [ -z "$1" ]
  then
    echo "No argument supplied. Please provide a string to convert to speech."
    exit 1
fi

# Convert text to AIFF audio file, save to /tmp
say "$1" -o /tmp/convertedTo.aiff

# Convert AIFF audio file to MP3 using ffmpeg, save to /tmp
/Library/Application\ Support/Perceptive\ Automation/Indigo\ 2022.2/Plugins/appleTV.indigoPlugin/Contents/Server\ Plugin/ffmpeg/ffmpeg -i /tmp/convertedTo.aiff -y -f mp3 -acodec libmp3lame -ab 192000 -ar 44100 /tmp/output.mp3

Posted on
Fri Mar 10, 2023 12:55 pm
anyone offline
User avatar
Posts: 125
Joined: Apr 03, 2011
Location: Norfolk, VA

Re: HomePod support..?

I see it now. I took the long way.. you modified it so you don't have to do that. Just do the announce plugin action.

Awesome.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest