Home Automation Using RPI

3,706 views

Published on

Home Automation Using Raspberry PI

Published in: Technology
0 Comments
8 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,706
On SlideShare
0
From Embeds
0
Number of Embeds
20
Actions
Shares
0
Downloads
374
Comments
0
Likes
8
Embeds 0
No embeds

No notes for slide

Home Automation Using RPI

  1. 1. Bülent ÖZHORASAN Ankara, 22 May 2014
  2. 2. Caution : Be Careful in Handling Mains Voltage!
  3. 3.  Welcome  Open Source Hardware Projects Rpi, Arduino  Raspberry Pi Features  Possible Areas of Use  Remote Connecting to Raspberry Pi  Java and Raspberry Pi: Open JDK, Oracle JDK
  4. 4.  Installing Tomcat  Installing no-ip.org Client and Internet Access  Prime Faces Application Deployed in Tomcat in Raspberry Pi  Source Code Walkthrough  Remote Deploying war file  Hardware interfacing Digital Out  Hardware interfacing Analog In  Fritzing Tool  Demo
  5. 5. Beagle Bone (Texas Instruments) Korean Firm, former game platform SOC: Sytem on a Chip
  6. 6.  Single Board Computer  Broadcom BCM2835 system on a chip (SoC)  ARM1176JZF-S 700 Mhz processor  VideoCore IV GPU  512 MB RAM  SD card for booting and persistent storage.  Linux Operating system  Low Cost  Low Power  Python is the native programming language C,Java,Perl available
  7. 7.  Hobbies  Educational Purposes  Low Cost File/Media Server  Low Cost Web Server for small applications  Fast Prototyping (In Development Stage)  Even build a home brew supercomputer! Check  Kickstarter.com  Make: Magazine  Maker faires
  8. 8.  SSH  Putty and WinSCP  Without router: NO NEED for a cross-over cable. RPi LAN chip is smart enough to reconfigure itself for direct network connections.  Routerless Connection: dhcpsrv2.4  Mobile Connection: Juice SSH Android
  9. 9.  Open JDK,Oracle JDK  Oracle JVM with ARM processor support is available  Comes in Raspberry Pi already installed  Pi4J Lib
  10. 10.  Installing tomcat Download tomcat package and unzip it to /usr/lib/apache-tomcat- 7.0.47 tar xzf apache-tomcat-7.0.28.tar.gz cd apache-tomcat-7.0.28/conf vim tomcat-users.xml  Add a user to the authorization file Tomcat-users.xml file directly below <tomcat-users> add <user username="pi" password="raspberry" roles="manager- gui"/>  Start Tomcat sudo sh startup.sh
  11. 11.  Free Dynamic IP Adress  Download no-ip client wget http://www.no-ip.com/client/linux/noip-duc- linux.tar.gz  Run client sudo /usr/local/bin/noip2  Automatic startup Create script in /etc/init.d
  12. 12. Can be used from Mobile Clients,too
  13. 13.  IoC ◦ GPIOControllerFactory  Testability ◦ Apache Commons PropertiesConfiguration ◦ Parameters.properties ◦ MockGpioController and MockGpioPinDigitalOutput
  14. 14. Script using SSH command line tools AutoDeploy.bat: "d:programsputtypscp" -batch -pw raspberry C:UsersRootDesktopPrime01.war pi@192.168.1.2:/home/pi "d:programsputtyplink" -batch -ssh -2 -l pi -pw raspberry -m "deploy.cmd" 192.168.1.2 Deploy.cmd: echo Shutting down... sudo /usr/lib/apache-tomcat-7.0.47/bin/shutdown.sh echo Shut down... sudo rm -r /usr/lib/apache-tomcat-7.0.47/webapps/Prime01 sudo cp Prime01.war /usr/lib/apache-tomcat-7.0.47/webapps echo Starting ... sudo /usr/lib/apache-tomcat-7.0.47/bin/startup.sh echo Started...
  15. 15.  Digital Outputs & Relay Driving  Draw no more than 3mA from GPIO ports  A small relay will draw between 50-100mA from 5V power line.
  16. 16. Analog Input & Ambient Temperature Sampling MCP3208 8-Channel 12-Bit A/D Converters LM35 Precision Centigrade Temperature Sensor Bit banged SPI (Serial Peripheral Interface) interface of the A/D converter chip programmatically Rpi, LM35 and MCP3208 Connections
  17. 17.  Testing other app servers namely Nginx  Scalable i2c and SPI interfaces  IoT namely Dweet.IO  SQLite
  18. 18.  http://www.raspberrypi.org  http://www.arduino.cc/  http://www.dhcpserver.de/  http://learn.adafruit.com/reading-a-analog-in-and-controlling-audiovolume-with-the-raspberry-pi  http://pi4j.com/  http://www.susa.net/wordpress/2012/06/raspberry-pi-relay-using-gpio/  Raspberry Pi Measurement Electronics: hardware and software [Kindle Edition]  http://www.zdnet.com/build-your-own-supercomputer-out-of-raspberry-pi-boards-7000015831/  http://fritzing.org/home/  http://www.adafruit.com
  19. 19.  Thank you for your attention

×