Top Banner
Home Automation and Security with NinjaBlocks Eugene Yew April 2015
13
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Home automation with Ninja Blocks

Home Automation and Security with NinjaBlocks

Eugene YewApril 2015

Page 2: Home automation with Ninja Blocks

2

Situation

I was looking for :

• a reasonably priced home automation solution,

• a platform that was modular and worked with a range of devices,

• a solution that was extensible in its capabilities (not a one trick pony) and allowed it to be built upon,

• something that would put my Raspberry Pi to good use.

Page 3: Home automation with Ninja Blocks

3

Complication

• I did not want to re-wire my house so solution had to be wireless friendly.

• I wanted a solution that was mobile friendly – ie allowed me to control components of my home via my mobile

• Solution had to not be restricted to mobile use, for users that did not care for mobility.

I did not want to spend a lot.

Question

What would fit my requirements ?

Page 4: Home automation with Ninja Blocks

4

Answer I went with:

• A kickstarter funded project from a Sydney company based in Redfern Technology Park.

• Highlighted in Tech Blogs, eg http://lifehacker.com/make-your-own-cheap-home-automation-in-10-minutes-with-1468650432/all

• “Ninja Blocks are tiny cloud enabled computers that can sense their environment by receiving input from a variety of sensors & can affect their surroundings by controlling lights, power sockets, and other actuators.”

Ninja Blocks - http://ninjablocks.com/

Page 5: Home automation with Ninja Blocks

5

Getting Ninja BlocksOption 1: USD199 Kit

Starter Kit with:• 1x Ninja Block (BeagleBone Black Linux computer with an Arduino).• 1x Wireless motion sensor.• 1x Wireless door/window contact sensor.• 1x Wireless button.• 1x Wireless temperature and humidity sensor.• 1x Ethernet Cable.• 1x 5VDC 3 Amp Power supply • 1x Temperature Probe

http://ninjablocks.com/collections/ninja-blocks/products/ninja-blocks-kit

Page 6: Home automation with Ninja Blocks

6

Getting Ninja BlocksOption 2: USD 49 Add on to Raspberry Pi

For those that already have a Raspberry Pi, the Ninja Pi Crust is an Arduino-compatible board that sits on top of the Raspberry Pi and has 433MHz transceivers.

This is the option I went with.

Page 7: Home automation with Ninja Blocks

7

My Set UpNinjaBlocks

Cloud

External Cloud Services:• Twitter• SMS (Twillio)• Dropbox• Email• Google Drive• Facebook

433MHz Frequency

Socket Actuators

Motion Sensors

Door and Window Sensors

USB Webcam

IP Cam on Android

Mobile Apps for Remote Control

Alarm Kit

REST based APIs

Page 8: Home automation with Ninja Blocks

8

Rules for Home Automation

• Using drag and drop, no coding.

• Some example rules I’ve set up:

• “When the front door is opened, send me an SMS, take a snapshot with camera, send to my Gmail, upload to Dropbox”

• “When motion is detected by PIR sensor, take snapshot and upload to Dropbox.”

• “Turn on Coffee Maker and power board for TV every morning at specific time.”

• “Turn on stair lights if motion detected in between specific time”

You can create your own rules based on events that occur.

Page 9: Home automation with Ninja Blocks

9

Admin Web Dashboard

Page 10: Home automation with Ninja Blocks

10

Every sensor & actuator provides REST enabled APISo I built my own remote app and wrapped with PhoneGap

To remotely control sockets

To remotely view camera feed

To remotely turn rules on or off.

Page 11: Home automation with Ninja Blocks

11

Android Wear interaction

• Tasker can be used to make HTTP POSTs to the APIs.

• AutoWear provides Android Wear extension to issue the same commands from Android Wear using custom screens or voice.

• Example of Android Wear turning on coffee machine with actuator.

Page 12: Home automation with Ninja Blocks

12

My Bill of Materials

• 1 x PIR sensor - $8 each from eBay

• 3 x Door Sensors - $4 each from eBay

• 2 x power socket actuators with remote - $30 for pack of 3 from Jaycar

• 1 Logitech C110 USB webcam connected to Raspberry Pi - $9

• 1 x Swann Security Wireless Alarm Kit with 3 door sensors, 3 PIR sensors, 2 remotes - $85 from Dick Smith

• Full list of crowd sourced compatible devices on wiki.ninjablocks.com

Page 13: Home automation with Ninja Blocks

13

Lessons Learnt / Current shortcomings

• Not as much support for home automation devices like in-wall switches, locks compared to solutions based on z-wave.

• Too many devices on 433Mhz frequency can lead to sometimes patchy results (e.g. delayed actions).

• No ability to detect current state of actuators – can only trigger on or off states.

• Cloud based solution and reliant on Ninjablocks’ uptimes.

• Alarm system needs to be secured to prevent alarm being able to be disabled by removing power.

• Small engineering team and reliant on crowd sourcing support. Focus has been more on their next Kickstarter project, Ninja Sphere