Alexa + Ghost + Skill = Dynamic Speech or Static Announce

Posted on
Sat Feb 26, 2022 3:10 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Alexa + Ghost + Skill = Dynamic Speech or Static Announce

With the built in Alexa Plugin , the GhostXML Plugin and a URL Routine Trigger Skill, I was able to remove node-red from my life and get indigo controlled dynamic and static announcements.

    Alexa Plugin Forum: https://forums.indigodomo.com/viewforum.php?f=359
    GhostXML Plugin: https://www.indigodomo.com/pluginstore/38/
    URL Routine Trigger Skill: https://www.amazon.com/Virtual-Smart-Home-Routine-Trigger/dp/B08SHHS8JZ/

The workflow looks like this…
    Action to “refresh” a GhostXML Device
    GhostXML Device updates an online fake “doorbell” that you create.
    Fake Doorbell activates in Alexa and initiates a routine
    Routine Dynamic:
    Custom Action “Ask indigo to speak VARIABLE NAME”
    Pick the device you want to speak the message

    Routine Static:
    Message Action -> Announce -> All devices (or select devices) -> write static message
Note: I haven’t figured out how to do a dynamic announcement yet. Edit Work-around for this... see below.

Step 1: Set up skill (follow their steps) and create a “trigger” to test with (add more once you get everything working. We’ll call this trigger “alpha”. The skill’s corresponding web page will give you three URLs. For this project, we will use the JSON one.

Step 2: Create a variable “alpha”. You can make this dynamic later with triggers or schedules…. for now, use, <speak>Testing the Alpha message thing</speak> . Use the tags so when your device speaks later, it will strip out the “value of the indigo variable is” part of the message and just read the text between the tags.

Step 3: Open the Alexa app and build your routine.
    When this happens -> Smart Home -> Select “Alpha”.
    Add Action -> Custom -> write “ask indigo to speak Alpha”
    From: Pick the alexa device to broadcast the message
    Save, wait a minute or two, run the routine and make sure you message goes through.
(Getting this part working is helpful when making sure the next step is working)

Step 4: Create a GhostXML device. I used the (Real Type), but either should work.
    Device Name: Alpha
    Feed Type: JSON
    Refresh Frequency: Manual refresh
    URL/Path: Full JSON path from step 1. https://www.blablabla=json
    Authentication Method: None

Step 5: Create GhostXML action to refresh data for the Alpha device. Save and execute.
If you hear your alpha announcement, congratulations, you are well on your way to spreading your words of wisdom throughout your house.
Note: For me, I got hung up on the secure part of the URL and had to remove the “s”. If running the action results in an error, try removing the s and just using http.

Now you can add that action to a schedule or a trigger and every time it activates, you will hear that announcement.

A couple side-notes:
    My plan is to create a "doorbell" for each alexa device for dynamic announcement purposes and then create a handful of "doorbells" for some static messages (but things I would want announced), like if my actual doorbell is rung, or Dad is home, Uncle Ricky is here, it's 10 past the hour time to wash your hands, etc.
    The skill is free and says it allows up to 300 doorbell devices which is more than I will ever need.
    There are a few other skills that offer similar services. Another that looks promising is Voice Monkey. It does the fake doorbell thing for $6/year (something like that) you can send video or images to an echo show or push out audio announcements. The spoken words are embedded in the URL, so I'm guessing it would be easy to automate and remove the need for a couple of the steps above.
    Once indigo adds doorbells to it's list of supported alexa devices, then the above is a moot point.
    I'm still working on my https issue. Still not sure why I'm getting an SSL error when I try.

Update/Edit 8/18/2022:
This fun/awkward workaround has been working consistently and without any crashes since I started using it.
Continuing from the above steps....

Step 6:Create Trigger
    Use a name that is inline with the rest... so we'll call this Trigger "Alpha"
    Trigger: when the variable "Alpha" has any change
    Condition: if variable "Alpha" does not equal " " <- Null/Blank
    Action: Execute the GhostXML action you created on Step 5, then modify the Variable "Alpha" to " " <- Blank
Note: Add about a 5 second delay to the last part of that trigger. If Indigo deletes the variable before Alexa sees it, she gets mad.

Now whenever a script or something somewhere else in your indio-verse updates that variable, you will automatically get an announcement to that specific alexa device. Do you want that variable to be read across all alexa devices....

Step 7:On the alexa app, you can have multiple routines doing the same thing. Look at step 3 above, Copy that routine action, select the doorbell (again), change the alexa device at the bottom of the routine, save and repeat until you go through all the alexa devices that you want a whole house announcement on.

Note: I find that this method does work, but there is a greater delay between devices. (Versus the single doorbell pr. static announcement method) .... so with a house full of echos, you will know why they are called echos.

Note: I can't remember if I wrote this elsewhere, but you can incorporate sounds into the message... try this for example...
Code: Select all
<speak><audio src="soundbank://soundlibrary/bell/chimes/chimes_10"/>It’s 15 past the hour, time to wash your hands</speak>
Need something scarier to motivate the kids to wash up... try a bear growl or a dinosaur... https://developer.amazon.com/en-US/docs/alexa/custom-skills/ask-soundlibrary.html

Update/Edit 2/17/2023:
First Crash, but a simple fix. Obviously there are a lot of moving parts for an announcement to work. If it stops working, you have to check several things. About 1 year after setup, everything on the Indigo side was doing just fine. On the Amazon side, everything appeared ok. The skill still showed as linked, but if I tried to manually "ring" a doorbell with the URL, I got a "Failure" message in safari. Easy fix. Deactivate skill -> activate skill -> log back into skill with your amazon creds. That's it. I guess after a year (for me) the skill had to be re-introduced to Amazon. I'm back up and running.

Side note... Somewhere along the way I created a Virtual Action Device, "Stealth Mode" that sets a variable "StealthMode" to True or False. My announcement triggers (and some of my lighting triggers) use that variable as a condition before firing. Handy when the baby is sleeping or your wife asks you to look out back because she heard a "thump".
Last edited by whmoorejr on Fri Feb 17, 2023 6:47 am, edited 4 times in total.

Bill
My Plugin: My People

Posted on
Sun Feb 27, 2022 2:26 pm
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: Alexa + Ghost + Skill = Dynamic Speech or Static Announc

Can’t wait to check this out- super creative

Posted on
Sun Jul 03, 2022 4:15 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Alexa + Ghost + Skill = Dynamic Speech or Static Announc

Very interesting. I have an ezviz doorbell that I would actually like to integrate with Indigo. I think the only way I can do it is through Alexa. Could I use a similar set up to yours with an actual doorbell to execute an existing Indigo trigger that generates an announcement or plays a doorbell town throughout the house?

I don’t have any Alexa stuff… Which Alexa echo or other device would you recommend? Or is it even needed; can one just integrate Alexa without an Alexa device?

Posted on
Sun Jul 03, 2022 9:06 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Alexa + Ghost + Skill = Dynamic Speech or Static Announc

hamw wrote:
Very interesting. I have an ezviz doorbell that I would actually like to integrate with Indigo. I think the only way I can do it is through Alexa. Could I use a similar set up to yours with an actual doorbell to execute an existing Indigo trigger that generates an announcement or plays a doorbell town throughout the house?

I don’t have any Alexa stuff… Which Alexa echo or other device would you recommend? Or is it even needed; can one just integrate Alexa without an Alexa device?


Doorbell: My doorbell is just a standard doorbell. I use an ELK doorbell sensor https://www.elkproducts.com/product/doorbell-telephone-ring-detector-930/ The sensor has a NO/NC output that you can hook up something that can turn a NO/NC into something that indigo will recognize. For my garage doors (for example) I use a FortrezZ MIMO Lite. For my doorbell, I have it wired into my home alarm panel as an automation zone. (It has no affect on the arming/disarming of my home alarm, but Indigo can see all my home alarm zones including that one). From there, the doorbell can do whatever I want Indigo to make it do. Send me a text, run a script to grab a picture from my front patio camera, etc.

Alexa: Alexa really has no brains. It is, however, a cheep way to do (whole house) stuff when you can get plug in alexa devices for around $15 compared to the cheapest apple home pod for $100 for the Mini. If you are willing to spend the money... going the apple route is a lot less problematic. Before my airport network fried, I had airport expresses throughout my house which double as airplay devices. Announcements via airplay and indigo is basically built in and effortless. There are tons of non-apple air play devices out there as well that can be used to extend your whole house audio / announcement abilities.

Enviz Doorbell: Not sure.... maybe something in the way it pushes notifications to you can be intercepted by Indigo? As long as there is still a hard wired bell in the setup, the Elk should be able to detect a button push.

Bill
My Plugin: My People

Posted on
Thu Aug 18, 2022 12:48 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Alexa + Ghost + Skill = Dynamic Speech or Static Announc

I updated the first post.... sorta a 1 month follow-up, what I've learned, etc.

Bill
My Plugin: My People

Posted on
Fri Feb 17, 2023 6:47 am
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Alexa + Ghost + Skill = Dynamic Speech or Static Announc

updated the 1st post .... 1 year and just had my first crash.

Bill
My Plugin: My People

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests

cron