Question on running Shortcuts via Indigo

Share your macOS, iOS, and iPadOS shortcuts here. Post your shortcut in a new topic and be sure to describe thoroughly (screenshots, full text of any scripts, apps used, etc).
User avatar
norcoscia
Posts: 1344
Joined: Wed Sep 09, 2015 5:54 am

Question on running Shortcuts via Indigo

Post by norcoscia »

I’m having a very strange problem running Shortcuts from Indigo.

I issue the shortcut to run from the indigo command line (via trigger) but it does not work - if I wait an hour or so and issue the command again it works and then works fine until the next day. Since I don’t know how to look at what indigo is doing I don’t know how to figure this out.

[MODERATOR NOTE]: moved to the appropriate forum.
_______
Norm
User avatar
jay (support)
Site Admin
Posts: 19202
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Question on running Shortcuts via Indigo

Post by jay (support) »

We need some context:
  1. How exactly are you running the shortcut?
  2. What is the exact definition of the shortcut?
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
DaveL17
Posts: 7291
Joined: Tue Aug 20, 2013 11:02 am
Location: Chicago, IL, USA
Contact:

Re: Question on running Shortcuts via Indigo

Post by DaveL17 »

3. Any conditions you have associated with the trigger.
I came here to drink milk and kick ass....and I've just finished my milk.

My Plugins and Scripts
User avatar
norcoscia
Posts: 1344
Joined: Wed Sep 09, 2015 5:54 am

Re: Question on running Shortcuts via Indigo

Post by norcoscia »

Like I mentioned it works after an hour but not the first time each day ?
Attachments
Screenshot 2023-05-15 at 2.15.27 PM.png
Screenshot 2023-05-15 at 2.15.27 PM.png (134.62 KiB) Viewed 2872 times
Screenshot 2023-05-15 at 2.14.46 PM.png
Screenshot 2023-05-15 at 2.14.46 PM.png (70.94 KiB) Viewed 2872 times
Screenshot 2023-05-15 at 2.14.15 PM.png
Screenshot 2023-05-15 at 2.14.15 PM.png (52.58 KiB) Viewed 2872 times
_______
Norm
User avatar
berkinet
Posts: 3421
Joined: Tue Nov 18, 2008 2:08 pm
Location: Berkeley, CA, USA & Mougins, France

Re: Question on running Shortcuts via Indigo

Post by berkinet »

Try adding this to the end of your command:

Code: Select all

 >> /tmp/debug.txt 2>&1
Then look at /tmp/debug.text to see if you captured any output.
User avatar
norcoscia
Posts: 1344
Joined: Wed Sep 09, 2015 5:54 am

Re: Question on running Shortcuts via Indigo

Post by norcoscia »

I’m not sure what that is supposed to do but I just did it - did not work - if I wait an hour or so and try again it will work and then work all day, log output below - no change from what I usually see…

May 16, 2023 at 6:03:38 AM
Received INSTEON "Hall Bath Light" on
Received INSTEON "Hall Bath Fan" on
Trigger Hall Bath Music On Soro


Edit - I went and asked my wife (she was a programmer (I’m a hardware guy)) - it does not look like any file was created - so maybe the whole thing including my original command is not getting run for some reason?
_______
Norm
User avatar
jay (support)
Site Admin
Posts: 19202
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Question on running Shortcuts via Indigo

Post by jay (support) »

Are you sure that your Mac's clock is set appropriately? Also, confirm that you have your times set correctly in the conditions tab.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
norcoscia
Posts: 1344
Joined: Wed Sep 09, 2015 5:54 am

Re: Question on running Shortcuts via Indigo

Post by norcoscia »

Just checked the clock and it is correct - times in action are also OK.

Funny, I just tried it again since it has been about a hour since my first test today and it did not work - tried 3 more times and it did not work (log looked good as normal). Then I removed the
>> /tmp/debug.txt 2>&1 stuff. Went and tried it and it worked perfect — this makes zero sense to me :-(
_______
Norm
ryanbuckner
Posts: 1400
Joined: Sat Oct 08, 2011 12:33 pm
Location: Northern Virginia
Contact:

Re: Question on running Shortcuts via Indigo

Post by ryanbuckner »

Remove the time check condition and run it again, just to rule that out.
User avatar
norcoscia
Posts: 1344
Joined: Wed Sep 09, 2015 5:54 am

Re: Question on running Shortcuts via Indigo

Post by norcoscia »

I’ll do that but Ill have to wait for tomorrow since it started to work now - I have many other triggers like that so that is not likely going to work…
_______
Norm
ryanbuckner
Posts: 1400
Joined: Sat Oct 08, 2011 12:33 pm
Location: Northern Virginia
Contact:

Re: Question on running Shortcuts via Indigo

Post by ryanbuckner »

Not sure what your shortcut does, I would recommend duplicating your Indigo trigger and using it to troubleshoot. (remove conditions, etc..) You'll need to determine if it's the trigger, the conditions, the shortcut, or the device causing the lag.
User avatar
norcoscia
Posts: 1344
Joined: Wed Sep 09, 2015 5:54 am

Re: Question on running Shortcuts via Indigo

Post by norcoscia »

Really hard to troubleshoot - could be some weird OS issue or shortcut issue - so strange that once it starts working it works great until the next day….
_______
Norm
User avatar
jay (support)
Site Admin
Posts: 19202
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Question on running Shortcuts via Indigo

Post by jay (support) »

Just to confirm: when it doesn't work, you DO see the following in your event log?

Code: Select all

Trigger             Hall Bath Music On Soro
If that's the case, then it narrows down the issue since the trigger is firing correctly. It will not log if the conditions were not met, so if it is logging it's getting past the conditions. One way to confirm that is to add another action to the trigger that just logs a message - "shortcut trigger is firing actions" or somesuch.

Assuming the trigger is firing correctly, then either the run shell script action isn't working or the shortcut is failing. You never posted an image of the shortcut definition, so hard to know if there's something in there that may be an issue.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
norcoscia
Posts: 1344
Joined: Wed Sep 09, 2015 5:54 am

Re: Question on running Shortcuts via Indigo

Post by norcoscia »

The shortcut always works when I run it from within the shortcuts application and the log always looks the same (same messages when it works or does not work). The shortcut uses Soro (which is a way to control Sonos via shortcuts).

I found something in the Soro guide that mentioned directly addressing a Sonos speaker (via IP). I set it up that way but I will not know until tomorrow since once it works it works for the rest of the day.

I have been trying to find a replacement for the Sonos Plug-in since It is not looking good for that to get converted to P3. I hope this works….
_______
Norm
User avatar
jay (support)
Site Admin
Posts: 19202
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Question on running Shortcuts via Indigo

Post by jay (support) »

Ok, well, if you are getting consistent logging then the issue has to be somewhere in the shortcut (or the things used in the shortcut).
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
Post Reply

Return to “Apple Shortcuts”