“Smart Home” my final year MCA project based on Internet of things . The project came from some project seen on Raspberry Pi Website .
The Project is divided into 3 parts
Nodes communicate with Server
Server Mosquitto which uses MQTT Protocol
Android App , which communicates with server
Each node can have the following functionalities.
Turn ON /OFF the multiple devices.
Report the current status of the device.
Measure the climatic conditions.
Detect and report user presence.
All the above can be obtained using arduino and needed sensors but communicating with server can be very difficult so better is go with a microcontroller with supports both processor and wifi , i chose esp8266 read more about esp8266 here .
MQTT Protocol is used to communicate between nodes , server , android app
openAfter the fix for Realtek usb ethernet card for openwrt to run on raspberry pi 2,Â I started my new project,Â Load balancing router.
The working is quite simple, install and configure MWAN3 butÂ I can’t install from repo since I got the source and compiled it with the patch for my usb ethernet card,Â purchased a few more of those from eBay and combined to form 2 WANs and Â 2 LANs.
WANÂ uses 2 usb ethernet adapters and one configured to dial my PPPoE fiber connectionÂ and another to cable modem, so that I could combine both toÂ get load balancing.
One lan port is same as the built in of Raspberry pi and another usb adapter.
One lan port is configured to use for my private network which contains few laptops,Â a NAS and few cell phones via Dlink DIR850L 1200 dual band AC router .
Another one is to a wireless AP dedicated to guest,Â which I keep isolated from my private network.
Since you are much experienced i am not mentioning how to install OS to a memory card for Raspberry pi . I have already compiled a version of OpenWrt for raspberry pi with MWAN3Â ,Â Firmware for USB adapterÂ QHM8106 USB 2.0 Lan AdapterÂ , drivers .
It works on Ethernet adapters with following firmware
AX88772B ASIX Elec. Corp
Â RTL8152 Realtek Semiconductor Corp
Few other things likeÂ Freifunk [for splash screens on wifi connect ] , VnStat , QoS etc are also included in this build.
Set the basics such as password Â and enable SSH ,
Set up the interfacesÂ
Here we are configuring eth0 as main LAN , Â eth1 , eth2 as WAN , WAN2 and eth3 as GUEST
To set up the interface to go Network -> Interfaces
Adding new interface
Click on Add new Interface
Enter “Name of the new interface” as Â WAN for Â interface eth1 , WAN2 for eth2 and Guest for eth3 . [ WAN , WAN2 , GUEST are to entered separately corresponding to interface selectionÂ Â ]
“Protocol of the new interface” should be static for GUEST Â . For WAN , WAN2 it should correspond to connections you have, in my case it was PPPoE for WAN and DHCP for WAN2 since i have a Fiber GPON device and an ordinary cable modem with WiFi .
Adding WAN / WAN2
After clicking submit button on the next window enter the details of the connection such as username and password if required , if the connection type is dhcp there is nothing to do here , go to next step.
Next step is to assign “Use gateway metric” 10 for WAN and 20 for WAN2 . Go to Advanced settings and add gateway matric
Now we have to go to the firewall settings tab and and it to WAN zone
Save and Apply
Repeat the above steps for the WAN2 also.
Adding GUEST interfaceÂ
The same way add an interface , name it as guest and set the protocol as static , submit
Step 1 : Adding Guest
On the Next window Â Set IP address [ not the same as LAN uses ] Â I selected 192.168.100.1 Â and the select subnet mask as 255.255.255.0 .
Scroll bottom to DHCP server section , got Advanced and tick “Dynamic DHCP”
Next is to assign it to a new Firewall zone called Guest .Â Go to FirewallÂ setting on the top .
Save and Apply
Configuring Interfaces is now complete .
Setting up firewall
InÂ order to allow guest to internet we need to add one rule go to Network – > FirewallÂ scroll down to Zones and Click AddÂ , use the settings from below image.
Save and Apply
Now connect all cables and check internet connectivity through LAN and GUEST ports . If all working move to next step .
We are using MWAN3 which is pre installed to the image file given above .
Go to Network -> Load Balancing Â
You can seeÂ Live status as of interfaces .
Go to Configuration and Â click on edit against WAN2
Select Enabled to Yes
Save and Apply
Now you will be able to use both connections Â . Wiki Article on Load BalancingÂ
UseÂ MWAN Member Configuration to fine tune settings .
To test it download a torrent since normal web connection’s speed can’t be increased since it should be done using same IP . Â Please read below reference material to know how to configure MWAN3 for your best performance .
The Internet of Things (IoT) is defined in many different ways, and it encompasses many aspects of life from connected homes and cities to connected cars and roads, roads to devices that track an individual’s behavior and use the data collected for push services. Some mention one trillion Internet connected devices by 2025 and define mobile phones as the eyes and ears of the applications connecting all of those connected things. By these internet of things billions objects can communicate over worldwide over a public, private internet protocol network in 2010, the number of everyday physical objects and devices connected to the Internet was around 12.5 billion. Smart cities, Smart cars, Public safety, Smart Industries and Environmental Protection has been given the high intention for future protection by IoT Ecosystem. For the development the government of Europe, Asia and America has considered the Internet of Things has area innovation and growth. Many visionaries have seized on the phrase Internet of Things to refer to the general idea of things, especially everyday objects, that are readable, recognizable, locatable, addressable, and/or controllable via the Internet, irrespective of the communication means (whether via RFID, wireless LAN, wide- area networks, or other means).Radio Frequency Identification (RFID) and sensor network technologies will rise to meet this new challenge, in which information and communication systems are invisibly embedded in the environment around us.
This results in the generation of enormous amounts of data which have to be stored, processed and presented in a seamless, efficient, and easily interpretable form. This model will consist of services that are commodities and delivered in a manner similar to traditional commodities. Due to internet of things hospitals are shifting to remote self-monitoring for patients. Due self-monitoring it gives the patient greater freedom and independence for their health and free the equipment for emergency propose for patients.
Raspberry Pi 2 is the Latest Version of the Raspberry pi family.
Got it Delivered from Crazy Pi On 10th Feb 2014, shipping was done very fast by them. Buy From Here : Link
The boot time was pretty fast , almost 7 seconds . It is equipped with a 900MHz quad-core Broadcom BCM2836 CPU with 1GB DDR2 RAM with makes the whole thing run Fast . Its claimed that its 6 time faster than the previous one. It have 4 USB ports as the Previous version (B+) have and 10/100T Base Ethernet. Another happy news is Windows recently told that the are gonna provide Windows 10 for Raspberry pi for FREE .
For Wifi connection the same settings as previous versions of the pi can be used, Ubuntu version for Raspberry Pi is also released and can be downloaded form Raspberry Pi website .
2. Configure DHCP. Edit the file /etc/udhcpd.conf and configure it like this:
start 192.168.42.2 # This is the range of IPs that the hostspot will give to client devices.
interface eth0 # The device uDHCP listens on.
opt dns 188.8.131.52 184.108.40.206 # The DNS servers client devices will use.
opt subnet 255.255.255.0
opt router 192.168.42.1 # The Pi's IP address on wlan0 which we will set up shortly.
opt lease 864000 # 10 day DHCP lease time in seconds
Edit the file /etc/default/udhcpd and change the line:
You will need to give the Pi a static IP address with the following command:
sudo ifconfig eth0 192.168.42.1
To set this up automatically on boot, edit the file /etc/network/interfaces and replace the line “iface eth0 inet dhcp” to:
The Raspberry Pi Model A+ is the perfect board for the minimalist Pi fan. This low-cost Pi uses the same processor as the model B+, but does away with the Ethernet jack and three of the USB Ports. This makes it lower power, less expensive and much lighter & smaller! It’s still compatible with all Pi operating systems and software, and has the exact same 40 pin GPIO connector and camera/display sockets, so any HATs or Pi Plates or other things that plug into the model B+ will work just the same.
It also has the same HDMI, sound/composite connector and micro USB connector for power.
Unlike the Raspberry Model B+, there’s only one USB port and no ethernet jack but it’s also significantly smaller at 65mm x 56mm if you don’t include overhang from the connectors. Also, there is only 256 MB of RAM onboard instead of 512, so if you have a RAM-intensive application you may need to stick with the B+
Technical Specs :
Dimensions: 65mm x 56mm / 2.5″ x 2.25″
Processor: ARM 700Mhz CPU
USB: One USB 2.0 Port – Keeping it compact means minifying the footprint as much as possible
Video Output: HDMI and Composite
Sound: L/R Stereo (via 3.5mm 4 Pole Cable)
Memory: 256MB Ram
Operating System: Uses microSD card slot to load O/S
Digital interfaces: 2 onboard ribbon slots for Camera and Display
GPIO: 40 GPIO pins, backwards compatible to B board