Sunteți pe pagina 1din 22

Explore (/tag/typeid/)

Create (/about/submit.jsp)

let's
Login(/account/login)
make(/contest/) | SignUp(/account/gopro?sourcea=header)
Contests
Community (/community/)

(/)

share what you make >


(/)

(/editInstructable/)

(http://www.pinterest.com/pin/create/button/?
url=http%3A%2F%2Fwww.instructables.com%2Fid%2FRaspberry
Pi
GPIO
home
automation%2F&media=http%3A%2F%2Fcdn.instructables.com%2FFYV%2FP0JN%2FH8TTNRXT%2FFYVP0JNH8TTNRXT.MEDIUM.jpg&description=Picture%20of%20Raspberry%20Pi%20GPIO%20home%20automation)

RaspberryPiGPIOhomeautomation bywillq44(/member/willq44/)

Download(/id/RaspberryPiGPIOhomeautomation/?download=pdf)
(/id/RaspberryPiGPIOhomeautomation/?ALLSTEPS)

8Steps

(/id/RaspberryPiGPIOhomeautomation/step3/Maketheboard/)
Collection

IMadeit!

Favorite

Share

(http://cdn.instructables.com/FYV/P0JN/H8TTNRXT/FYVP0JNH8TTNRXT.LARGE.jpg)

IhadheardaboutGPIOpinsontheraspberrypianddecidedtodosomethingwith
it.Andwiththeholidayscoming,wouldn'titbegreattobeabletoturnonandoff
yourlightdisplayfromtheweb!Thisisaprettysimpleprojectthatcreatesaweb
appforcontrollinglights.ItusestheRaspberryPifortheinternetconnectionanda
wirelessremotecontroltoturnonandoffthelights.Thetrickythingistoconnect
theRaspberryPiGPIOstoemulatepressingthebuttonsontheremotecontrol.

AboutThisInstructable
918,280views
511favorites

License:

willq44
(/member/willq44/)
Follow

67

(/member/willq44/)

Morebywillq44

(/id/RaspberryPiCase1)
RemovetheseadsbySigningUp(/account/gopro?
sourcea=removeads&nxtPgName=Raspberry+Pi+GPIO+home+automation&nxtPg=/id/RaspberryPiGPIOhomeautomation/)

Tags:
RaspberryPi(/tag/typeid/category
technology/keyw ordraspberrypi/)

Step1:Parts

GPIO(/tag/typeid/categorytechnology/keyw ord
gpio/)
remotecontrol(/tag/typeid/category
technology/keyw ordremotecontrol/)
lights(/tag/typeid/categorytechnology/keyw ord
lights/)

Related
Gettingtoknow
RaspberryPi(/id/Getting
toknowRaspberryPi/)
byechoalex
(/member/echoalex/)

RaspberryPixbmcIR
SensorandRemote
(/id/RaspberryPixbmcIR
SensorandRemote/)
bymisperry

StreamingMediatoyour
RaspberryPi(/id/Turning
yourRaspberryPIIntoa
WirelessMultiChannel
VoiceControlled
ElectricalOutletswith
RaspberryPi
(/id/WirelessMulti
iPhoneremotecontrolled
lamp(/id/iPhoneremote
controlledlamp/)
bySamuelLIU
(/member/SamuelLIU/)

SeeMore(/tag/typeid/?q=)

(http://cdn.instructables.com/FBI/TK0C/H8TTNRY5/FBITK0CH8TTNRY5.LARGE.jpg)

(http://cdn.instructables.com/FN6/4603/H8RVBGHR/FN64603H8RVBGHR.LARGE.jpg)

(http://cdn.instructables.com/FPZ/QYPD/H8TTNRY6/FPZQYPDH8TTNRY6.LARGE.jpg)

(http://cdn.instructables.com/FJR/EY5I/H8RVBGHQ/FJREY5IH8RVBGHQ.LARGE.jpg)

(http://cdn.instructables.com/FBC/41A3/H8RVBGHO/FBC41A3H8RVBGHO.LARGE.jpg)

Partsneeded:
RaspberryPi
(http://cdn.instructables.com/FST/3UFS/H8RVBGHP/FST3UFSH8RVBGHP.LARGE.gif)
Remotecontrolledoutlets
Ribboncable
Solder (http://cdn.instructables.com/FKX/0CMW/H8TTNRY4/FKX0CMWH8TTNRY4.LARGE.jpg)
(Notshown)
PCBboard
Resisters
Tools
Solderinggun
Dremel/Hacksaw
Screwdriver

Wirecutters
Wirestriper
Multimeter

Step2:WebServersetup

(http://cdn.instructables.com/F1H/QAMO/H8TTNS0E/F1HQAMOH8TTNS0E.LARGE.jpg)

(http://cdn.instructables.com/FZT/Z6TG/H8RK8Q2Y/FZTZ6TGH8RK8Q2Y.LARGE.jpg)

IchoosetheWeb2Py(http://web2py.com)frameworkforitseaseofinstallationand
use.Installationisverysimple.Followtheinstructions(repeatedhere)at
http://web2py.com/books/default/chapter/29/13#Onestepproductiondeployment
(http://web2py.com/books/default/chapter/29/13#Onestepproductiondeployment)
ConnectyourRPItotheinternet.LogontoyourRPIandenterthefollowingatthe
commandline:
wgethttp://web2py.googlecode.com/hg/scripts/setupweb2pyubuntu.sh
chmod+xsetupweb2pyubuntu.sh
sudo./setupweb2pyubuntu.sh
Followtheinstructionsonthescreen.Thisstepwilltakeseveralminutesandyou

mayseesomeerrorsintheprocess,butitseemstoworkanyway.Themail
configurationisnotreallyimportant,youcanjustsetitasnoconfiguration.
Whenaskedaboutyourlocationandsuch,thevaluesaren'tcritical,doyourbest.
Themostimportantthingistoremembertheadminpasswordthatyou
selectduringtheinstallation
Oncetheinstallationiscompleteyoushouldbeabletoconnecttoweb2pyserver
fromyourcomputer.Inyourcomputer'sbrowserentertheaddresstoyour
RaspberryPi.Itisveryimportantthatyouusedhttpswhenconnectingtothe
web2pyserver.YourURLwilllooksomethinglike:
https://192.168.2.179/orhttps://rasberrypi

Youmayseeasecuritywarninginyourbrowser.That'sOK,youcansafely
ignorethiswarning.Ifeverythingworkedcorrectly,youshouldnowseethe
welcomepageforWeb2Py.

Previous

Next(/id/RaspberryPiGPIOhomeautomation/step3/Maketheboard/)
ViewAllSteps(/id/RaspberryPiGPIOhomeautomation/?ALLSTEPS)

Wehaveabenicecommentpolicy.
Pleasebepositiveandconstructive.

140of
88

IMadeit!

AddImages

MakeComment

Next(http://www.instructables.com/id/RaspberryPiGPIOhomeautomation/?
&sort=ACTIVE&limit=40&offset=40#DISCUSS)

sdfsdfsdfsdfsdfaaaaz(/member/sdfsdfsdfsdfsdfaaaaz/)

19daysago

Reply

Ihavearemotecontrolerwherethebutton"pullsdown"themicrcontrollerlineto
(/member/sdfsdfsdfsdfsdfaaaaz/)
thegroundwhenitispressed(oppositetoyourcaseofpullsup).

HowcanIdothewiring?

Snellingkorey(/member/Snellingkorey/)

27daysago

Reply

greatidea,canyouwireupthekettleandwashingmachineaswell?
(/member/Snellingkorey/)

realjohnherlosky(/member/realjohnherlosky/) Snellingkorey
23daysago

don'tbesillySnellingkorey,thatwouldtakeatleast2
(/member/realjohnherlosky/)
RaspberrysandaStrawberry!

ManuelA3(/member/ManuelA3/)

3monthsago

Reply

Reply

Inmycase,Installingweb2pyonaraspberryrunningraspbian,Ihadtomodifya
(/member/ManuelA3/)
lineonsetupweb2pyubuntu.sh

From:
sudoa2ensitedefault
To:
sudoa2ensitedefault.conf
Also,theauthtypesonthedefault.confwereonapache2.4format,whereasthe
setupscriptinstalledmeapache2.2soIhadtomakechangesaccordingto
http://httpd.apache.org/docs/2.4/upgrading.html#ru...
(http://httpd.apache.org/docs/2.4/upgrading.html#runtime)

gago.babic.3(/member/gago.babic.3/) ManuelA3

26daysago

Reply

iamrunningraspbian.canyousimplygiveus
(/member/gago.babic.3/)

setupweb2pyubuntu.shbecauseiamhavingproblemsetupapache2.2
to2.4.pleaseuploadesomewhereoremailmemejlgago@gmail.com

xpark(/member/xpark/)

29daysago

Reply

Canutellmeexactlyhowicanaccessthisserverfromanoutsidenetwork?
(/member/xpark/)

Thanks

VisionMissionGo(/member/VisionMissionGo/)

1monthago

Reply

IfIwantedtoupscalethistomorethanjustthreeswitches,howwouldIdothat?
(/member/VisionMissionGo/)

davidbarcomb(/member/davidbarcomb/)

2monthsago

Greatinstructable,detailedandwellexplained.Keepupthegoodwork
(/member/davidbarcomb/)

Reply

lzkill(/member/lzkill/)

3monthsago

Reply

Hipals!
(/member/lzkill/)

TheresistorusedonthisprojectaredependentontheRFcontroller?Whywere
thesepicked?

KentR2(/member/KentR2/)

3monthsago

Reply

Howcouldisetthisuptorunlocally,thatisrunningtheprogramdirectlyonthepi
(/member/KentR2/)
withoutinternetacess?

aswinmp(/member/aswinmp/)

3monthsago

Reply

MyprojectishomeautomationandCCTV.Afterdoingthecctvfunctionusingpi,
(/member/aswinmp/)
wedidtheautomationpart.Uptostep7,everythingwentperfectly.Afterthat,I
cannotaccesspiusingsshorremotedesktop.AndIcannotaccesstheweb
page.
Whattodo?Pleasehelpme!

john.turley.568(/member/john.turley.568/)

4monthsago

Reply

Ihadtroubleinstallingweb2pybutIthinkIgotitsolvedbyusingthisscriptinstead:
(/member/john.turley.568/)

web2py.googlecode.com/hg/scripts/setupweb2pynginxuwsgiubuntu.sh
(http://web2py.googlecode.com/hg/scripts/setupweb2pynginxuwsgiubuntu.sh)
andthenrunningthisatstartup:
sudouwsgimasterdieontermemperor/etc/uwsgilogto
/var/log/uwsgi/uwsgi.log&

OliverL(/member/OliverL/)

5monthsago

Reply

Hello!
(/member/OliverL/)

Ihavesslproblem:Hibakd:ERR_SSL_PROTOCOL_ERROR.
IuseChromeandExplorer,theproblemisinboth.
Ihavenoidea:(

RobertCrabb1(/member/RobertCrabb1/)

5monthsago

Reply

5monthsago

Reply

5monthsago

Reply

NiceJob!!
(/member/RobertCrabb1/)

Verydetailedguide.

GeorgeB1(/member/GeorgeB1/)

wheredoyoudownloadthehomelightspackage
(/member/GeorgeB1/)

rohitgoudponnam(/member/rohitgoudponnam/)

Himatey,i'mfromAustraliaandineedthismodelforademo.canyoupleaselet
(/member/rohitgoudponnam/)
meknowifitispossibleforyoutopostmeaworkingmodel(wholekit)andguide

metomakeitwork.Please,respondtothismessageonmyemail
"rohitgoudponnam@gmail.com"ismygmailid.
ThanksandRegards

adam.skorpik.9(/member/adam.skorpik.9/)

5monthsago

Hi.
(/member/adam.skorpik.9/)

Wealreadydevelopedpieceofhardwareforhomecontrol.Therearerelays,
digitalinputs,1wire,EEPROM,010V.....

Reply

checkindiegogoproject:
http://igg.me/at/unipi/x/8241961(http://igg.me/at/unipi/x/8241961)

(http://cdn.instructables.com/FLM/404G/HY7T3R4D/FLM404GHY7T3R4D.LARGE.jpg)

(http://cdn.instructables.com/FUH/QPEY/HY7T3R62/FUHQPEYHY7T3R62.LARGE.jpg)

Samginoya(/member/Samginoya/)

5monthsago

hy,
(/member/Samginoya/)

weniwritethisinpiterminal:
sudopython/home/www
data/web2py/applications/Home_Lights/modules/GPIOServer.py
itshowme:
python:can'topenfile'/home/www
data/web2py/applications/Home_Lights/modules/GPIOServer.py':
[Errno2]Nosuchfileordirectory

Reply

BennyTC(/member/BennyTC/)

6monthsago

Reply

6monthsago

Reply

thatisatypo,delaythereis2seconds:P
(/member/BennyTC/)

BennyTC(/member/BennyTC/)

Awesomeproject!
(/member/BennyTC/)
Iintendtouseittocontroladoorbuzzer,soIadded5seconddelay.
Ihadtochangeswaptheoutputfrom"1"to"0",becauseIamusingabrandless
8relayboardwhichoperatesasActiveLOW(relaysareturnedonwhenoutputis
"0").
Inthehopeitisofhelptoanyone,thisiswhatIdid:
changedtheGPIOClient.pyfile'sline13tothis:
ON=chr(0)
andaddedthefollowinglinestotheGPIOServer.pyfile
line3:
importtime
line12:
SleepTimeL=2
line23:(thisisafterGPIO.output(pin,val))
time.sleep(SleepTimeL)

cartiman(/member/cartiman/)

Iusetheraspberrypifromchina(redcolor),whatcan?
(/member/cartiman/)

Thanks

7monthsago

Reply

sadhvi(/member/sadhvi/)

9monthsago

Reply

Hi,
(/member/sadhvi/)

weareinterestedindoingthehomelightingautomationwhichtakescareofthe
centrallightingsystem.so,couldyoupleasesuggesthowtoproceedwiththe
project.
emailid:nangunoorilaxmijoythi1@gmail.com
Regards.

losgat(/member/losgat/)

10monthsago

Reply

Hihaveitallsetupandworkingasexpectedbutisthereanywaytochangethe
(/member/losgat/)
outputforrelaysandnotsinglebuttonpressapplications(usingarelaythatneed
tobepoweredconstantly?

sahildhanda(/member/sahildhanda/)

10monthsago

Reply

Traceback(mostrecentcalllast):
(/member/sahildhanda/)

File"/home/www
data/web2py/applications/Home_Lights/modules/GPIOServer.py",line29,in
<module>
serversock.bind(ADDR)
File"/usr/lib/python2.7/socket.py",line224,inmeth
returngetattr(self._sock,name)(*args)
socket.error:[Errno99]Cannotassignrequestedaddress
root@raspberrypi:~/RPi.GPIO0.4.2a#
//WhatshouldIdowiththiserror??PleaseHelp..:)

gaelreinaudi(/member/gaelreinaudi/)madeit!

11monthsago

Reply

(/member/gaelreinaudi/)

coolintroduction!

(http://cdn.instructables.com/FEG/52R4/HS9TBG6V/FEG52R4HS9TBG6V.LARGE.jpg)

peecee78(/member/peecee78/)

12monthsago

Reply

Heydoesanyonemanagedtoadoptthiswebinterfacetoworkwith8channel
(/member/peecee78/)
relay?

IwireditbutonrelayalligetisjustablinkofLEDitrytoeditthesettingssame
result...
Pleasehelp

sivaraaj(/member/sivaraaj/) peecee78

11monthsago

Reply

ithinkinyourcasetheinputvoltageisnotenoughfortherelayboardso
(/member/sivaraaj/)
doublecheckyourinputvolt.

clintmichels33(/member/clintmichels33/)

(/member/clintmichels33/)

11monthsago

Reply

Sweeet!!Everythingworksexceptihavetobeathomeconnectedtomywififoritto
work.isthatsupposedtobethatway?

amrnablus(/member/amrnablus/)

11monthsago

Reply

Ihaveaquestion.
(/member/amrnablus/)

IfiwanttoautomatelightsorAC,shouldthisdevicebecontrollableviaaremote
controllerinthefirstplaceorit'spossibletodoitwithanyhardware.

icemeth(/member/icemeth/)

1yearago

Reply

ihaveaprobleminsettinguptheweb2pysetup.whenitypesudo./setup
(/member/icemeth/)
web2pyubuntu.shithasanderroranditsayscannotfindfiledestinationthoughi

havedownloadedthesetupfile.andicantupdatemyraspiitalsohasanerror.is
itbecauseihaveadynamicinternetconnection??plsreplyineedyour
help..thanks

hughjeremy(/member/hughjeremy/)

1yearago

Reply

WhenIconnectupthewires,itactsasifthebuttonisbeinghelddown,andsoit
can'tdefinewhichbuttonisbeingpressedwhenmultiplebuttonsareconnected.
(/member/hughjeremy/)
LongstoryshortnomatterifIturnthemonoroff,itdoesn'tmakeadifference!
Helpwouldbesoappreciated!
Thanks,
Hugh

ChronosWolf(/member/ChronosWolf/)

1yearago

Reply

Awesometutorialandproject!Can'twaittofullytryitout.I'mhavingoneissue
though.Idon'thavealloftheproperhardwareyet(Ihaveeverythingbutthe
(/member/ChronosWolf/)

remoteoutletsandacutribboncable).ButmyproblemisonceItrytostartthe
GPIOServer.py,itindefinitelysays"waitingforconnection...".IsthisbecauseI
havenothingconnectedtotheGPIOpins?Iwashopingtorunoutlaterandget
everythingelseIneed,butIfiguredIwouldseteverythingsoftwarerelatedupfirst.
I'mhopingthisistheissue,andnotthefactthatmypihatesme,haha.
Anyways,thanksinadvancefortheresponseand,again,awesomeinstructable.
Chronos

andyn500(/member/andyn500/)

1yearago

Reply

1yearago

Reply

sorrymanemailisa.nolan@pss.ie
(/member/andyn500/)

Regards

andyn500(/member/andyn500/)

HiIamveryinterestedinyourprojectitsbrilliant.Iamnewtocomputersandhave
verylittleunderstandingofelectronics.Isthereanychanceoffurtherinstructions
(/member/andyn500/)
forthisegPCBboardandwhatresistorsyouusedifpossible.furtherinstructions
diagramsetc.
Wouldbeveryhelpful

Smarty4531(/member/Smarty4531/)

1yearago

Reply

hello,awesomeinstructionguideeverythingisworkingexceptforthepicturesfor
thebuttons.whenigotothewebpagetheynevershownup.imtalkingaboutthe
(/member/Smarty4531/)
powerbottonsplzhelpthx

(http://cdn.instructables.com/F7X/VN1P/HO23A4Y4/F7XVN1PHO23A4Y4.LARGE.jpg)

(/member/%D9%85%D8%B4%D9%88%D9%83%D8%B1%D9%8A/)
1yearago

Reply

jets_fi(/member/jets_fi/)

Reply

sir,ineedyourhelp,cangivemealldetailaboutthisproject?
codeoranythingaboutthis..tqsir
(/member/%D9%85%D8%B4%D9%88%D9%83%D8%B1%D9%8A/)
s_roll88@yahoo.com

1yearago

Hasanyonetrieddoingthiswithremotesthatarepoweredby3vbattery?You
couldpowertheremotewithPithen,right?
(/member/jets_fi/)
Andnottoforgetthankingwillq44again!

AvinashBabu(/member/Avinash+Babu/)

1yearago

Reply

sir,,iamstudyingb.tech(computers)....iwanttodomyfinalprojecton
RASPBERRYPI..canyougivethedataandcodeabout"RaspberryPiGPIO
(/member/Avinash+Babu/)
homeautomation"...ifyougiveittomethenitwouldbehelpfultomyproject....
myemailidis:avinashcme@gmail.com

_Yvan_(/member/_Yvan_/)

PreviousNext
PreviewYourComment
(/member/_Yvan_/)

1yearago

Reply

Hi,thanksforthisverycomprehensivetutorial.Thisinstructablefitsnicelyintothe
kindofstuffIwanttodoasahobbyist.ItallworkswelluntillIpress"database
administration"UnderModel,Ithenget:InternalerrorTicketissued:
Home_Lights/192.168.1.2.20130608.064414.277666f198d442848792
601a9056bee4Theticketreads:type'exceptions.TypeError'>define_tables()
gotanunexpectedkeywordargument'signature47
auth.define_tables(username=False,signature=False)orclickingonothertabs
stuffasTraceback(mostrecentcalllast):File
"/usr/lib/pymodules/python2.7/gluon/restricted.py",line205,inrestrictedexec
ccodeinenvironmentFile
"/home/pi/web2py/applications/Home_Lights/models/db.py",line47,in
auth.define_tables(username=False,signature=False)TypeError:
define_tables()gotanunexpectedkeywordargument'signature'.tryingtogetto
:8000/Home_Lights/default/indexbringsupthesameproblem.Everyerror
messagehingesaroundunexpectedkeywordargument'signature'.Doyouthink
itmightbedotomyusingdifferentversionsofprogramsorsomethinglikethis.I
knowpythonistouchyaboutthis:root@raspberrypi:~#pythonPython2.7.3
(default,Jan132013,11:20:46)[GCC4.6.3]onlinux2under
fish://root@raspberrypi/etc/thereare3pythonfolders,python2.7,python3,
python3.2Pitty,causethishappenstobeexactlywhatIwaslookingfor,and
nowherecanIfindsuchathoroughtutorial.Iwishyoucanmakeasuggestionto
makemegoon.ThanksforsharinginanycaseYvan

freakqnc(/member/freakqnc/)

1yearago

Reply

willq44oranyonehasanypointeronhowtochangethebehaviorofthebuttonsto
turnthemintoarelay"lick>ON,clickagain>OFF"insteadofhavingthemsend
(/member/freakqnc/)
apulsetosimulatethepushofthebuttonontheremoteasitwasneededinthis
project(bueller...bueller...D)?Thanks!

140of
88

Next(http://www.instructables.com/id/RaspberryPiGPIOhomeautomation/?
&sort=ACTIVE&limit=40&offset=40#DISCUSS)

Wehaveabenicecommentpolicy.
Pleasebepositiveandconstructive.

IMadeit!

AboutUs

AddImages

MakeComment

FindUs

WhoWeAre(/about/)

Facebook(http://www.facebook.com/instructables)

Advertise(/advertise/)

Youtube(http://www.youtube.com/user/instructablestv)

Contact(/about/contact.jsp)

Twitter(http://www.twitter.com/instructables)

Jobs(/community/PositionsavailableatInstructables/)
Help(/id/howtowriteagreatinstructable/)

Pinterest(http://www.pinterest.com/instructables)
Google+(https://plus.google.com/+instructables)
Tumblr(http://instructables.tumblr.com)

Join our newsletter:

enteremail

Join!

TermsofService(http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21959721) |
PrivacyStatement(http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21292079) |
LegalNotices&Trademarks(http://usa.autodesk.com/legalnoticestrademarks/) | MobileSite(http://m.instructables.com)
(http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)

English

2014Autodesk,Inc.
Resources

Mobile

ForTeachers(/teachers/)

DownloadournewappsforiOS,

ArtistsinResidence(http://www.autodesk.com/artistinresidence/home)

AndroidandWindows8!

GiftProAccount(/account/give?sourcea=footer)
Forums(/community/)
Answers(/tag/typequestion/?sort=RECENT)
Sitemap(/sitemap/)

Android
(https://play.google.com/store/apps/details?
id=com.adsk.instructables)
iOS
(https://itunes.apple.com/app/instructables/id586765571)
Windows
(http://apps.microsoft.com/windows/en
us/app/7afc8194c771441a9590
54250d6a8300)

GoProToday(/account/gopro?sourcea=footer)

We'reHiring!(/community/PositionsavailableatInstructables/)

S-ar putea să vă placă și