Robots for home automation – The Mint

The Mint

While visiting Best Buy one day we noticed they had a sale on in the vacuum cleaner area. It was here I spotted an Evolution Robotics Mint for sale (the box had been damaged).

Since the price had been reduced by a a decent amount (it is normally around $240.00 USD) we decided to purchase it and give it a try.

The Mint is a robotic floor sweeping and washing device that uses either Swiffer pads or Microfiber cleaning clothes. You hook the pad up to the front of the device, and using a North Star GPS system the robot will then navigate around your floor cleaning as it goes.

There are two cleaning options to choose from, either dry or wet (to mop the floor). These can be selected via button on the top of the device.

Mint floor sweeper

Mint floor sweeper

The robot has sensors built in as well so that when it reaches a ledge it knows there is a drop and pulls back.

The Mint comes with a rechargeable battery and wall wart so you simply plug it into the wall when finished so it is charged and ready for your next use.

You can see an example here including the device specs on Amazon:

http://www.amazon.com/Evolution-Robotics-Mint-Automatic-4200/dp/B00408PCEW

Review

So what do I think of it?

Unlike regular swiffering the device is pretty slow, however if you plan to just turn it on and leave it in a room while you do something else, this shouldn’t be a problem.

Obviously due to its shape it can have problems reaching certain areas, so you may need to still manually clean them. One nice benefit though is that it is small device so can fit under couches and tables far easier than a regular vacuum cleaner or mop. This saves having to move furniture around which is nice.

The battery life seems to be pretty good so far. It takes a rechargeable AA style battery pack so theoretically should be easy to replace if the batteries stop holding a charge.

An issue many people may find annoying is that it ‘bangs’ into things. So if it is attempting to clean under your dining room table, you can expect it to hit a lot of chair legs as it goes.

How would I rate it?

Useful! If you have an areas of the house where you can just put it down and leave it to go, it is a great benefit. The price tag though is a little steep compared to just using a regular Swiffer.

If you can get it on discount I would recommend it though.

Conclusion

Since purchasing the Mint it looks like iRobot have bought the brand out and now sell it under the iRobot Braava name:

http://store.irobot.com/family/index.jsp?categoryId=23314286&s=A-ProductAge

iRobot already offer a number of other robotic home cleaning devices, including pool cleaners, gutter cleaners and vacuums.

Devices such as these are starting to show that there is a market for home automation with regards to cleaning. I believe this market will continue to grow and we should start to see some real innovation emerge over the coming years.

Yale Hack-a-thon (Y-Hack)

Y-Hack

This weekend I had the opportunity to be a mentor at Y-Hack. Y-Hack was Yale University’s first (inter)national Hack-a-thon event that saw teams from all over the US, Canada and England gather for a 24 hour coding battle.

The prizes included the chance to present your software to Google and Microsoft, cash, gadgets and books.

Hosted in Yale’s West Campus, over a 1000 students gathered into teams of four and grabbed any free office and cube space going. From 6pm on Friday through 6pm Saturday teams battled away at building original software and hardware projects.

I staid at the event from 6pm until 6am – the overnight shift – and got the chance to see some great talks on the various frameworks and APi’s out there. I also had my first taste of Google glass which was interesting.

One talk in particular that caught my eye was BreakfastSerial – a Firmata based Python toolkit for interacting with Arduino over serial. I’ll be following up on this in more detail in my next blog post.

A team from NYU (Laser Lock) also built a project using Arduino and LEDs (and won four copies of my book!) and another group were using Arduino to build a breathalyzer, so lots of fun projects for the judges to review on the Saturday when it came to prize time.

Hopefully the team at Yale will host this again next year.

I also have special shout out to the team from Rose Hulman for using HTSQL to build the PIXL site and winning the HTSQL prize:

https://pixl-rhccdc.rhcloud.com/

The list of winning teams can be found on TechCrunch:

http://techcrunch.com/2013/11/09/yale-adds-another-stop-to-the-college-hacker-circuit/

And a list of entries can be found at Hacker League’s website:

https://www.hackerleague.org/hackathons/y-hack-at-yale/hacks/

All in all a great event!

Project updates

Things have been a little quiet as of late due to me being busy.

The various projects have been progressing nicely in the background and I’ll be getting their progress written up into blog posts as soon as time permits.

In the interim here is a quick update on where things are at:

Wireless thermostat

