Debugging Automation Shortcut

Cupertino, November 17, 2020

I have a reasonably complex automation shortcut that I’m trying to get up and running with our Eve watering system. The shortcut grabs weather data as a JSON file and extracts rainfall and temperature data from the last three days. It then uses a couple of IF statements to work through the logic we want before turning on the tap.

When I test the shortcut using the play button within the Home app, it works fine. Likewise when I use the Test this automation link, it works just fine. I’m doing this on my iPad, with the iPad and an AppleTV 4K as home hubs. Latest iOS/TVOS installed.

When trying to execute the shortcut using a schedule (sunset every day), the shortcut fails. This happens whether scheduling to a specific time, or the ‘at sunset’ option. I’ve done a little bit of debugging that shows the shortcut is getting executed (by turning on the bedroom light!), gets through the first step of getting the JSON file (Get Contents from URL, using FTP to my NAS on the local network). However the next step, Match Text, seems to cause the shortcut to fail, with the test step of turning on the light not getting triggered. Note that this all works when manually testing the shortcut on my iPad.

The JSON file is around 140kb. Could it be that the AppleTV struggles with the file size? Has anyone else come up against shortcuts working ok when creating them or testing manually, but just not triggering when scheduled? Any workarounds I should try?

EDIT: just to make it easier to understand, this is the structure of the shortcut:

1. Get JSON file via FTP

2. Match Text step to get to the data section of the file

3. Step through records to pull out rainfall and temperature for specific dates

4. Application of logic to work out if the tap should be turned on or not.

If I put in a test step of turning on a light before 1., or before 2., the light comes on. If I put it after step 2, nothing happens.

Best selling & Top trending HomeKit product in our shop at this moment

HomeKit.Blog is in no way affiliated with or endorsed by Apple Inc. or Apple related subsidiaries.

All images, videos and logos are the copyright of the respective rights holders, and this website does not claim ownership or copyright of the aforementioned.

All information about products mentioned on this site has been collected in good faith. However, the information relating to them, may not be 100% accurate, as we only rely on the information we are able to gather from the companies themselves or the resellers who stock these products, and therefore cannot be held responsible for any inaccuracies arising from the aforementioned sources, or any subsequent changes that are made that we have not been made aware of.

HomeKit.Blog Is A Participant In The Amazon Services LLC Associates Program, An Affiliate Advertising Program Designed To Provide A Means For Sites To Earn Advertising Fees By Advertising And Linking To Amazon Store (Amazon.com, Or Endless.com, MYHABIT.com, SmallParts.com, Or AmazonWireless.com).

The opinions expressed on this website by our contributors do not necessarily represent the views of the website owners. 

Copyright © 2022 . All rights reserved
United States