Home automation with Ninja Blocks

13
Home Automation and Security with NinjaBlocks Eugene Yew April 2015

Transcript of Home automation with Ninja Blocks

Home Automation and Security with NinjaBlocks

Eugene YewApril 2015

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.

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 ?

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/

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

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.

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

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.

9

Admin Web Dashboard

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.

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.

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

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