Connect Alexa
With the home client running, tell the skill where to find it, link the skill to your Amazon account, and let Alexa discover your TVs.
The settings site
- Open the settings page and Sign in with Amazon, with the same Amazon account your Alexa uses.
- Endpoint URL:
https://home.example.net:20846/askhomeskill, with your name and your external port (the endpoint URL). Press Save. - Shared secret: press Generate new secret, copy it, paste it into
config.jsonassharedSecret, and restart the client. The secret is shown only once. Afterwards the page shows its last four characters, so you can check it matches the end of the one inconfig.json. (Already have a secret inconfig.json, for example for a second Amazon account? Paste it into Paste a shared secret and press Save instead.) - Your own CA (certificates, option B)? Under Home client
certificates, pin your
ca.crt. Requiring client certificates? Upload the relayclient.crtandclient.keythere too, before you turn it on inconfig.json. - Note the Access Key ID: it is the
idof your entry inconfig.json'saccounts.
Enable and link the skill
- In the Alexa app, find Unofficial Chromecast w/ Plex under Skills & Games (search for it) and enable it.
- The app opens Amazon's sign-in page to link your account: sign in with the same Amazon account as on the settings site. The skill uses it to find your settings.
- If you skipped linking, the skill shows Account linking required in your skills list. Open the skill and link it from its Settings. Once linked, its settings show Account Linking: Linked.
The skill never unlinks you on its own. If the Alexa app ever asks you to link it again, link it again.
Discover your TVs
Say "Alexa, discover devices" (the Alexa app's Devices tab can start a discovery too).
Each Chromecast and Google TV the client found appears under its own name, plus one more device called TV (see the default TV). Run discovery again whenever you add a TV, rename one in the Google Home app, or update the client to a version with new features.
Try it
- "Alexa, turn on the Living Room TV" / "turn off the TV"
- "Alexa, pause the TV", "resume", "stop", "next", "previous", "rewind 30 seconds", "start over"
- "Alexa, set the Den TV volume to 20" (on TVs whose volume can be set)
- "Alexa, watch Planet Earth on the TV" or "play Planet Earth on the Office TV" (with Plex)
The default TV
Alexa needs to know which TV a command is for. There are three cases.
You name a TV ("pause the Living Room TV"): that TV.
You say "the TV": the device called TV, which the home client turns into a real one:
- the last TV you named in a command (the client remembers it until it restarts);
- otherwise
defaultEndpointIdfromconfig.json(the account's own, else the top-level one); - otherwise your only TV, if you have exactly one.
If none of these applies, the command fails, and the client's log says the "TV" device needs a command to another
Chromecast first. Name a TV once, or set defaultEndpointId.
You don't name any device ("Alexa, pause"): Alexa decides, from the Echo you're talking to. You can tell it which TV belongs with which Echo:
- TV & Video settings. Amazon's documented place is the Alexa app's More → Settings → TV & Video → Unofficial Chromecast w/ Plex → Link Your Alexa Device, where you choose the Echo that controls each TV. The skill's own Manage In TV & Video link is supposed to open the same page. In the current Alexa app that link opens a blank page, and so far we have not found another way into it. Amazon allows only one TV & Video skill per Echo, so if a TV maker's skill (Fire TV, Roku, Samsung…) is linked to that Echo, that one wins.
- Groups (worth trying, not verified with this skill). In the Alexa app, put the Echo and the TV in the same group or room (Devices → + → Add Group). Alexa prefers devices in the Echo's own group when you don't name one.
- Otherwise, say "the TV" and let the default TV above pick it.
Several people can share the TVs: each Amazon account links the skill on its own phone, and each can have its own
defaultEndpointId.