Home Automation with SMS and GPS

Post on 13-Jan-2015

2976 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

Have you ever wanted to automatically turn on your lights when you get home, or turn them back off when you leave? What about controlling your lights by SMS or IRC? This presentation will teach you how to automate your life with location-based hacks and SMS.

Transcript

Location-Based HacksHow to Automate Your Life with SMS and GPS

Aaron Parecki • @aaronpk

Open Source Bridge • June 2011

Slides and code available ataaron.pk/osb11

Sparkfun Hardware GPS

• As expensive as a phone

• Not real-time, download the data every night

• Another device to charge and carry

aaron.pk/osb11 @aaronpk

Phones with GPS Hardware

• One of a small subset of smartphones with GPS capability in 2008.• Now, most smartphones have this capability.

aaron.pk/osb11 @aaronpk

@aaronpk

Raw GPS Logs

aaron.pk/osb11

@aaronpk

Temporal Relationships

• Relationships for a limited time

• Meeting a client – 30 minutes before the meeting

• Carpooling to work – every day from 8-9am

• Even with friends, their location is not always relevant to me

aaron.pk/osb11

@aaronpkaaron.pk/osb11

@aaronpkaaron.pk/osb11

Personal LocationAnalytics

Everyone has a unique footprint of their city

aaron.pk/osb11 @aaronpk

LOCATION-BASED TRIGGERSSome fun uses for real-time location

aaron.pk/osb11 @aaronpk

@aaronpkaaron.pk/osb11

GeonotesLocation-Based Reminders

Try it! aaron.pk/geonote

Proximal Address Notification

Send an address as a Geonote.

It will arrive where you need it.

aaron.pk/osb11 @aaronpk

@aaronpkaaron.pk/osb11

@aaronpk

• Sends users notifications of restaurants nearby their location that are below a threshold of cleanliness.

• Made by Reid Beels at a Geoloqi Hackathon

aaron.pk/osb11

@aaronpk

Trigger-Based Actions

Create triggers based on where users are.

aaron.pk/osb11

@aaronpk

Turning On/Off Your Lightswith GPS and SPS

aaron.pk/osb11

Geoloqi APIYour Home

Server

X10

Tropo.com

Your Home Lights

@aaronpkaaron.pk/osb11

X10 Lamp Switch

Linux Command Line X10 Clientwww.heyu.org

$ heyu on A1

@aaronpk

Geoloqi Layers

aaron.pk/osb11

Web Views

@aaronpkaaron.pk/osb11

@aaronpk

Create a Layer in Geoloqi

aaron.pk/osb11

Docs: geoloqi.org/API/layer/create

@aaronpk

Create a Trigger in Geoloqi

aaron.pk/osb11

Docs: geoloqi.org/API/trigger/create

@aaronpk

Handling a Trigger from Geoloqi

aaron.pk/osb11

Docs: geoloqi.org/Trigger_Callback

@aaronpk

Loqi – the Friendly IRC Bot• Core is MediaWiki RecentChanges perl bot

• Listens for incoming UDP packets and echos to a channel

• IRC messages are routed to a separate script on a new thread

• Loqi’s reactions to messages can take an indefinite amount of time without hanging the main IRC process

• Hangs out in #pdxwebdev on freenode

aaron.pk/osb11

@aaronpk

Loqi – the Friendly IRC Bot

aaron.pk/osb11

@aaronpk

Loqi – the Friendly IRC Bot• Easy to send messages from new sources because it’s

listening on UDP

• Security by obscurity! Yeah!

• Quick way to debug things on random web servers

• Send messages from any language

aaron.pk/osb11

@aaronpk

Loqi – the Friendly IRC Bot

aaron.pk/osb11

@aaronpk

Create an SMS Number

aaron.pk/osb11

tropo.com

@aaronpk

SMS to IRC Gateway

aaron.pk/osb11

https://gist.github.com/1043323

@aaronpkaaron.pk/osb11

@aaronpkaaron.pk/osb11

@aaronpkaaron.pk/osb11

@aaronpkaaron.pk/osb11

@aaronpkaaron.pk/osb11

@aaronpkaaron.pk/osb11

@aaronpkaaron.pk/osb11

@aaronpkaaron.pk/osb11

@aaronpk

Indoor Location! (sort of)• Watch your DHCP server logs for mac addresses

• Your phone makes a DHCP request almost immediately when you get in range of your home Wifi

• Quick and cheap way to know if you’re home!

aaron.pk/osb11

Thank you.

Geoloqi.com

Slides & Code: aaron.pk/osb11

Aaron Parecki @aaronpk

top related