iOS Alarm Clock as Trigger for anything

I was going through some other threads on integrating my alarm to take actions on so figured I would share for others interested since those threads have been closed.

I chose to do it as a button so I can use that button push to fire off actions

Here was the process

  1. Create a virtual Button under add device>Virtual>Set Driver to Virtual Button (note the device ID in the URL)

  2. Install Maker API (if you don't have it already)

    Then get your send command URL (can use the cloud version I think, but I wanted local so this would only fire while I was home.

Send Device Command (replace [Device ID] with actual subscribed device id and [Command] with a supported command. Supports optional [Secondary value]
http://[Hub IP]/apps/api/[AppID]/devices/[Device ID From virtual device]/[Command in this case I used "push"]/[Number of button to push "1"]?access_token=[Access token will be on maker api page]

Example
xxx.xxx.xxx.xxx/apps/api/1189/devices/1119/push/1?access_token=notarealtoken

  1. Open the Shortcuts app on iOS
    Create Personal Automation
    Alarm>Goes Off>Wake up(this way the sleep schedule alarm trigger this)
    Add Action>Get Contents of URL>Paste Maker Push action url generated in step 2

  2. Turn off ask before running so it runs automatically.

This will send an HTTP Push request to the Maker API when your Wake Up alarm goes off no matter what time its set for. You can then use that button push as a trigger for anything you want. In my case my wake up automation.

Hope this helps someone else

6 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.