Wake me up!
Alarms are alarming. They’re super fine and useful if you really need to be up at a certain time and it’s hard for you to hit it. Otherwise, they are the harbingers of morning terrorism.
I got my lights to slowly turn on to tell me it’s time to get up. It takes 15 minutes to go from 0 to full brightness, at the time I specify.
I’m finally back on a hacking/automation kick. For a number of reasons which I won’t write about, for everybody’s sake, It’s been a while. This is nowhere near the intentions I have for the Plum Garage controller/automation system, but it’s the sort of results I want to see.
This small hack took two steps, first was the python script to slowly open the lights (based on my python-hue work) and the second is running that on a cron job on a raspberry pi. That’s it.
Script wakemeup.py:
#!/usr/bin/env python
from hue import Hue
def wakemeup():
h = Hue()
h.station_ip = '192.168.42.89'
h.get_state()
minutes = 15
transition = minutes * 60 * 10
h.lights['l1'].off()
h.lights['l1'].set_state({
"on": True,
"bri": 255,
"transitiontime": transition
})
if __name__ == "__main__":
wakemeup()
Cron Task:
45 6 * * * /home/pi/python-hue/wakemeup.py
16th February 2014
I won't ever give out your email address. I don't publish comments but if you'd like to write to me then you could use this form.
I'm Issac. I live in Oakland. I make things for fun and money. I use electronics and computers and software. I manage teams and projects top to bottom. I've worked as a consultant, software engineer, hardware designer, artist, technology director and team lead. I do occasional fabrication in wood and plastic and metal. I run a boutique interactive agency with my brother Kasey and a roving cast of experts at Kelly Creative Tech. I was the Director of Technology for Nonchalance during the The Latitude Society project. I was the Lead Web Developer and then Technical Marketing Engineer at Nebula, which made an OpenStack Appliance. I've been building things on the web and in person since leaving Ohio State University's Electrical and Computer engineering program in 2007. Lots of other really dorky things happened to me before that, like dropping out of high school to go to university, getting an Eagle Scout award, and getting 6th in a state-wide algebra competition. I have an affinity for hopscotch.