Skip to content

Instantly share code, notes, and snippets.

@d3mon187
d3mon187 / imhome.py
Created March 24, 2014 17:20
Script that controls events for leaving home and coming back using phone pings and wemo motion sensors.
import os
import subprocess
import time
import datetime
import ephem #pyephem integration for checking if lights need to remain on
o=ephem.Observer()
o.lat='30' #change to your latitude
o.long='-98' #change to your longitude
running=1