Home automation question

I have been fiddling with some home automation that would turn on a light controlled by an iHome switch when my Blink camera detects motion at night. This part is all fine and is working great.

The problem I’m having is in getting the light (iHome Plug) to turn off after 15 minutes. I can’t find anyway to turn something off 15 minutes after it has been turned on, unless I set a schedule for it to come on and go off, which won’t work in this instance.

I have different rules set up in HomeKit and IFTTT, so solutions using either of those or possibly other services/devices would be helpful. FYI, Blink works with IFTTT but not HomeKit, and iHome works with both.

Does anyone have any suggestions?

1 Like

I have a little bit of home automation - mostly I have a handful of Hue lights. I can control these using some scripts I created on my Mac. If I want to turn on a light for a particular period of time I trigger a script on my Mac that first of all turns on the light and secondly schedules (using an at command) to run at a specific time (e.g. 15 minutes later) to turn the light off. I have a Workflow workflow that triggers the necessary command on my Mac mini server by connecting over SSH.

Fundamentally I had the same issue as you. My solution was to find (/create) something that could trigger the initial command and schedule the second command to be run.

I didn’t find anything that could do this other than something on my home network.

I found this post that suggests the iHome smart plugs can be controlled by a script, so you could in theory implement a similar approach to the one I used.

If you don’t have an always on Mac (or other computer) available, then just a few pounds/dollars/etc. on a Raspberry Pi zero would be enough to give you an always on computer on your home network that could run and schedule the scripts for you via a direct (at keyboard) or remote (e.g. via SSH, Alfred Remote, Keyboard Maestro remote, etc.)

Sorry it isn’t a snap of the fingers sort of fix, but hopefully something in here helps a bit with at least one option to consider.

1 Like

This is great. Thank you!