Page 1 of 1

iOS Shortcuts and the HTTPd plugin

PostPosted: Sat Apr 18, 2020 6:43 pm
by FlyingDiver
This thread was discussing a way to use a Shelly device to enable using iOS Shortcuts to run action groups. That was a really clever thing to do, but I think it's easier to do with the HTTPd plugin. And no Shelly device is required. It goes something like this:

First, you need the HTTPd plugin installed. These instructions are for the Version 2 plugin, but the same thing can be done with the original. You'll need the IP address of the Indigo server and the port number you assigned to the HTTP port in the plugin. It should look like this, with your IP address and port.
PNG image.png
PNG image.png (212.22 KiB) Viewed 1906 times

The group number should be the Indigo ID for the action group you want to run with this command.

Then you need to set up a trigger:
Screen Shot 2020-04-18 at 8.33.36 PM.png
Screen Shot 2020-04-18 at 8.33.36 PM.png (517.58 KiB) Viewed 1906 times

With this action:
Screen Shot 2020-04-18 at 8.33.54 PM.png
Screen Shot 2020-04-18 at 8.33.54 PM.png (560.99 KiB) Viewed 1906 times

Here's the code to make it easier to copy:
Code: Select all
groupID = int(indigo.devices[1794473612].states["group"]) # State "group" of "HTTP"
try:
    actionGroup = indigo.actionGroups[groupID]
except:
    indigo.server.log("Error unknown action group - {}".format(groupID))
else:
    indigo.actionGroup.execute(actionGroup)


That's it. Duplicate the shortcut, Change the name and edit the group number to use for multiple actions.

If you're using the V1 plugin, you'll use Indigo variables instead of device states for the trigger and action script.

Re: iOS Shortcuts and the HTTPd plugin

PostPosted: Sun Apr 19, 2020 1:01 am
by howartp
Ooooh....!


Sent from my iPhone using Tapatalk Pro

Re: iOS Shortcuts and the HTTPd plugin

PostPosted: Sun Apr 19, 2020 6:59 am
by CliveS
FlyingDiver wrote:
This thread was discussing a way to use a Shelly device to enable using iOS Shortcuts to run action groups. That was a really clever thing to do, but I think it's easier to do with the HTTPd plugin. And no Shelly device is required.

I have just moved all my Shortcuts over to your method and is so easy compared to my 'method', I used the V2 HTTPd.

I did ask that if anyone could improve my Python code to let me know but I did not expect you to annihilate it completely :lol:

But glad you did!