Skip to content

Debugging Automation Shortcut

Debugging Automation Shortcut

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.