My Arduino YUN has arrived. This is going to be the perfect piece of equipment for completing my WiFi thermostat project. It takes away the need to worry about hooking up a separate wireless shield. I’ll just need to attach one of my touch screen shields to it and hook up a relay and thermistor and it will be ready to go.

My next wireless thermostat post will go into more detail on this.

Ethernet Thermostat

The Ethernet thermostat is almost complete. The next post on this will detail each component I used, how to set it up and will also discuss connecting it to baseboard heaters and the types of relay needed.

Thermostat controller

The Java based thermostat controller running on the Pi is coming along nicely. The next posts on this will tie in with my earlier post on parallel computing.

The controller is going to leverage Hadoop which is running on other devices in my home to process temperature data. Expect a guide to setting up Hadoop on the Raspberry Pi and also a further look at MPI for C based applications that can also leverage spare processing capacity.

There will also be code uploaded to BitBucket which you can download and use as a base for your projects.

 

Upcoming reviews

I have some upcoming reviews on the Arduino YUN, the Pebble smart watch and Mint floor sweeper.

 

 

Site re-design

Just a quick update.

Things are been quiet on the blog posting front as I am working on a re-design of the blog layout and theme.

The site has grown and the topics are starting to reach beyond just heating systems. Therefore the blog name will be changing to Internet Of Things @ Home.

You will still be able to reach the site through the old URL and Intelligent Heating will form a subsection of the new larger site.

We also have a new URL to match the new name iothome.org which will come online soon!

Keep your eyes peeled for the update soon.

Quick update

Just a quick update:

Open home automation book

Marco from Open Home Automation net has sent me a copy of his new book to review. You can check his book out here:

http://openhomeautomation.net/home-automation-arduino/

Hadoop on the Raspberry Pi

I’ve set up a multi-node implementation of Hadoop using Raspberry Pi’s. More on this in coming posts.

Arduino YÚN

Arduino are releasing an exciting new board soon check it out on their website:

http://arduino.cc/en/Main/ArduinoYUN

MPI (Message Passing Interface) – Part 1

Introduction

In a previous post I touched on the fact we would be examining HPC (High Performance Computing), parallel processing and Hadoop in relation to Home Automation.

As our home network grows with multiple devices, tablets, microprocessors and similar running on it we reach a point where we have many CPU’s which are often sitting dormant. Being able to leverage this spare computational power for working on other tasks in our home poses an interesting challenge.

One method we can use in the case of multiple Raspberry Pi units is to use applications that run using MPI (Message Passing Interface). The MPI provides us with a set of base routines and functionality for communicating between multiple CPU’s.

Originally written with C and Fortran in mind, there are many libraries for languages including Python and Java that allow us to implement MPI based applications.

MPI has eight basic concepts, these are:

Communicator – An object that connects groups of processes in the MPI session.

Point-to-point basics – Allows process to process communication

Collective basics – Performs communication amongst all processes in a process group

Derived datatypes – Used for dealing with datatypes in MPI applications

One-sided communication – A set of operations used for dealing with scenarios where synchronization would be an inconvenience for example the manipulation of matrices and calculating matrix products.

Collective extensions –  For example non-blocking collective operations (A combination of non-blocking point-to-point functionality with collective basics) which can help reduce the over-head on communications.

Dynamic process management –  The ability for an MPI process to help with the creation of new processes or establish communication between MPI processes.

MPI-IO – The abstraction of the I/O management on parallel systems to the MPI

These eight concepts can help us to decide what functionality we wish to use in our home automation applications that implement MPI.

To give an example of how this may be useful in the home let’s look at the following example.

Redundant media unit and thermostat controller

In this scenario we have a thermostat controller running on a Raspberry Pi that calculates various temperature data and adjusts the thermostats, blinds and similar as needed. This thermostat controller for example may also use weather data to decide whether a device that acts as a damp/water sensor should be switched on or off based upon predicted rain fall levels.

Over time as we store more historical data and get weather streams via the web we have an ever increasing amount of data to work with. More data should hopefully provide more precision. However working with more data also means we are crunching more numbers and thus placing an ever increasing burden on the CPU of the Raspberry Pi.

We can optimize our code and database in order to help tackle performance issues, however this will only get us so far.

Now let’s imagine we have a second Raspberry Pi running XMBC in our home, which we use on occasions to watch streamed TV from the web. This Raspberry Pi may be sitting idle for much of the day, so it would be great if we could leverage it’s CPU to crunch our weather data while it is sitting dormant.

This is where using MPI can help. A program written using MPI can check if the media unit is being used and if not set its CPU to work on processing temperature data.

