Skip to content


Install Oracle JDK on Oracle Linux

I could’t find a reference to this in the JDK Install instructions so I thought I’d make a note of it here.

I installed the latest Oracle JDK on Oracle Linux using the RPM downloaded from here, but when I checked the version number I was still getting OpenJDK.
# rpm -ivh jdk-7u21-linux-x64.rpm
...
# java -version
java version "1.7.0_19"
OpenJDK Runtime Environment (rhel-2.3.9.1.0.1.el6_4-x86_64)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

The solution is to use the RedHat “alternatives” utility.

1) Register the newly installed Oracle JDK with “alternatives”

# alternatives --install /usr/bin/java java /usr/java/default/bin/java 2

2) Set the new JDK to be the default

# alternatives --config java

Choose the option that represents your the Java set up you require

Posted in Linux.

Tagged with , , .


Look, no Arduino – XBee ZB Series 2.x Digital Input

IMG_0350In preparation for my next project (an XBEE powered rain gauge) I have been investigating how to collect sensor data with just Digi XBee modules. So far all my sensor projects have used an Arduino to collect data then use either WiFi or XBee to send the data to my server for processing. It turns out that the XBee modules have 12 digital input/output and 4 analog input pins that can be used directly. For basic sensor projects it should be possible to use an XBee to collect sensor data without the need for an additional micro-controller such as the Arduino.

Continued…

Posted in Internet of Things.

Tagged with , , , .


Smart Star – My Arduino, Node.js and MQTT CheerLights Project

A few years ago I bought a large outdoor Christmas decoration from our local B&Q DIY store. It’s made up of three rope lights (one blue, one green and one reddish purple) arranged around a frame to form a Multi coloured Christmas star. After just a couple of seasons the flashing control unit just stopped working and the lights were useless. Despite knowing very little about electronics I decided I should try to build my own control unit using an Arduino. Then I read about the Cheerlights project. I figured that if I’m going to build a new controller then why not build it so it can be hooked into Twitter and join in the CheerLights fun.

Here’s a video of my “Smart Star” working.

Continued…

Posted in Arduino, Internet of Things, Software Development.

Tagged with , , , .


Phusion Passenger, Nginx and a Rails 3.2 application

nginxI am just in the process of making a new Rails application live. I use RVM to manage my ruby environments and I’m currently running ruby 1.9.3. I am deploying on Nginx 1.0.11 and Phusion Passenger 3.0.11 (mod_rails/mod_rack). I followed the usual configuration instructions and restarted the nginx server. When I tried to start the application by accessing the URL in my browser I received an error saying that bundle could not be found. After a lot of trial and error I finally realised I had made a mistake in my nginx.conf file.
Continued…

Posted in Linux, Ruby-on-Rails.

Tagged with , , , , , .


Testing jQuery Autocomplete using Capybara

This is a brilliant tip. I would never have worked this out on my own. Thank you Jack Russell Software Company.

http://jackhq.tumblr.com/post/3728330919/testing-jquery-autocomplete-using-capybara

The sleep commands were the critical bit, without them Selenium just wasn’t firing the JavaScript event handlers.
Continued…

Posted in Ruby-on-Rails, Software Development.

Tagged with , , , , .


iDoorbell v2 – Using Prowl, Arduino, XBee ZB and ACS712 Current Sensor

iDoorbell screen shotLast year I created a project to Internet enable my doorbell (iDoorbell v1). The idea was to send an alert to my iPhone using Prowl whenever someone presses the doorbell. An Arduino equipped with a WiFi shield was used to monitor the bell circuit and invoke the Prowl HTTP web service. The system worked well enough but after a couple of months it just stopped working. As far as I could tell the Opto-Isolator I was using to sense the bell push had blown. There was obviously too much current in the bell circuit for the isolator’s internal LED. I decided to redesign the whole project and start again.

Continued…

Posted in Arduino, Internet of Things.

Tagged with , , , , , , , , .


Digi XBee ZB Series 2.x

I now have a couple of Digi XBee ZB Zigbee wireless modules. I really like the idea of these little wireless modules,  compared to equivalent WiFi modules they are very low powered, cheaper and they can be used to collect simple sensor data without an Arduino.  I can feel an iDoorbell v2 project coming along soon!

There are basically two different types of Digi XBee modules available, the series 1 and the series 2 (which includes 2.5). From what I read the series 1′s are much easier to work with, however I bought the latest series 2.5 ZB version not the series 1. I thought I’d share how I managed to get these little modules talking to each other.

Continued…

Posted in Internet of Things.

Tagged with , , , , , .


Rails Sub URI Headaches with Paperclip

I have a number of Ruby-on-Rails apps on my little Ubuntu server, each one accessible using a sub URI. For example, the home controller of the homework application is accessed with:

http://bravo.local/homework/home

Where homework is the sub URI configured to serve my application and home is the name of one of the controllers. The Apache/Passenger configuration for this set up is documented here.

Continued…

Posted in Linux, Ruby-on-Rails.

Tagged with , , , , , , , , , .


MQ Telemetry Transport (MQTT)

The whole Internet-of-things idea has really captured my imagination. DIY Sensors and Machine-2-machine computing are becoming a reality thanks to open source projects like Arduino.

Today I stumbled upon a podcast interview on MQ Telemetry Transport, or MQTT, with Andy Piper from IBM. MQTT is an M2M/Internet of things connectivity protocol developed at IBM. Much of the podcast talks about how this technology is being used in home DIY sensor projects. MQTT is based on a “Publish and Subscribe” architecture and requires a Broker to handle the messaging. Although IBM have a few different MQTT Broker implementations, there is an open source implementation of the broker server called Mosquitto  that looks worth experimenting with.

If that wasn’t enough to wet your appetite, Andy Stanford-Clark (also from IBM) gave a presentation called “The house that Twitters” which explains how he has used MQTT to create a number of interesting home sensor projects.

Posted in Internet of Things, Linux, Podcasts.

Tagged with , , , , .


iDoorbell – Arduino powered iPhone notifications

iDoorbell screen shotI am a software guy and have very little experience with electronics. I am hoping that playing around with Arduino will help me learn a thing or two about resistors, capacitors and the like.

I have started a project using my Arduino that notifies my iPhone whenever a switch in a separate circuit is closed. The plan is to connect this to our home doorbell so as well as the usual ding-dong we also get an iPhone alert. Software-wise this works great using a Wifly shield to enable the Arduino to talk the the Prowl notification service on the Internet over http. It’s kind of a wifi version of the project described here http://blog.makezine.com/archive/2010/12/snail-mail-push-alerts.html.

Continued…

Posted in Arduino, Internet of Things.

Tagged with , , , .