Skip to content

Siri Shortcuts #282

Open
Open
@djarrard-zz

Description

This isn’t an “issue” in the traditional sense, but I thought I’d post it for anyone else in the community who might find it useful.

I’ve been experimenting with controlling Terrarium Pi devices using Siri Shortcuts. The Terrarium Pi API makes it very easy to automate a variety of procedures at the tap of a button or just by telling Siri. It’s a little more tedious than just using python, but the simplicity of tapping a button on your Apple device is just awesome.

In my system, I have the lighting environment setup but sometimes I need to override those settings. My terrarium is in a guest room, and guests don’t appreciate the light coming on at sunrise. Or maybe I’m up extra late and want to turn on the night light. I can use the interface but its multiple steps. I have to open the site, turn manual mode on, and then adjust my light. I then have to remember to go back and turn manual mode back off to resume the normal schedule. I built a shortcut to help automate this process.

When tapping the button (or launching via Siri), it sets the switch to manual mode and toggles the switch. This means it works to turn a light on or off. Since I have multiple lights, I created a shortcut for each light. Of course this leaves them in manual mode, so I created a Resume Schedule shortcut that turns off manual mode on all listed switches. One tap, and everything goes back on schedule.

I’m using a rigged up humidifier controlled by a relay switch. I’m testing its effectiveness in increasing relative humidity so I can program the timers appropriately in Terrarium Pi. I created a shortcut that allows me to run that humidifier for a specified period of time. When running the shortcut, it runs through a series of logical branches.

If the humidifier is not already running, the shortcut asks for the amount of time to cycle the humidifier, sets the humidifier switch to manual mode and then turns it on. After the cycle, it turns off the humidifier and optionally sets manual mode back off to resume any schedules it’s associated with in Terrarium Pi.

If the humidifier is already running, it provides an option to force it off, setting manual mode to off or on in the process.

The overall result is that I have a single button that I can use to toggle the humidifier on or off without having to fuss around with the manual mode options.

I’ve pasted the links to the shortcuts below. Each shortcut contains configuration steps to wire it against your system. All you have to supply to it are your system’s Terrarium Pi API URL, credentials, and the switch ID(s) you want to manipulate.

Toggle Light
https://www.icloud.com/shortcuts/1f2e52cf642f493f886ca2b11ea1f290

Cycle Humidifier
https://www.icloud.com/shortcuts/a0d1787bd8fd4ea0b639ba596726fda5

Resume Schedule
https://www.icloud.com/shortcuts/0435c0c99c8b49928a5434b329e37094

Metadata

Assignees

No one assigned

    Labels

    fyiFor Your Information

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions