stevenleeg / geemusic

A bridge between Google Music and Amazon's Alexa
GNU General Public License v3.0
664 stars 181 forks source link

Android_ID and multiple echo devices #238

Closed saluja04 closed 6 years ago

saluja04 commented 6 years ago

I have multiple echo devices in my home and remote (in my parents' home), all under my Amazon account. I asked my folks to try out the Gee Music skill (is this the correct word? I'm new to this!) on their Echo while I tried it out using my Echo Dot to see if there is any interference.

It looks like there might be some: if I say to my office Echo dot, "Alexa, ask gee music to play can't you hear me knocking", it will play without problems. If someone then asks another Echo device to play something else, my Echo dot will sometimes pause. I have tried to recreate the effect using a second Echo dot (in my kitchen) but can only sometimes get it to exhibit the same behavior.

Additionally, Gee Music sometimes seems to get it's queue confused: I asked it to play a song (Drake - Hotline Bling) and then asked it to play the next track ("alexa, next song please'). It played a song on a playlist I had attempted to play from a different device earlier in the day. If I were using the Google Play app or website, this song would not be the next song on a Drake - Hotline Bling radio.

In #220, the issue of ANDROID_ID was discussed, and I was able to fix an issue I was having with my Heroku setup. I assigned a specific ANDROID_ID to the skill. I think that might be causing these issues. Is there a way to assign multiple ANDROID_ID values, or perhaps have the skill assign a new, random value, such that there is no interference? I have a multi-user (family) subscription plan to GPM and less than 10 registered devices to my account, so I can spare adding a few new, fixed unique IDs if that is an issue.

Thanks in advance!

fergyfresh commented 6 years ago

As for you first issue about the Echo stopping and pausing, it must have heard someone else say something in another room and misheard it, which I have had before and seemingly isn't an issue I see a lot.

The next song please also doesn't seem to be an issue because playing a specific song doesn't nuke the queue, it just adds it to the front.

The ANDROID_ID is only needed for your PAAS and not per Echo/Alexa device so you're good on that front. You don't need one per device, you just need one per PAAS you use, which should realistically only be one.

mikeage commented 5 years ago

@saluja04 , you might want to try PR #253 . I don't think the current code works well with multiple devices, since the skill is stateful but the two devices need their own queues. In your case, the global queue was changed by the second device, so the calls to next() from the first device can get confused.