Trello Dashboard v0.2

I’ve spent a bit of time over the last few days re-working the Trello Dashboard, and getting used to some of the features of AngularJS. I’m happy to admit that I have a lot to learn about AngularJS, but I feel like I’m making progress!


For starters, I’ve moved all of the Trello Client interactions out of my Controller, and into a trelloLibrary module. This contains the trelloService, which can now be injected into, and used by, the Dashboard Controller, or indeed by any other AngularJS Controller. This should make the library much more portable, and has cleaned up the Controller code significantly.

Routing & Deep Linking

I’ve used the ngRoute module to enable deep-linking within the Dashboard. Selecting an Organisation and/or a Filter from the drop-down menus in the navigation bar will update the current route, allowing you to bookmark or navigate directly to a particular Organisation and Filter within the Dashboard.

Other Changes

Some other minor changes have also been incorporated into this version:

  • Changed from the default Bootstrap theme to Flatly.
  • Added the Name & Avatar for the Trello user to the Navigation Bar.

Demo & Source Code

Both the Demo and Source Code have been updated on my GitHub profile.

Trello Dashboard

I was introduced to Trello a while ago, and have recently started using it much more regularly for managing tasks for my team and I – it’s replaced my Whiteboard of Doom™ quite effectively.

I’ve found it to be an extremely useful tool, but there was one thing missing – I felt that I was spending too much time trying to catch up on each of the boards in my organisations – at the moment, I have 13 boards open across my team, and having to check each one individually takes a while.

This led me to build a small Trello Dashboard (demo | source code). This gives me an overview of each of the boards I’ve subscribed to, without having to check each board individually.

Currently, the Dashboard allows you to:

  • Login with a Trello account.
  • Choose between a display of “My Boards”, “Starred Boards”, or from a list of your Organisations.
  • Filter between Open and Closed boards.
  • Display each of the lists in a board, with a count of cards for each list.
  • Display a donut graph showing the relative size of each list in a board.

I’m planning to add more features as I come up with them, but for now I’m finding this a useful addition to my use of Trello.

The Dashboard makes use of the following technologies:

Raspberry Pi Camera – Basic Motion Detection

Here’s a very basic method for implementing motion detection using a Raspberry Pi and camera.

This script works by taking an image and comparing it to the last significant image taken – if the images differ by 10% (this can be configured to suit your environment), the new image will be saved.

The idea here is that images are only stored when a significant change has been detected. The image comparison algorithm has been taken from Rosetta Code.

Continue reading “Raspberry Pi Camera – Basic Motion Detection”

Raspberry Pi Camera Live Streaming

I recently bought a Camera Module for the Raspberry Pi. One of the main reasons for getting one was to see if I could set up a live stream from the camera that would be accessible from a web browser or mobile device – partly because it seemed like an interesting project, and partly so I can keep an eye on our dog while I’m away from the house.

It turned out that this was very achievable, but it does require quite a bit of configuration to get things working. I thought I’d document my process here, in the hope that my experiences might help anyone else trying to get a live stream up and running from their Raspberry Pi.

I’m using the following software to enable the live stream:

  • Raspbian
  • FFmpeg
  • libx264
  • nginx with rtmp
  • Safari (OS X or iOS)

Assuming that you have a Raspbian installation up & running, I’ll run through the configuration of the other items below.

Continue reading “Raspberry Pi Camera Live Streaming”

Tweeting Raspberry Pi info – part 2

I’ve made some small changes to the startup script published here:

  • Moved all of the configuration variables to the top of the script.
  • Added the interfaces variable to configure with network interfaces should be checked for and included in the Tweet. By default, eth0 and wlan0 are defined, but you can change these as required.
  • If an interface is not found, the function will return an error message rather than failing on the exception.

The updated version is available from the GitHub repository.

Sorting Oracle Dates using Tablesorter

Lately, I’ve been using the Tablesorter jQuery plugin to add sort & pagination functions to tables in my applications. The plugin works great, but by default it doesn’t appear to work correctly with Oracle formatted dates, e.g. 05-JUL-13.

I found a similar question on Stackoverflow, which I have adapted to work for my applications.

To enable sorting of Oracle dates, add the following to your application:

        id: "oracleDate",
        is: function (s) {
            return /^\d{1,2}[\/\-]\w{3}[\/\-]\d{2}$/.test(s);
        }, format: function(s) {

            var monthNames = {};
            monthNames["JAN"] = "01";
            monthNames["FEB"] = "02";
            monthNames["MAR"] = "03";
            monthNames["APR"] = "04";
            monthNames["MAY"] = "05";
            monthNames["JUN"] = "06";
            monthNames["JUL"] = "07";
            monthNames["AUG"] = "08";
            monthNames["SEP"] = "09";
            monthNames["OCT"] = "10";
            monthNames["NOV"] = "11";
            monthNames["DEC"] = "12";

            if (s == "") return 0;

            var date = s.match(/^(\d{1,2})[\/\-](\w{3})[\/\-](\d{2})$/);
            var day = String(date[1]);
            if (day.length == 1) { day = "0" + day;}
            var month = monthNames[date[2]];
            var year = date[3];

            return sortableDate = '' + year + month + day;
        type: 'numeric'

Tweeting Raspberry Pi Info at Startup

I’ve spent a bit of time over the last few months setting up my Raspberry Pi collection. I now have 3 devices running between my home and my office with a variety of services, including Internet Radio streaming, XBMC, file shares, web and chat servers, and so on.

Two of these Raspberry’s are running full-time without a monitor, which sometimes causes a problem – what happens when the IP address changes? Without a monitor attached, it can be difficult figuring out what the IP address of the Raspberry is. Obviously I can have a static IP address on my home network, but the work network is a different story (without going to a lot more trouble, anyway).

So, here’s a small Python script that runs when the Raspberry starts up, and sends me a direct message over Twitter with the Raspberry’s current hostname, and the IP addresses for eth0 and wlan0.

An example of a direct message generated when the Raspberry Pi boots.

The script uses Python and the Tweepy library for accessing the Twitter API. I’ve also used the get_ip_address() as published here.

Installation & Usage

You  can get the current version of the script from GitHub. Before using the script, you will need to make a few changes.

First, you will need a separate Twitter account for the Raspberry script to use. Once created, follow these instructions to install Tweepy and generate the secret keys you will need for the Twitter API.

Update and populate the CONSUMER_KEY, CONSUMER_SECRET, ACCESS_KEY and ACCESS_SECRET with the values that have been generated for your account. You will also need to set the to_user value to be your Twitter @username. Once you’ve entered these values, you can run the script. This should send you a Twitter DM similar to the one pictured above.

Running the script at startup

The exact details may vary depending on which distribution you use – in my case, I’m using Raspbian – to run this script at startup, simply add the following line to your /etc/rc.local file:

#Send Startup Tweet

Also make sure to chmod 755 the script to ensure it is executable. Now, each time the Raspberry boots up, it will DM you with the hostname and IP address information.