Install Oracle JDK on Oracle Linux

posted in Linux by martin on 07 May 2013

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)

Read more >


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

posted in Internet of Things by martin on 20 January 2013

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.

Read more >


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

posted in Software DevelopmentInternet of Things by martin on 15 December 2012

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.
[youtube=http://www.youtube.com/watch?v=vRsFYel0NrM&w=500]

Read more >


Phusion Passenger, Nginx and a Rails 3.2 application

posted in LinuxRuby-on-Rails by martin on 28 February 2012

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.

Read more >


Testing jQuery Autocomplete using Capybara

posted in Software DevelopmentRuby-on-Rails by martin on 26 February 2012

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.

Read more >


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

posted in Internet of Things by martin on 10 February 2012

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 when the doorbell circuit was closed. 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.

Read more >


Digi XBee ZB Series 2.x

posted in Internet of Things by martin on 19 January 2012

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.

Read more >


Rails Sub URI Headaches with Paperclip

posted in LinuxRuby-on-Rails by martin on 18 January 2012

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.

Read more >


MQ Telemetry Transport (MQTT)

posted in PodcastsLinuxInternet of Things by martin on 18 January 2012

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.

Read more >


iDoorbell - Arduino powered iPhone notifications

posted in Internet of Things by martin on 07 November 2011

iDoorbell screen shot

Please Note: This project was updated and improved and is described here : iDoorbell v2

I 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.

Read more >