Embedding links to Indigo Actions ?

Posted on
Fri May 19, 2023 12:55 pm
SearchCz offline
Posts: 172
Joined: Sep 18, 2019

Embedding links to Indigo Actions ?

Hi,

I'm looking for a way to send notifications of problems / concerns in the smarthome along with links to involve the likely corrective action that should be taken.

For example, if a light has been left on for *too long*, I'd like to send a notification with options to either turn the light off, or to extend the timer for another predetermined time period. I thought perhaps I could link to *something* that would trigger the correct corresponding action, but I'm not sure what that *something* would be. Any thoughts or ideas on how I can make that happen?

Posted on
Fri May 19, 2023 1:52 pm
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Embedding links to Indigo Actions ?

I'm not aware of a way to fire a notification with options (that doesn't mean there isn't one). You could use a Shortcut to fire various Indigo actions based on the content of a text message (for example)--and then the shortcut would present you with the various actions to take. In theory, anyway.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri May 19, 2023 8:06 pm
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: Embedding links to Indigo Actions ?

Shortcuts definitely can work for that.

I use Pushover for that as it allows me to respond. Let me walk you through it.

Requirements:
1. Pushover
2. Pushover plugin
3. A control page
4. A trigger for each event you are monitoring

Pushover is out of this scope, but it's pretty straightforward to set up.

Example Flow:
1. Trigger: All adults in my house are not home (that's another topic how i monitor that)
Image

2. Action: Use Pushover to send an http link to a Control Page
Image


Make a page (the control page in this picture sucks because I am revamping it)
Image
I am happy to say it has been incredibly bulletproof.

Posted on
Sun May 21, 2023 9:31 am
SearchCz offline
Posts: 172
Joined: Sep 18, 2019

Re: Embedding links to Indigo Actions ?

mundmc wrote:
Shortcuts definitely can work for that.

I use Pushover for that as it allows me to respond. Let me walk you through it.

Requirements:
1. Pushover
2. Pushover plugin
3. A control page
4. A trigger for each event you are monitoring

Pushover is out of this scope, but it's pretty straightforward to set up.

Example Flow:
1. Trigger: All adults in my house are not home (that's another topic how i monitor that)

2. Action: Use Pushover to send an http link to a Control Page


Make a page (the control page in this picture sucks because I am revamping it)
I am happy to say it has been incredibly bulletproof.


This is almost exactly what I was looking for, but I was hoping to have the embedded link trigger the desired action rather than producing a control page full of options. I'm already using pushover so this shouldn't be a huge leap for me. I'll give it a try!

Posted on
Sun May 21, 2023 11:16 am
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Embedding links to Indigo Actions ?

Here's an idea, unproven but worth a shot:

1) Create a google sheets document with buttons that call the Indigo Action Groups through the API - here's an example::

2) Embed your sheet directly into the email contents (this is the part I'm not sure will work). Directions here

Honestly not sure if this will work. But this could be what you're looking for.

Posted on
Sun May 21, 2023 11:17 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Embedding links to Indigo Actions ?

If the action URL points to a shortcut, then I think when you tap the notification in pushover it should launch the shortcut (which would do whatever it is you want it to do - see the Shortcuts forum for more information).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun May 21, 2023 12:07 pm
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Embedding links to Indigo Actions ?

jay (support) wrote:
If the action URL points to a shortcut, then I think when you tap the notification in pushover it should launch the shortcut (which would do whatever it is you want it to do - see the Shortcuts forum for more information).


This would only work from an iPhone or Mac and the person receiving the message would need the shortcuts locally. Is that correct?

Posted on
Sun May 21, 2023 2:50 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Embedding links to Indigo Actions ?

ryanbuckner wrote:
This would only work from an iPhone or Mac and the person receiving the message would need the shortcuts locally. Is that correct?


Well, yes, since Shortcuts only run on Apple devices... ;)

Shortcuts can be shared automatically to all devices signed into the same iCloud account. You can also specifically share shortcuts with others, though you have to be careful with whom because they will need an API Key stored in the shortcut to execute actions via the API. You could create a new key in your Indigo Account for each user outside of your iCloud account and have them use those separate keys (so you could turn it off if is somehow got compromised).

For other systems, then you'd need to use a URL that points to something where you can log in (like a control page, etc).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon May 22, 2023 8:05 pm
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: Embedding links to Indigo Actions ?

Sorry if I'm being thick, but instead of sending a link to a control page, why not just send a link to an action group that causes the appropriate shortcut to run on the host Mac?

Posted on
Tue May 23, 2023 7:09 am
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Embedding links to Indigo Actions ?

mundmc wrote:
Sorry if I'm being thick, but instead of sending a link to a control page, why not just send a link to an action group that causes the appropriate shortcut to run on the host Mac?


How do you construct a link that fires an action group?

Posted on
Tue May 23, 2023 8:45 am
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Embedding links to Indigo Actions ?

ryanbuckner wrote:
Here's an idea, unproven but worth a shot:

1) Create a google sheets document with buttons that call the Indigo Action Groups through the API - here's an example::


Here's a way to run Apps Script functions from a URL. https://www.labnol.org/code/19871-get-p ... gle-script

So you could send the Action Group ID as a parameter in the URL you generate in the email. And boom! I just tested this and it worked. You can also set permissions so only you and your wife can run them.

So the workflow would be : Email is generated -> Email URL clicked -> Apps Script doGet fires -> Indigo API Executes Action Group -> Response is generated -> User sees a google web page with success or failure.

Posted on
Tue May 23, 2023 12:53 pm
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: Embedding links to Indigo Actions ?

ryanbuckner wrote:
mundmc wrote:
Sorry if I'm being thick, but instead of sending a link to a control page, why not just send a link to an action group that causes the appropriate shortcut to run on the host Mac?


How do you construct a link that fires an action group?
Image

Posted on
Tue May 23, 2023 1:56 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Embedding links to Indigo Actions ?

That is the old REST API, which was discontinued in 2022.2.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed May 24, 2023 8:03 am
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: Embedding links to Indigo Actions ?

My bad- what's the way to do this now?

Posted on
Wed May 24, 2023 9:10 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Embedding links to Indigo Actions ?

There is no GET URL that will control a device (only POSTs).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Who is online

Users browsing this forum: No registered users and 2 guests