SlideShare ist ein Scribd-Unternehmen logo
1 von 3
Downloaden Sie, um offline zu lesen
Justin Wickett
Duke Smart Home
Sunday, May 25, 2008


                C O N T RO L L I N G E L E C T RO N I C S V I A S M S
   By leveraging freely available technologies, an individual can use cell phone text messaging to
remotely control electrical devices. As a result, the mobile phone’s ability to serve as a
communication platform expands into the electrical domain. With soaring energy costs and a
popular “green” cultural movement, demand has grown for energy management utilities that are
capable of providing consumption metrics from remote locations.

   Controlling electrical devices via text messaging (SMS) relies on four separate principles:

                1. A computer can communicate with an electrical switch.

                2. An electrical switch can communicate with a computer.

                3. A cell phone can communicate with a computer via SMS.

                4. A computer can communicate with a cell phone via SMS.

    The ability for a computer to communicate with an electrical switch is critical to remote home
automation and requires special hardware. In my demonstration, I used SmartHome INSTEON-
compatible electrical devices. Each INSTEON device has a unique address, which allows for devices
to recognize one another and communicate over an electrical or RF network. These addresses play
a similar role to MAC (Media Access Control) addresses found on Ethernet devices.

    In my demonstration, I plugged my computer via USB into an INSTEON PowerLinc Controller
to communicate with an INSTEON SwitchLinc Dimmer switch. The PowerLinc Controller can be
plugged into any standard 120 volt single phase electrical outlet on your local electrical network,
whereas the SwitchLinc device must use a switch box with neutral wiring. Below are images of the
two devices I used:




   INSTEON SwitchLinc Dimmer
               
        
   
    INSTEON PowerLinc Controller
   http://www.smarthome.com/2476d-light-dimmer.html
 
   
    http://www.smarthome.com/2414u.html
Computer operating systems communicate with the PowerLinc Controller via the HID (Human
Interface Driver) driver. My setup was based on a Linux machine running Fedora Core 7. I
compiled from source Bob Paauwe’s iLink INSTEON scene management software, which included
the iplc kernel module. Even though I installed the iplc kernel module on my machine, I was told
that it was no longer needed due to native HID support in the Linux kernel. I then verified that my
operating system was aware of the INSTEON PowerLinc Controller by viewing /var/log/messages
(run “tail -f /var/log/messages” via command line while plugging the USB cable from the PowerLinc
Controller into your computer to see if the device was properly recognized). After having done
that, I installed the development libraries needed to compile Bob’s iLink INSTEON scene
management software (run a “yum install libusb-devel libglade2-devel gtk2-devel”) and carefully
followed the README and INSTALL instruction files he provided to install Link (the CLI version of
his software) on my Linux machine. I was able to set up a simple scene configuration file by using
Bob’s template (see sample_scene.inf) and filling in the “xx.xx.xx” with the unique address from
each of my INSTEON devices. After configuring my scene file, I ran (as root) “./link -x all” to
propagate the changes and program devices to make the scene active. Once the scene was active, I
compiled the icmd program in the utilities directory. The icmd program allows you to send direct
commands without the need for links. By running “./icmd xx.xx.xx ON 255”, I was able to turn on
the INSTEON device with address xx.xx.xx. When the switch has been successfully turned on, a
response message is returned. As a result, the electrical switch communicates its status back to my
computer.

    The next step involved getting my cell phone to communicate with my computer. Most of
today’s mobile phones are Bluetooth enabled and capable of sending and receiving text messages. I
never considered using my cell phone to call into a PBX (private branch exchange) server such as
Asterisk running on my computer due to the complex nature of the software involved. Despite
standard Bluetooth support in the Linux Kernel, I chose not to use Bluetooth as a means of
communicating with my computer from my phone due to limited range issues. Had I used
Bluetooth, I would have been unable to remotely controlling electrical devices from long distances.
Relying on text messaging capabilities seemed to be my best option for long distance remote
control over my electrical network.

    In order to communicate with my computer via text messaging, I had to leverage functionality
provided by Twitter.com’s free service. Twitter is a SMS portal/gateway amongst many other things.
Twitter stores all text messages sent to its short code phone number (40404) in a database, and
displays them on the Web at a specific URL. By polling that specific Web URL from my computer, I
could detect and analyze any changes. As a result, my cell phone was able to communicate with my
computer.

    Furthermore, communication between a cell phone and a computer can be bi-directional. My
