Pizzaface / Alexa-Chromecast-Skill-2.0

Allows Amazon Alexa to control Google Chromecast - Designed for Raspberry Pi
359 stars 65 forks source link

Some help with the Alexa skill please? #40

Closed justinmaiuto closed 3 years ago

justinmaiuto commented 3 years ago

Hi, I think i'm most of the way there with getting this running on my Synology NAS, here is the output of start.sh:

2020-08-26 19:35:57,855 - root - INFO - Starting Alexa Chromecast listener... 2020-08-26 19:35:57,909 - local.ChromecastSkill - INFO - Finding Chromecasts... 2020-08-26 19:36:02,940 - pychromecast - INFO - Querying device status 2020-08-26 19:36:03,020 - local.ChromecastSkill - INFO - Found ChromecastLounge 2020-08-26 19:36:03,154 - local.ChromecastSkill - INFO - 1 Chromecasts found 2020-08-26 19:36:03,170 - local.ChromecastSkill - DEBUG - Received: protocol_version: CASTV2_1_0 source_id: "f8996ece-a3fd-483b-ac73-c77299780bd5" destination_id: "sender-0" namespace: "urn:x-cast:com.google.youtube.mdx" payload_type: STRING payload_utf8: "{\"type\":\"mdxSessionStatus\",\"data\":{\"screenId\":\"5mgnrg6lb54ai0kat2h3cpktm\",\"deviceId\":\"ef689480-200a-45ee-a57a-618f67a47115\"}}" {'type': 'mdxSessionStatus', 'data': {'screenId': '5mgnrg6lb54ai0kat2h3cpktm', 'deviceId': 'ef689480-200a-45ee-a57a-618f67a47115'}} 2020-08-26 19:36:03,644 - botocore.credentials - INFO - Found credentials in shared credentials file: ~/.aws/credentials 2020-08-26 19:36:05,481 - local.SkillSubscriber - INFO - Listening on http://:55012 2020-08-26 19:36:05,495 - local.SkillSubscriber - INFO - Subscribing for Alexa commands... 2020-08-26 19:36:05,921 - local.SkillSubscriber - INFO - Received subscription confirmation... 2020-08-26 19:36:06,037 - local.SkillSubscriber - INFO - Subscribed.

Note that I removed my IP from the logs above.

The problem is Alexa doesn't understand the commands and simply says "hmm, i don't know that". I feel like I should be adding the skill to the devices in my home somehow, but not sure how to do that? I'm not seeing any Lambda logs or local listener outputs when I talk to my Echo device so that what is leading me to think I need to have it learn the skill somehow?

justinmaiuto commented 3 years ago

Ok, worked it out that I needed to be using the same account that my devices are linked to, which i have now done and linked enabled the skill on the devices. I'm still having the same issue through where my Alexa Echo does not invoke anything when using "chrome cast" as the invocation words. Note alexa skill console makes you use 2 words for invocation so I used "chrome cast"

justinmaiuto commented 3 years ago

Ok. got it all working now. Great stuff! My problem was 2-fold, using an alexa developer account different to the account used for my alexa devices and also using the US language for the skill but my devices are in AU. After starting again using the right account and the AU language it all up and running. Thanks!

I also noted in the code some plex libraries imported and a comment saying this would be future functionality - I'd love to see this! Any ETA on it?