Using the eight basic concepts of MPI we can write an application that will handle the communication between the thermostat controller and XMBC RPi and pass calculations back and forth.

This model also allows us to add further devices to our network that can be used by the thermostat controller for parallel processing.

Conclusion

Our thermostat controller is being written in Java and will run on Tomcat, therefore in the next post on MPI we will look at its Java implementation and how we can use this in our code.

We will explore the techniques used for writing distributed applications and look at a scalable model that allows for the addition of extra devices to the network.

Building the controller system – Part 1

Introduction

We are now going to look at the first step of building the controller system for our home automation system using the Raspberry Pi as the “brains”.

In order to host web applications, write data to our temperature database and host a method for serving the data stored in the DB via http we are going to need to install a number of tools.

For calculating the temperature and communicating with the thermostats we are going to use Java and setup a Java based web server. Following from this we will once again look at HTSQL and setup an HTSQL server for reading the temperature data from our database. We will also in later posts consider using Hadoop for a scalable parallel based controller capable of handling lots of data.

Having built the controller, we will then need to re-visit the post on Postgres and build out our database.

In part one of this post we will look at installing Java Apache Tomcat.

Setting up Apache Tomcat

Apache Tomcat provides us with a web server that can run Java based applications, distributed through WAR file.

Before we install the WAR file we should setup a new user on our Raspberry Pi. Tomcat will then run under this user, and we can lock down the user so it can only perform certain tasks.

To add a user run the following command from the RPi shell:

useradd controller
passwd <password>

This will create a new user on the system. Under the home directory you will see a list of the user on your RPi. New directories can be added here using the mkdir command. You should create a home directory for your new user controller

mkdir controller

Ownership of the directory can be changed using the chown command, for example:

chown controller:users /home/controller

Now we have a user who will be used for running our controller code and servers under.

Our next step is to install Java on the Raspberry Pi.

Installing Java

We will start by installing the latest version of Java onto our Raspberry Pi. The first command we should run is to remove the existing version installed. Keeping your version of Java up-to-date is important as security patches are released that address underlying security flaws.

To remove your existing Java version run the following from the command line:

sudo apt-get purge openjdk*

Once this is complete we can run the following commands to install Java

 sudo apt-get update
 sudo apt-get install openjdk-7-jdk

In the above command we have installed the Java Development Kit version 7. You should install the latest version, a list can be found at the following URL:

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Once you have installed Java run the clean up command:

sudo apt-get clean

You now have the latest version of Java running on your Raspberry Pi. If you need a basic guide to the language you can read IBM’s introduction guide:

http://www.ibm.com/developerworks/java/tutorials/j-introtojava1/index.html

Installing Tomcat

We now need to install the Tomcat web server onto the Raspberry Pi. You can read more on Tomcat at the Apache Tomcat website at the link below:

http://tomcat.apache.org/

Let’s start by downloading the tar.gz for the web server.

From the command line on your RPi run the following command, make sure you are located in the controller directory under /home:

wget http://mirror.cogentco.com/pub/apache/tomcat/tomcat-7/v7.0.39/bin/apache-tomcat-7.0.39.tar.gz

As with installing Java you should replace the version number above with the latest version.

Once wget has finished running you should be find a .tar.gz file located in the controller directory.

We can untar/unzip the file as follows:

tar xzf apache-tomcat-7.0.39.tar.gz

Now change directory into the conf folder located in the new apache tomcat folder created when untar/unzipping

cd apache-tomcat-7.0.39/conf

We can now add our controller user to the configuration so they can start and stop the server.

Open the tomcat-users.xml and add the following:

<user username="controller" password="raspberry" roles="manager-gui"/>

Save the file. We can now test that Tomcat runs.

Navigate to the bin directory e.g.

cd ../bin

then run

sudo sh startup.sh

This will start your Tomcat server.

Tomcat by default runs on port 8080 of the localhost. In the next post we will take a look at the management console and explain how it works and look at further configuration of our Tomcat server.

Quick update

Just a quick update.

1.) Exams are done, so plenty of time to work on various projects.

2.) In the coming weeks I’ll be doing an interview with Marco of Open Home Automation.

3.) Wrapping up the controller module on the Raspberry Pi

4.) Completing the Ethernet and wireless thermostats

5.) A review of the Mint robot sweeper

6.) A closer look at Nest

7.) Baseboard heaters and wireless thermostats

8.) HPC with the Raspberry Pi