computer could communicate back to the cell phone via several methods. Most of the major cell
phone service providers offer free SMS public gateways. As a result, an email can be sent to a
public SMS gateway, which then forwards the contents of the email to a user’s cell phone in text
message format. A list of available public SMS gateways sponsored by major service providers can
be found at http://en.wikipedia.org/wiki/SMS_gateways. Alternatively, Twitter can also be used to
send cell phone notification updates should a user choose to accept them.
I only had to write a few lines of code to pull all of these technologies together so that they
      would work with each other. The following code is a very rough implementation that I originally
      used to test the feasibility of this idea. I plan on incorporating Bluetooth support as well as
      confirmation notifications once I get back to Duke University. Right now, I am using my cell phone
      to send Twitter public updates that are broadcasted out to all of my friends. This method is not
      secure, and spams your followers with updates about your electrical network’s condition. I
      recommend creating a private account for testing purposes, or better yet using Twitter’s direct
      messaging functionality.

          Finally, this code relies on the Summize.com search engine, which parses and indexes every
      public message sent to Twitter. I could not poll Twitter.com because of rate limiting issues. My code
      polls Summize’s REST API (which is simply a Web URL) every second checking to see if there has
      been an update. This polling method is not efficient and taxes Summize’s servers. I recommend
      subscribing to and parsing Twitter’s Pub Sub Jabber feed (see http://groups.google.com/group/
      twitter-development-talk/web/jabber-pubsub).

          Below is my quick and dirty Python code that can be easily ported over to other languages:

#/usr/bin/python

#Copyright 2008 Justin Wickett
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>.

import feedparser, os, time #The 'feedparser' library can be installed from http://www.feedparser.org/

#TODO: Replace the username as well as the INSTEON address with the appropriate values
#TODO: Also make sure that the path is correctly set in the system command to icmd's path on your local machine

lastTweet = 0 #Used to keep track of the last Tweet received to make Summize queries less expensive
username = quot;xxxxxxxxquot; #Twitter username who is sending the commands to control the electrical network
insteonAddress = “xx.xx.xx” #INSTEON address of the device you want to turn on and off

while(1):

        feedUrl = quot;http://summize.com/search.atom?q=from%3Aquot;+username+quot;&since_id=quot;+str(lastTweet) #Polling Summize

        feed = feedparser.parse(feedUrl)

        if len(feed['entries']) > 0 and feed['entries'][0].link.split('/')[-1] > lastTweet:

           if cmp(feed['entries'][0]['title'], quot;Bedroom lights onquot;) == 0: #Check for the quot;ONquot; command

              os.system(quot;icmd “+insteonAddress+” ON 255quot;) #Turn the lights controlled by my switch on

           if cmp(feed['entries'][0]['title'], quot;Bedroom lights offquot;) == 0: #Check for the quot;OFFquot; command

              os.system(quot;icmd “+insteonAddress+” OFF 255quot;) #Turn the lights controlled by my switch off

           lastTweet = feed['entries'][0].link.split('/')[-1] #Save the last Tweet so we aren't stepping over ourselves

        time.sleep(1) #Sleep one second, and execute code again

Weitere ähnliche Inhalte

Ähnlich wie The Life Cycle of a Cell Phone

harry_mapengo_project.compressed
harry_mapengo_project.compressedharry_mapengo_project.compressed
harry_mapengo_project.compressedthembhani mapengo
 
Google Voice Assistance Based Smart Home Automation
Google Voice Assistance Based Smart Home AutomationGoogle Voice Assistance Based Smart Home Automation
Google Voice Assistance Based Smart Home AutomationGauthamG4
 
Cell phone based automation systems
Cell phone based automation systemsCell phone based automation systems
Cell phone based automation systemsManpreet Chandhok
 
Chapter- 4.pptx
Chapter- 4.pptxChapter- 4.pptx
Chapter- 4.pptxKviskvis
 
30 9137 e implementation of cloud connected smart plug (edit lafi)
30 9137 e implementation of cloud connected smart plug (edit lafi)30 9137 e implementation of cloud connected smart plug (edit lafi)
30 9137 e implementation of cloud connected smart plug (edit lafi)IAESIJEECS
 
IoT Based Disaster Detection and Early Warning Device By Shweta Gaikwad
IoT Based Disaster Detection and Early Warning Device By Shweta GaikwadIoT Based Disaster Detection and Early Warning Device By Shweta Gaikwad
IoT Based Disaster Detection and Early Warning Device By Shweta GaikwadShweta Gaikwad
 
