Installing OS on Cubietruck and SSD

Based on Robert Hekkers experience with installing the Cubieboard3, I download the latest Lubuntu server OS v1.02 image: http://docs.cubieboard.org/tutorials/a20-cubietruck_lubuntu_server_releases

I downloaded and installed the latest Phoenix Suite v1.06 for Windows using this download: http://docs.cubieboard.org/tutorials/common/livesuit_installation_guide
After starting the Phoenix Suite, I was asked if I wanted to install the upgrade to v1.08. I clicked “yes”. (btw, DON’T install this software on a VM-ware virtual machine, I couldn’t get a stable connection to the Cubieboard3 and as a result the flashing would not start)

Then I followed this guide to install Lubuntu on the Cubietruck: Cb3 Lubuntu-12.10-desktop Nand Installation V1.00

PhoenixSuite-flashing

After 4 minutes and 25 seconds Lubuntu was flashed to the Cubietruck and was up-and-running:

PhoenixSuite-done

I downloaded PuTTY and connected to the ip-address of the Cubieboard3 (looked that up in my router, since the Lubuntu is configured to use DHCP). The default user that is created is called “linaro” and the password is also “linaro”.

Because the onboard NAND-flash has limited performance and a limited life-cycle I moved the OS from the onboard NAND-flash-chips to a new Samsung 840EVO SSD, using this Youtube-video as a guide: Flashing LUbuntu Server to a Cubietruck and Moving It to a Hard Drive

When I logged back into the Cubietruck I saw that the Lubuntu version was out-dated:

Lubuntu-need-upgrade

To upgrade it to the latest version I used the following commands (found at a blog called How to install Lubuntu Server on Cubietruck from Mac OS X):

  • # apt-get update; apt-get upgrade
  • # apt-get install python-apt
  • # do-release-upgrade

The last command took about a half hour to complete. Then I finished the rest of the customizations steps, mainly:

  • Adjusting time-zone
    #rm /etc/localtime
    #ln -s /user/share/zoneinfo/Europe/Amsterdam /etc/localtime
    #nano /etc/timezone
    Changed to “Europe/Amsterdam”
  • Adding a new user
    #adduser <username>
    #sudo adduser <username> sudo
    #sudo usermod -a -G sudo <username>
  • Removing the default linaro user
    #sudo userdel -r linaro
  • Disable apache auto-start (I will be using Node.js instead)
    #sudo update-rc.d -f apache2 remove
  • Install Node.js and it’s package manager NPM
    #apt-get install nodejs
    #apt-get install npm
  • Install monit
    #apt-get install monit
  • Install aptitude and ntp
    #apt-get install aptitude
    #apt-get install ntp

The final step will be to place the Cubietruck in the Ewell case but first I must figure out how to connect a NRF24L01+ board and fit that into the case as well.

Home-automation foundation

Reading the blog of Robert Hekkers I’ve read he started out using a PC running a single monolithic app developed in Delphi. Only recently he completed porting al his software from a PC to an ARM-based-board named Cubieboard3 (aka Cubietruck). In my house there is a PC running 24/7 as a NAS, but I would like to keep things separate so I’m also going to use a Cubieboard.

Cubietruck
Cubieboard 3 aka Cubietruck

Robert Hekkers also switched his programming language from Delphi to Node.js when moving over to the Cubieboard. Since I don’t have any experience with Node.js but would love to learn, I see this as a great opportunity to start using something new, so I’m going to follow his example.

The Cubietruck will function as the central node in the whole home-automation system. In all the rooms there will be several sensors/controls and my main idea right now is to use Arduino based controllers for the sensor-nodes. Since not all rooms have Ethernet and I don’t think a sensor should have WiFi, I’ve selected a radio-chip called the nRF24L01+ as my main communication-device between the sensors and the central-node. ManiacBug has done great work building battery-powered sensor-nodes and writing an Arduino library to transport the sensor-data to the central-node. This actually comes pretty close to what I would like to build, only I would like to add more sensors, create interaction based on sensor-values and add a nice front-end (website/mobile app) to control everything.

Home automation getting started

After following the blog of Robert Hekkers for almost a year now, and reading a few other blogs on the subject of home-automation, I’ve decided to start building a home-automation system myself. I’ve come up with a rather long list of things I would like to automate/monitor:

  1. Monitor temperature in all rooms
  2. Monitor humidity in all rooms
  3. Monitor windows/doors opening/closing
  4. Monitor movement in all rooms
  5. Monitor energy/water/gas usages
  6. Control radiator valves in all rooms
  7. Control central-heating-installation (using OpenTherm)
  8. Control motor floor-heating installation
  9. Control central-air-refreshment fan
  10. Monitor doorbell presses (and make audible throughout the house)
  11. Monitor CO2 and CO in all rooms
  12. Add webcams
  13. Monitor outside temperature/barometric pressure/wind/rain
  14. Monitor refrigerator/icebox temperature
  15. Monitor dishwasher and washing-machine progress
  16. Control lights in and around the house (first are the light in the garden and front-door)
  17. Control curtains/rolling window-shutters
  18. Control windows opening/closing using motorized arms
  19. Control a sliding-door into the backyard to let our cats in and out
  20. Control front-door lock using RFID

I know this is an ambitious list, and I know this is going to take quite some time. But that’s perfectly oké, it’s isn’t the destination that matters, it’s the journey that leads you there! Doing this will teach me more about electronics and micro-controllers, give me an opportunity to learn and use new programming languages and use new (software-) libraries. I’ve been a software developer for 13 years now and have always loved the combination of hardware and software. Let’s see where this project takes me.