noelportugal / google-home-notifier

Send notifications to Google Home
MIT License
578 stars 171 forks source link

Sending command pauses music and doesn't resume #4

Open Mrono opened 7 years ago

jtara commented 7 years ago

I don't think it "pauses" it - it just preempts whatever is playing. Keep in mind, this script doesn't really do anything specific with Home - it just casts some audio to a Chromecast audio receiver, which Home is one of.

I think it may be possible to query for current stream and position and restore afterwards.

But what really is needed is an announcement service for Home from Google (which probably would make this script unnecessary.)

I note that e.g. Google's timers reduce volume of any music playing, and restore it when done with announcement. Google needs to expose that functionality, IMO.

Mrono commented 7 years ago

Once I looked into how it worked I realized that with current apis it's not possible. Since you're sending an mp3 stream to the home it will stop whatever is playing, just like if you cast the audio from your phone

markosole commented 6 years ago

Did anyone found a way to control that "resume"?

PS: I have made PHP script with MySQL which acts as a DNS server for this and URL is static all the time. If you are interested, I can push it online to github.