Getting Started with the NodeMCU- Getting started with Internet of Things (Io...
Getting Started with the NodeMCU- Getting started with Internet of Things (Io...Getting Started with the NodeMCU- Getting started with Internet of Things (Io...
Getting Started with the NodeMCU- Getting started with Internet of Things (Io...AkshetPatel
 
Communication Methods to build Smart Home Monitoring System: A Survey
Communication Methods to build Smart Home Monitoring System: A SurveyCommunication Methods to build Smart Home Monitoring System: A Survey
Communication Methods to build Smart Home Monitoring System: A Surveydbpublications
 
Communication Methods to build Smart Home Monitoring System: A Survey
Communication Methods to build Smart Home Monitoring System: A SurveyCommunication Methods to build Smart Home Monitoring System: A Survey
Communication Methods to build Smart Home Monitoring System: A Surveydbpublications
 
IRJET - Mirroring of Source and Sink Devices in Android Screen Casting
IRJET - Mirroring of Source and Sink Devices in Android Screen CastingIRJET - Mirroring of Source and Sink Devices in Android Screen Casting
IRJET - Mirroring of Source and Sink Devices in Android Screen CastingIRJET Journal
 
Iisrt sinthuja mepco (ec)
Iisrt sinthuja mepco (ec)Iisrt sinthuja mepco (ec)
Iisrt sinthuja mepco (ec)IISRT
 
Executive presentation3
Executive presentation3Executive presentation3
Executive presentation3MIDAUTEL
 
Quantum composers white paper ethernet connectivity
Quantum composers white paper  ethernet connectivityQuantum composers white paper  ethernet connectivity
Quantum composers white paper ethernet connectivityQuantum Composers
 
mumble: Framework for Seamless Message Transfer on Smartphones
mumble: Framework for Seamless Message Transfer on Smartphonesmumble: Framework for Seamless Message Transfer on Smartphones
mumble: Framework for Seamless Message Transfer on SmartphonesAnand Bhojan
 
Revision Notes IT CODE 402 Class 10.pdf
Revision Notes IT CODE 402 Class 10.pdfRevision Notes IT CODE 402 Class 10.pdf
Revision Notes IT CODE 402 Class 10.pdfManasGupta211804
 

Ähnlich wie The Life Cycle of a Cell Phone (20)

B1803011013
B1803011013B1803011013
B1803011013
 
harry_mapengo_project.compressed
harry_mapengo_project.compressedharry_mapengo_project.compressed
harry_mapengo_project.compressed
 
Google Voice Assistance Based Smart Home Automation
Google Voice Assistance Based Smart Home AutomationGoogle Voice Assistance Based Smart Home Automation
Google Voice Assistance Based Smart Home Automation
 
Cell phone based automation systems
Cell phone based automation systemsCell phone based automation systems
Cell phone based automation systems
 
Project report
Project reportProject report
Project report
 
Project report
Project reportProject report
Project report
 
Chapter- 4.pptx
Chapter- 4.pptxChapter- 4.pptx
Chapter- 4.pptx
 
30 9137 e implementation of cloud connected smart plug (edit lafi)
30 9137 e implementation of cloud connected smart plug (edit lafi)30 9137 e implementation of cloud connected smart plug (edit lafi)
30 9137 e implementation of cloud connected smart plug (edit lafi)
 
IoT Based Disaster Detection and Early Warning Device By Shweta Gaikwad
IoT Based Disaster Detection and Early Warning Device By Shweta GaikwadIoT Based Disaster Detection and Early Warning Device By Shweta Gaikwad
IoT Based Disaster Detection and Early Warning Device By Shweta Gaikwad
 
Getting Started with the NodeMCU- Getting started with Internet of Things (Io...
Getting Started with the NodeMCU- Getting started with Internet of Things (Io...Getting Started with the NodeMCU- Getting started with Internet of Things (Io...
Getting Started with the NodeMCU- Getting started with Internet of Things (Io...
 
Communication Methods to build Smart Home Monitoring System: A Survey
Communication Methods to build Smart Home Monitoring System: A SurveyCommunication Methods to build Smart Home Monitoring System: A Survey
Communication Methods to build Smart Home Monitoring System: A Survey
 
Communication Methods to build Smart Home Monitoring System: A Survey
Communication Methods to build Smart Home Monitoring System: A SurveyCommunication Methods to build Smart Home Monitoring System: A Survey
Communication Methods to build Smart Home Monitoring System: A Survey
 
IRJET - Mirroring of Source and Sink Devices in Android Screen Casting
IRJET - Mirroring of Source and Sink Devices in Android Screen CastingIRJET - Mirroring of Source and Sink Devices in Android Screen Casting
IRJET - Mirroring of Source and Sink Devices in Android Screen Casting
 
Iisrt sinthuja mepco (ec)
Iisrt sinthuja mepco (ec)Iisrt sinthuja mepco (ec)
Iisrt sinthuja mepco (ec)
 
Executive presentation3
Executive presentation3Executive presentation3
Executive presentation3
 
Cisco Activity
Cisco ActivityCisco Activity
Cisco Activity
 
Quantum composers white paper ethernet connectivity
Quantum composers white paper  ethernet connectivityQuantum composers white paper  ethernet connectivity
Quantum composers white paper ethernet connectivity
 
mumble: Framework for Seamless Message Transfer on Smartphones
mumble: Framework for Seamless Message Transfer on Smartphonesmumble: Framework for Seamless Message Transfer on Smartphones
mumble: Framework for Seamless Message Transfer on Smartphones
 
Revision Notes IT CODE 402 Class 10.pdf
Revision Notes IT CODE 402 Class 10.pdfRevision Notes IT CODE 402 Class 10.pdf
Revision Notes IT CODE 402 Class 10.pdf
 
Project report
Project reportProject report
Project report
 

Mehr von pleasure16

Park & Pay Stations
Park & Pay StationsPark & Pay Stations
Park & Pay Stationspleasure16
 
Cracked * Easily
 Cracked * Easily Cracked * Easily
Cracked * Easilypleasure16
 
Recycling of Cellular Telephones in Maine
Recycling of Cellular Telephones in MaineRecycling of Cellular Telephones in Maine
Recycling of Cellular Telephones in Mainepleasure16
 
C O N T RO L L I N G E L E C T RO N I C S V I A S M S
C O N T RO L L I N G E L E C T RO N I C S V I A S M SC O N T RO L L I N G E L E C T RO N I C S V I A S M S
C O N T RO L L I N G E L E C T RO N I C S V I A S M Spleasure16
 
Job-Hunt FREE 15-Minute Guide to Layoff Self-Defense
Job-Hunt FREE 15-Minute Guide to Layoff Self-DefenseJob-Hunt FREE 15-Minute Guide to Layoff Self-Defense
Job-Hunt FREE 15-Minute Guide to Layoff Self-Defensepleasure16
 
AWARENESS OF PERFORMANCE DECREMENTS DUE TO DISTRACTION IN YOUNGER ...
 AWARENESS OF PERFORMANCE DECREMENTS DUE TO DISTRACTION IN YOUNGER ... AWARENESS OF PERFORMANCE DECREMENTS DUE TO DISTRACTION IN YOUNGER ...
AWARENESS OF PERFORMANCE DECREMENTS DUE TO DISTRACTION IN YOUNGER ...pleasure16
 
Address Book IntegrAtIon wIth Jd edwArds enterprIseone And Jd ...
 Address Book IntegrAtIon wIth Jd edwArds enterprIseone And Jd ... Address Book IntegrAtIon wIth Jd edwArds enterprIseone And Jd ...
Address Book IntegrAtIon wIth Jd edwArds enterprIseone And Jd ...pleasure16
 
Cell Phone–Based System Could Improve HIV/AIDS Drug Tracking
 Cell Phone–Based System Could Improve HIV/AIDS Drug Tracking Cell Phone–Based System Could Improve HIV/AIDS Drug Tracking
Cell Phone–Based System Could Improve HIV/AIDS Drug Trackingpleasure16
 
2008 DEER HUNTING INFORMATION AND ON-LINE/TOLL FREE TELEPHONE ...
2008 DEER HUNTING INFORMATION AND ON-LINE/TOLL FREE TELEPHONE ...2008 DEER HUNTING INFORMATION AND ON-LINE/TOLL FREE TELEPHONE ...
2008 DEER HUNTING INFORMATION AND ON-LINE/TOLL FREE TELEPHONE ...pleasure16
 
ftc.gov/phonefraud
 ftc.gov/phonefraud ftc.gov/phonefraud
ftc.gov/phonefraudpleasure16
 
Cell Phone Plans
Cell Phone PlansCell Phone Plans
Cell Phone Planspleasure16
 
phone records could track rapist, expert says
 phone records could track rapist, expert says phone records could track rapist, expert says
phone records could track rapist, expert sayspleasure16
 
Bus left you waiting in the cold? Use your cell phone to track it down
 Bus left you waiting in the cold? Use your cell phone to track it down Bus left you waiting in the cold? Use your cell phone to track it down
Bus left you waiting in the cold? Use your cell phone to track it downpleasure16
 
Cell Phone Report
Cell Phone ReportCell Phone Report
Cell Phone Reportpleasure16
 
PRLog.Org - Free Web Service Lets You Locate, Track, Sync, Protect ...
PRLog.Org - Free Web Service Lets You Locate, Track, Sync, Protect ...PRLog.Org - Free Web Service Lets You Locate, Track, Sync, Protect ...
PRLog.Org - Free Web Service Lets You Locate, Track, Sync, Protect ...pleasure16
 
CELL PHONE SAVVY:
 CELL PHONE SAVVY: CELL PHONE SAVVY:
CELL PHONE SAVVY:pleasure16
 
Report telemarketers and annoying callers. Trace any phone number.
Report telemarketers and annoying callers. Trace any phone number.Report telemarketers and annoying callers. Trace any phone number.
Report telemarketers and annoying callers. Trace any phone number.pleasure16
 
City of San Antonio Code: Regulating the Care and Control of Animals
City of San Antonio Code: Regulating the Care and Control of AnimalsCity of San Antonio Code: Regulating the Care and Control of Animals
City of San Antonio Code: Regulating the Care and Control of Animalspleasure16
 

Mehr von pleasure16 (20)

Park & Pay Stations
Park & Pay StationsPark & Pay Stations
Park & Pay Stations
 
Cracked * Easily
 Cracked * Easily Cracked * Easily
Cracked * Easily
 
Recycling of Cellular Telephones in Maine
Recycling of Cellular Telephones in MaineRecycling of Cellular Telephones in Maine
Recycling of Cellular Telephones in Maine
 
C O N T RO L L I N G E L E C T RO N I C S V I A S M S
C O N T RO L L I N G E L E C T RO N I C S V I A S M SC O N T RO L L I N G E L E C T RO N I C S V I A S M S
C O N T RO L L I N G E L E C T RO N I C S V I A S M S
 
Job-Hunt FREE 15-Minute Guide to Layoff Self-Defense
Job-Hunt FREE 15-Minute Guide to Layoff Self-DefenseJob-Hunt FREE 15-Minute Guide to Layoff Self-Defense
Job-Hunt FREE 15-Minute Guide to Layoff Self-Defense
 
AWARENESS OF PERFORMANCE DECREMENTS DUE TO DISTRACTION IN YOUNGER ...
 AWARENESS OF PERFORMANCE DECREMENTS DUE TO DISTRACTION IN YOUNGER ... AWARENESS OF PERFORMANCE DECREMENTS DUE TO DISTRACTION IN YOUNGER ...
AWARENESS OF PERFORMANCE DECREMENTS DUE TO DISTRACTION IN YOUNGER ...
 
eCopy, Inc.
 eCopy, Inc. eCopy, Inc.
eCopy, Inc.
 
Address Book IntegrAtIon wIth Jd edwArds enterprIseone And Jd ...
 Address Book IntegrAtIon wIth Jd edwArds enterprIseone And Jd ... Address Book IntegrAtIon wIth Jd edwArds enterprIseone And Jd ...
Address Book IntegrAtIon wIth Jd edwArds enterprIseone And Jd ...
 
Cell Phone–Based System Could Improve HIV/AIDS Drug Tracking
 Cell Phone–Based System Could Improve HIV/AIDS Drug Tracking Cell Phone–Based System Could Improve HIV/AIDS Drug Tracking
Cell Phone–Based System Could Improve HIV/AIDS Drug Tracking
 
2008 DEER HUNTING INFORMATION AND ON-LINE/TOLL FREE TELEPHONE ...
2008 DEER HUNTING INFORMATION AND ON-LINE/TOLL FREE TELEPHONE ...2008 DEER HUNTING INFORMATION AND ON-LINE/TOLL FREE TELEPHONE ...
2008 DEER HUNTING INFORMATION AND ON-LINE/TOLL FREE TELEPHONE ...
 
ftc.gov/phonefraud
 ftc.gov/phonefraud ftc.gov/phonefraud
ftc.gov/phonefraud
 
Cell Phone Plans
Cell Phone PlansCell Phone Plans
Cell Phone Plans
 
phone records could track rapist, expert says
 phone records could track rapist, expert says phone records could track rapist, expert says
phone records could track rapist, expert says
 
Bus left you waiting in the cold? Use your cell phone to track it down
 Bus left you waiting in the cold? Use your cell phone to track it down Bus left you waiting in the cold? Use your cell phone to track it down
Bus left you waiting in the cold? Use your cell phone to track it down
 
Cell Phone Report
Cell Phone ReportCell Phone Report
Cell Phone Report
 
PRLog.Org - Free Web Service Lets You Locate, Track, Sync, Protect ...
PRLog.Org - Free Web Service Lets You Locate, Track, Sync, Protect ...PRLog.Org - Free Web Service Lets You Locate, Track, Sync, Protect ...
PRLog.Org - Free Web Service Lets You Locate, Track, Sync, Protect ...
 
CELL PHONE SAVVY:
 CELL PHONE SAVVY: CELL PHONE SAVVY:
CELL PHONE SAVVY:
 
Report telemarketers and annoying callers. Trace any phone number.
Report telemarketers and annoying callers. Trace any phone number.Report telemarketers and annoying callers. Trace any phone number.
Report telemarketers and annoying callers. Trace any phone number.
 
JUST HATCHED
 JUST HATCHED JUST HATCHED
JUST HATCHED
 
City of San Antonio Code: Regulating the Care and Control of Animals
City of San Antonio Code: Regulating the Care and Control of AnimalsCity of San Antonio Code: Regulating the Care and Control of Animals
City of San Antonio Code: Regulating the Care and Control of Animals
 

Kürzlich hochgeladen

$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...PsychicRuben LoveSpells
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theorydrae5
 
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual serviceanilsa9823
 
call girls in candolim beach 9870370636] NORTH GOA ..
call girls in candolim beach 9870370636] NORTH GOA ..call girls in candolim beach 9870370636] NORTH GOA ..
call girls in candolim beach 9870370636] NORTH GOA ..nishakur201
 
Independent Escorts in Lucknow (Adult Only) 👩🏽‍❤️‍💋‍👩🏼 8923113531 ♛ Escort S...
Independent Escorts in Lucknow  (Adult Only) 👩🏽‍❤️‍💋‍👩🏼 8923113531 ♛ Escort S...Independent Escorts in Lucknow  (Adult Only) 👩🏽‍❤️‍💋‍👩🏼 8923113531 ♛ Escort S...
Independent Escorts in Lucknow (Adult Only) 👩🏽‍❤️‍💋‍👩🏼 8923113531 ♛ Escort S...gurkirankumar98700
 
文凭办理《原版美国USU学位证书》犹他州立大学毕业证制作成绩单修改
文凭办理《原版美国USU学位证书》犹他州立大学毕业证制作成绩单修改文凭办理《原版美国USU学位证书》犹他州立大学毕业证制作成绩单修改
文凭办理《原版美国USU学位证书》犹他州立大学毕业证制作成绩单修改atducpo
 
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改atducpo
 
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceanilsa9823
 
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girlsPooja Nehwal
 
(KAVYA) Call Girls Humayun Nagar ✔️Just Call 7001035870✔️ HI-Fi Hyderabad Esc...
(KAVYA) Call Girls Humayun Nagar ✔️Just Call 7001035870✔️ HI-Fi Hyderabad Esc...(KAVYA) Call Girls Humayun Nagar ✔️Just Call 7001035870✔️ HI-Fi Hyderabad Esc...
(KAVYA) Call Girls Humayun Nagar ✔️Just Call 7001035870✔️ HI-Fi Hyderabad Esc...Sanjna Singh
 
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdfBreath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdfJess Walker
 
The Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushThe Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushShivain97
 
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual serviceanilsa9823
 
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot AndCall Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot AndPooja Nehwal
 
Lilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxLilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxABMWeaklings
 
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...anilsa9823
 
Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666nishakur201
 
LC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfLC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfpastor83
 

Kürzlich hochgeladen (20)

$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theory
 
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
 
call girls in candolim beach 9870370636] NORTH GOA ..
call girls in candolim beach 9870370636] NORTH GOA ..call girls in candolim beach 9870370636] NORTH GOA ..
call girls in candolim beach 9870370636] NORTH GOA ..
 
