On our most recent IoT Podcast episode, Dean called in to the IoT voicemail hotline asking how to use Google Home for automatically turning on his Philips Hue and Wemo lights at sunset. Sunset and sunrise automations can be very useful, so I can totally understand this question. I understand it even more because you’d think this would be easy to accomplish with Google Home. It’s not.
So the bad news is that custom Routines in a Google Home environment can only be triggered by exact set times. There aren’t any options for sunrise or sunset triggers, which is confounding. Other hubs have had these trigger times for years now; they’re available for Amazon Alexa, HomeKit, SmartThings, and Wink, for example.
But all is not lost!
What Dean can do is hop on over to IFTTT and set up two automation recipes to accomplish this. Yes, I said two recipes because IFTTT can only fire off one device command per trigger event.
The easiest way to do this is select the Weather Underground channel for both of these recipes because it can provide your local sunrise and/or sunset times. That’s the first part of the “If this then that….” approach.
The second part would be to connect Philips Hue, Wemo, or whatever other device brand you want to include, to the recipe and set the command to turn your lights on.
In the end, you’ll have a cloud-based automation that fires off and your local sunset time and turns your lights on. Remember, because IFTTT can only send a command to one device per automation, you will have to configure separate recipes for each device you want to take action at the specified time.
Is this ideal? No. Having a more locally-based automation, scene or routine will work more consistently and quicker in most cases.
However, the Google Home / Assistant approach doesn’t yet rival the power of a traditional, fully-featured smart home hub, which is why we’re relying on a third-party service in this case. If Google would simply add “sunset” and “sunrise” to its routine triggers, we wouldn’t have to do that.
To hear Dean’s question, as well as our discussion in full, tune in to the IoT Podcast below:
If you’re using Hue lights, isn’t a easier to create a routine in the Hue app, which does have the ability to trigger on sunset?
So how do I do this? Can you please explain in complete details how to setup the IFTTT recipes?
thanks
Google home now allows you to schedule using the sunset and sunrise keywords and you can also do offsets such as, “Turn on the living room lights 10 minutes prior to sunset”
Yes it will work. But how do you get it to work 7 days a week without scheduling it every night.
Make a routine that runs daily at some time that then schedules your sunrise/sunset actions for the day.
Example:
Name: Schedule Daylight Automations
Schedule: Runs daily at 4 AM
Command 1: Turn on the living room lights 10 minutes prior to sunrise
Command 2: Turn on the exterior lights at sunset
Hello
Ok, will give it a try.
But I have another problem with this also. I have a routine, which runs daily at sunset and 40 minutes prior to sunrise, which is playing a specific playlist on youtube. This runs on the Google Hub, but does not run on any google minis I have around the house. On the google minis, it gives me error: i can’t play it here you can ask me to play on other devices
anyone else have this error?
thanks
Make a routine that runs daily at some time that then schedules your sunrise/sunset actions for the day.
Example:
Name: Schedule Daylight Automations
Schedule: Runs daily at 4 AM
Command 1: Turn on the living room lights 10 minutes prior to sunrise
Command 2: Turn on the exterior lights at sunset
Sorry, double post, meant to reply to a comment.