Independent Escorts in Lucknow (Adult Only) 👩🏽‍❤️‍💋‍👩🏼 8923113531 ♛ Escort S...
Independent Escorts in Lucknow  (Adult Only) 👩🏽‍❤️‍💋‍👩🏼 8923113531 ♛ Escort S...Independent Escorts in Lucknow  (Adult Only) 👩🏽‍❤️‍💋‍👩🏼 8923113531 ♛ Escort S...
Independent Escorts in Lucknow (Adult Only) 👩🏽‍❤️‍💋‍👩🏼 8923113531 ♛ Escort S...
 
escort service sasti (*~Call Girls in Paschim Vihar Metro❤️9953056974
escort service  sasti (*~Call Girls in Paschim Vihar Metro❤️9953056974escort service  sasti (*~Call Girls in Paschim Vihar Metro❤️9953056974
escort service sasti (*~Call Girls in Paschim Vihar Metro❤️9953056974
 
文凭办理《原版美国USU学位证书》犹他州立大学毕业证制作成绩单修改
文凭办理《原版美国USU学位证书》犹他州立大学毕业证制作成绩单修改文凭办理《原版美国USU学位证书》犹他州立大学毕业证制作成绩单修改
文凭办理《原版美国USU学位证书》犹他州立大学毕业证制作成绩单修改
 
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
 
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
 
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
 
(KAVYA) Call Girls Humayun Nagar ✔️Just Call 7001035870✔️ HI-Fi Hyderabad Esc...
(KAVYA) Call Girls Humayun Nagar ✔️Just Call 7001035870✔️ HI-Fi Hyderabad Esc...(KAVYA) Call Girls Humayun Nagar ✔️Just Call 7001035870✔️ HI-Fi Hyderabad Esc...
(KAVYA) Call Girls Humayun Nagar ✔️Just Call 7001035870✔️ HI-Fi Hyderabad Esc...
 
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdfBreath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
 
The Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushThe Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by Mindbrush
 
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
 
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot AndCall Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
 
Lilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxLilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptx
 
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
 
Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666
 
LC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfLC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdf
 

The Life Cycle of a Cell Phone

  • 1. Justin Wickett Duke Smart Home Sunday, May 25, 2008 C O N T RO L L I N G E L E C T RO N I C S V I A S M S By leveraging freely available technologies, an individual can use cell phone text messaging to remotely control electrical devices. As a result, the mobile phone’s ability to serve as a communication platform expands into the electrical domain. With soaring energy costs and a popular “green” cultural movement, demand has grown for energy management utilities that are capable of providing consumption metrics from remote locations. Controlling electrical devices via text messaging (SMS) relies on four separate principles: 1. A computer can communicate with an electrical switch. 2. An electrical switch can communicate with a computer. 3. A cell phone can communicate with a computer via SMS. 4. A computer can communicate with a cell phone via SMS. The ability for a computer to communicate with an electrical switch is critical to remote home automation and requires special hardware. In my demonstration, I used SmartHome INSTEON- compatible electrical devices. Each INSTEON device has a unique address, which allows for devices to recognize one another and communicate over an electrical or RF network. These addresses play a similar role to MAC (Media Access Control) addresses found on Ethernet devices. In my demonstration, I plugged my computer via USB into an INSTEON PowerLinc Controller to communicate with an INSTEON SwitchLinc Dimmer switch. The PowerLinc Controller can be plugged into any standard 120 volt single phase electrical outlet on your local electrical network, whereas the SwitchLinc device must use a switch box with neutral wiring. Below are images of the two devices I used: INSTEON SwitchLinc Dimmer INSTEON PowerLinc Controller http://www.smarthome.com/2476d-light-dimmer.html http://www.smarthome.com/2414u.html
  • 2. Computer operating systems communicate with the PowerLinc Controller via the HID (Human Interface Driver) driver. My setup was based on a Linux machine running Fedora Core 7. I compiled from source Bob Paauwe’s iLink INSTEON scene management software, which included the iplc kernel module. Even though I installed the iplc kernel module on my machine, I was told that it was no longer needed due to native HID support in the Linux kernel. I then verified that my operating system was aware of the INSTEON PowerLinc Controller by viewing /var/log/messages (run “tail -f /var/log/messages” via command line while plugging the USB cable from the PowerLinc Controller into your computer to see if the device was properly recognized). After having done that, I installed the development libraries needed to compile Bob’s iLink INSTEON scene management software (run a “yum install libusb-devel libglade2-devel gtk2-devel”) and carefully followed the README and INSTALL instruction files he provided to install Link (the CLI version of his software) on my Linux machine. I was able to set up a simple scene configuration file by using Bob’s template (see sample_scene.inf) and filling in the “xx.xx.xx” with the unique address from each of my INSTEON devices. After configuring my scene file, I ran (as root) “./link -x all” to propagate the changes and program devices to make the scene active. Once the scene was active, I compiled the icmd program in the utilities directory. The icmd program allows you to send direct commands without the need for links. By running “./icmd xx.xx.xx ON 255”, I was able to turn on the INSTEON device with address xx.xx.xx. When the switch has been successfully turned on, a response message is returned. As a result, the electrical switch communicates its status back to my computer. The next step involved getting my cell phone to communicate with my computer. Most of today’s mobile phones are Bluetooth enabled and capable of sending and receiving text messages. I never considered using my cell phone to call into a PBX (private branch exchange) server such as Asterisk running on my computer due to the complex nature of the software involved. Despite standard Bluetooth support in the Linux Kernel, I chose not to use Bluetooth as a means of communicating with my computer from my phone due to limited range issues. Had I used Bluetooth, I would have been unable to remotely controlling electrical devices from long distances. Relying on text messaging capabilities seemed to be my best option for long distance remote control over my electrical network. In order to communicate with my computer via text messaging, I had to leverage functionality provided by Twitter.com’s free service. Twitter is a SMS portal/gateway amongst many other things. Twitter stores all text messages sent to its short code phone number (40404) in a database, and displays them on the Web at a specific URL. By polling that specific Web URL from my computer, I could detect and analyze any changes. As a result, my cell phone was able to communicate with my computer. Furthermore, communication between a cell phone and a computer can be bi-directional. My computer could communicate back to the cell phone via several methods. Most of the major cell phone service providers offer free SMS public gateways. As a result, an email can be sent to a public SMS gateway, which then forwards the contents of the email to a user’s cell phone in text message format. A list of available public SMS gateways sponsored by major service providers can be found at http://en.wikipedia.org/wiki/SMS_gateways. Alternatively, Twitter can also be used to send cell phone notification updates should a user choose to accept them.
  • 3. I only had to write a few lines of code to pull all of these technologies together so that they would work with each other. The following code is a very rough implementation that I originally used to test the feasibility of this idea. I plan on incorporating Bluetooth support as well as confirmation notifications once I get back to Duke University. Right now, I am using my cell phone to send Twitter public updates that are broadcasted out to all of my friends. This method is not secure, and spams your followers with updates about your electrical network’s condition. I recommend creating a private account for testing purposes, or better yet using Twitter’s direct messaging functionality. Finally, this code relies on the Summize.com search engine, which parses and indexes every public message sent to Twitter. I could not poll Twitter.com because of rate limiting issues. My code polls Summize’s REST API (which is simply a Web URL) every second checking to see if there has been an update. This polling method is not efficient and taxes Summize’s servers. I recommend subscribing to and parsing Twitter’s Pub Sub Jabber feed (see http://groups.google.com/group/ twitter-development-talk/web/jabber-pubsub). Below is my quick and dirty Python code that can be easily ported over to other languages: #/usr/bin/python #Copyright 2008 Justin Wickett #This program is free software: you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation, either version 3 of the License, or #(at your option) any later version. #This program is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. #You should have received a copy of the GNU General Public License #along with this program. If not, see <http://www.gnu.org/licenses/>. import feedparser, os, time #The 'feedparser' library can be installed from http://www.feedparser.org/ #TODO: Replace the username as well as the INSTEON address with the appropriate values #TODO: Also make sure that the path is correctly set in the system command to icmd's path on your local machine lastTweet = 0 #Used to keep track of the last Tweet received to make Summize queries less expensive username = quot;xxxxxxxxquot; #Twitter username who is sending the commands to control the electrical network insteonAddress = “xx.xx.xx” #INSTEON address of the device you want to turn on and off while(1): feedUrl = quot;http://summize.com/search.atom?q=from%3Aquot;+username+quot;&since_id=quot;+str(lastTweet) #Polling Summize feed = feedparser.parse(feedUrl) if len(feed['entries']) > 0 and feed['entries'][0].link.split('/')[-1] > lastTweet: if cmp(feed['entries'][0]['title'], quot;Bedroom lights onquot;) == 0: #Check for the quot;ONquot; command os.system(quot;icmd “+insteonAddress+” ON 255quot;) #Turn the lights controlled by my switch on if cmp(feed['entries'][0]['title'], quot;Bedroom lights offquot;) == 0: #Check for the quot;OFFquot; command os.system(quot;icmd “+insteonAddress+” OFF 255quot;) #Turn the lights controlled by my switch off lastTweet = feed['entries'][0].link.split('/')[-1] #Save the last Tweet so we aren't stepping over ourselves time.sleep(1) #Sleep one second, and execute code again