Blog Stats
  • Posts - 183
  • Articles - 0
  • Comments - 36
  • Trackbacks - 0


Thursday, November 26, 2015

So this is nice....


R-PI,  just playing nice with Mac this evening….



Wednesday, November 25, 2015

Best Post for Configuring Avahi

Tuesday, November 24, 2015

Best Post I've Found... Netatalk 3 setup guide

Sunday, November 1, 2015

Raspberry Pi has lead me to this...

So,   I’ve been playing around with various Raspberry Pi projects for a couple of years.

I’ve had a few hits (caller ID,  home automation, audio airplay) and I think only one miss (Time Capsule).

Whats been great, is that its been easy to have Linux machine that doesn’t matter too much if I get things wrong and it breaks,   its not mission critical or anything, and unrelated to what  I have todo with work.    

So I want to try and build a better Mac and PC backup solution,   have a proper continuous integration server for mobile projects and GIT server.   Working for a Microsoft partner, its also great to get a fresh perspective on what else is out there.   

So we’ve had an HP Proliant server (something like a ) in our office just doing nothing for a while and I took it upon myself to see what could be done with this box.


First step,  as I’m familiar with Debian Linux  ( ) was to install that latest Jessie build.    This required me to burn a complete install DVD.   I needed todo this as the HP server has SCSI DVD and hard-disks,  so to get the necessary driver support thats what was required.

Install took about 15 minutes and I had a machine I could use.      Next step was to lock the machine away out of sight.  I have too many monitors on my desk already so, I needed this machine to just run unobtrusively.   I made sure I could SSH to the machine (which I should admit I called Beasty) away from my desk.

Beasty was just connected to the network and powered.   I needed todo the majority of work out of hours,  so I made sure I could SSH connect to the machine from home over our VPN connection to our office.   All good.   So back to the same sort of Raspberry PI experience; I now have a fast Linux machine that I can connect to out of sight;  we were ready.

I crave as easier life as I can muster (as I’m sure we all do).   The next step was to ensure it was easy to copy files back and forth from Beasty.   I’m using Macs and PCs all the time so I installed Netatalk for Mac file share support and Samba for Windows file sharing.  Netatalk 3 was a little bit of a trauma to get up and running but once done,  I could access my home directory and also using an external hard disk on the server use Beasty as a Time Machine for Mac backup.

I then installed CUPS which let me share to Macs and PC’s a couple of Zebra label printers.   This has the added bonus is that from iPhone, iPad I can now AirPrint Labels.   Lets face it, who doesn’t need that in their life….


So moving on from here.   I installed GIT.      This was a breeze.   GIT means I now have source control in Xcode on my Mac with a secured remote repository on Beasty.    I can work locally and then push changes up-to this team server.       I’m not sure if this is the way to go as our company is focused around Microsoft Team Foundation server,  so I am going to try and get GIT integration going with this and compare with the open source alternative.


So to recap for free ,I have a Mac/PC/iOS File and print server with cross platform source control solution built in about an hour.    

Right now I’m installing Gnome Window Manager to take me from command line management to something a little bit more 2015.  I’m blogging about all of this while I wait for the install to finish.   


I’ll keep you posted...


Friday, September 18, 2015

Watch OS2

Please to announce that Bin Collections is ready to run on iOS9 and Watch OS 2.


Many thanks to Scott for sending me a pic of it running on a real watch...



IMG 2614

A few Raspberry Pi Wins

So a little update.

I’ve managed to install CUPS (Unix Printing at its best) this evening;  which has been around forever and lets you print from a Raspberry Pi.  Interestingly CUPS was developed by Apple.    What’s cool after Google-ing a fair bit,  I now have a virtual PDF printer that  I can print to via AirPrint, Mac, or Windows.   After printing something to this printer, I find a properly rendered brilliant looking PDF in my home folder (and shared) on the Pi.    I haven’t quite found the time to extend this to copy the PDF’s to Dropbox (Google that; plenty of examples),  but that will follow.

Guided by -

IMG 2615 2

Next Up..

A  Raspberry Pi Apple Time Machine, doesn’t really work.  Yep,  this is crushing…   Its just too slow, with backups taking days to complete.  It kind of works, just not performant.

I’ve realised that (along with lots of others) that the Pi just hasn’t got the umpgh to transfer data quickly enough to connected USB hard-drives.  This coupled with an IO channel that is also  shared by the Ethernet interface.

So thinking on about this; my current thoughts are to use a NAS enclosure that I can re-purpose to install an uncluttered Linux distort on (I'm favouring Debian).   This would would give me the benefits of SATA +  Gigabit Ethernet connection.  Currently scouring Ebay for suitable 2 bay drive NASs   We will see…   (recommendations please)


Wednesday, September 16, 2015

Rick Rolling - New Apple TV

Had to be done…   A bit of fun… I wanted to work out, how to play video on the new Apple TV.

I downloaded the sample of how to use TVML from Apple at -


Follow the included for instructions for how-to run and install.

Replace the contents of client/templates/index.xml.js   with


var Template = function() {

    var myVideo = new MediaItem('video','');

    var player = new Player();

    player.playlist = new Playlist();



Oh Go On, Try It 

Sunday, September 13, 2015

SCAMB Bin Collection App

I’m pleased to announce,   SCAMBS Bin Collection App.  is ready for Apple iOS 9 and Watch OS 2.

Once again, I’ve made it on the first day of release.

This new version adds Bin Collections information as a complication to your Apple Watch face.   In addition,  the watch app. now works natively, so should be nice and fast.


500x500bb 80

Technorati Tags:

Monday, September 7, 2015

iBeacon In/Out Board - The Cake Issue


So cakes are an issue in our office.     We have two offices one in the UK one in the US.   When someone has a birthday an allusers email gets sent out that cakes are in the office.    This inevitably leads to crushing disappointment when you happen to be in the other office to where the cakes are.

So the cake issue was one of the reasons we needed a reliable in/out board to show exactly who’s in each office and the ability to send a targeted email to just the office we are trying to reach.   Of course we could have put this on a white/board or purchased something more elaborate. 

I should point out, that the intentions of this project were no more sinister than reliably maintaining a list of ‘who’s in’   this wasn’t intended as attendance recording or anything like that.

So how do you record who’s in the office automatically?    Who’s logged onto the network?   Which machines have been assigned a DHCP address or using the WIFI?   All possible,  but all have their difficulties in implementing and have questionable reliability for actually determining who’s in.     Of course you could go the other way and make people visit a web-page to indicate their in;  but realistically who is going todo that.

So the majority of our users have our office mobile portal app. running on their iPhone.   This app. has a phone list;  what was required is filter to reduce this list down to just who’s in the office.   So how do we determine just who’s in?


The solution was to equip each office location with an iBeacon.      I thought about using a Raspberry Pi, or a PC acting as a Bluetooth low energy beacon,  however the simplest and cheapest solution was to purchase an off the shelf beacon.

I opted for a £12 beacon from Amazon that could be placed centrally in each office location.

These things are tiny any run for 6 months on a watch battery with an estimated range of 40m.   Impressive stuff; and a bargain at the price.



So when our Beacons arrived the first thing todo was program them with a unique identifier that our mobile app. would look out for.   This was done by downloading an app. (called eBeacon on the app store).  This app discovered our new beacons and we were able to assign them a unique ID of our choosing.

I opted to give each Beacon a different ID.   This made the coding changes a little easier (more of that in a bit),  as it just let me monitor for beacons, which I could do in the background.

I placed each beacon centrally in the office and with a little testing using the eBeacon app.  I was able to reliably record that I was in proximity of the beacon from pretty much any part of the office.

So with Beacon’s installed,  it was time to modify our App. 



Our mobile portal App. is written in Objective C (process is the same in Swift).   I needed to modify the ApplicationDidFinishLaunching method to monitor for each beacon.    This process is well documented elsewhere, but briefly I had to register that my app.  required always authorisation to request a users location.   Again this sounds a bit sinister but its just for the purpose of determining if we are near a beacon when our app. isn’t running.   To achieve this I added the following code - 

self.locationmanager=[[CLLocationManager alloc] init];
[self.locationmanager requestAlwaysAuthorization];
[self.locationmanager requestWhenInUseAuthorization];

You also need to make sure that your app responds to the Location Manager Delegate which just required adding the delegate CLLocationManagerDelegate on the end our app delegate definition as follows -

@interface Mobile_Portal_v2AppDelegate : NSObject

In iOS 8 you need to also alter your apps xxxx.Plist file to add two new keys that give's the end user a nice friendly message that your app. is requesting background location updates and what the purpose of this is. These are -


I set these bot the be, "Our Office App, Is Requesting Your Location; Do You wish to allow this?"

so the next bit of code is to actually tell the App. to look out for each beacon. Realistically once you have come into proximity of the beacon it was quite possible to go sit at your desk and be out of range. So without doing anything more elaborate I decided for this project, it was good enough to just record that a person had visited the office in a given day; I didn't intend to record they had left; I just assumed you would leave the office at some point during a working day. So again adding to the ApplicationDidFinishLaunching method, I put some code in to monitor for when we are near our beacon

NSUUID *uuidh = [[NSUUID alloc] initWithUUIDString:@“GUID OF BEACON HERE"];
CLBeaconRegion *regionh = [[CLBeaconRegion alloc] initWithProximityUUID:uuidh identifier:@"COM.XXXX.LOCATION"];

 regionh.notifyOnEntry = YES;
 self.locationmanager startMonitoringForRegion:regionh];

nothandler = [NotificationHandler alloc];

So this tells our app. to listen out for arriving at a Beacon. I duplicated this code for each office location. As mentioned earlier I assigned each Beacon a different ID. This made my code simpler as I just needed to monitor beacons, I didn't need to determine range from them. Ranging gives us access to a major and minor value on each beacon; but it was easier just to assign different unique identifiers which was fine for my purposes.

What Happens When You Arrive?

So the next bit of code was to actually determine what todo when our app. detected it was in proximity of a given beacon. This method was added to our AppDelegate

- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region
 // I've been notified by a beacon
 if ([region isKindOfClass:[CLBeaconRegion class]]==NO) return;
 CLBeaconRegion *ourbeaconregion=(CLBeaconRegion *) region;

 // get which user am I
 NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
 [prefs synchronize];
 NSString *user = [prefs stringForKey:@"user"];

 if (user==nil) return;

 NSString *bec=[ourbeaconregion.proximityUUID UUIDString];
 // call a web-service to record the arrival
  [hitbeacon run:user beacon:bec];

So the nuts and bolts of this determine, which user we are, and the GUID of the beacon we have arrived at.

Once we have these two bits of information I make a web-service call to alert our server that we have arrived...

You've Arrived

So our server records (using a web service) for a given user when they have arrived in a given location into a database table. I created a view on top of this, which shows for a given date all arrivals (this data is over-written, daily so never retained.

The Cake Solution

The final piece was to create a web-page that reads from the above view to create a filtered list of who's in each office location. In addition using the list of people I added a mailto: link which creates an email for just those who are in.

Saturday, September 5, 2015

Surprise - 4th Gen. Apple Time-Capsule died

Over the past few years as we’ve added more and more devices to our home network, I wanted a solid way of backing up PC’s and Macs both to local storage and to the cloud.    I’m not going to cover the cloud aspects of our backup solution in this piece, but I thought I would share with you my in-home findings.

So let me take you back 4-5 years.   I started like I’m sure most of us have,  plugging a USB hard-drive into various Macs and PC’s (when I remembered ) to try and get myself a backup.   Apple Time Machine works great,  but in this guise you still have to remember to plug the drive in from time-to-time.

This evolved into me thinking 'ah-ha’   I can plug this hard-drive into an Apple Airport Extreme and use this so that I can backup over the network.     I tried this with a 4th generation Airport Extreme,  and its very unreliable and this configuration not supported by Apple (although this is in very small print).     Although still officially not supported I have found several people on the Web that say with  latest Airport Extreme (6th Generation) this does work.

So reluctantly,  I sold the Airport Extreme,  dug deep and paid out a whopping £299 for a 4th Generation Time Capsule.      So now I had a solution that in combination of an external 1GB hard drive connected to the Time Capsule gave me 3TB of backup space.   The Time Capsule (and I should say Airport Extreme are both very solid wireless access points and provide flawless Airplay,  however all of this comes at a premium price.

So let me bring you up-to date.   Over the Summer my Time Capsule died taking with it my entire household of backups.   I have secondary backups of course, but I didn’t want to rely on an single point of failure.   The Time Capsule had suffered a power-supply problem and from what I can see this appears to be a well documented design fault with the lack of air-circualtion inside the unit causing the power-supplies to fail -

I was concerned that given that most people (?)  don’t exactly want their router,  backup drives on prominent display so hide them a way in a cupboard or something.    This seemed to not exactly be conducive to the Time-Capsule’s lack of cooling issue.

You can see with the 6th Generation of Time-Capsule that the case design has been changed,  maybe some form of acknowledgement by Apple of the issue (?)

I contacted Apple, expressed my concern that the unit’s power supply had burnt out which worried me as this is a device that sits largely running all day and night on a wooden surface.  Apple were nice, supportive but ultimately it was pay for a repair (not going to happen given my experience) or buy a new re-designed unit.

So now what….     I was left with perfectly good disc inside that Time-Capsule containing the majority of our household/memoriesbackups and the external drive which among other things contained my work machine’s backup.

I could - go around the loop again buy something from Apple.   Given the above experience (and the fact that our children needed school shoes),  this wasn’t an option.

I could - go out and buy a NAS case re-house the drives and use that.

Or as I have done I’ve pulled the drive out of the Time-Capsule and connected it to a Raspberry Pi.

Enter The Pi

Firstly, I turned my Virgin Media Super Hub back from Modem mode back to acting as a router; which although a bit slower didn’t really seem to make any noticeable difference to my home network (used heavily by 5 people).

I opened the Time-Capsule found it pretty easy to get the 2TB hard-disk out.  The hardest part of the operation was getting the rubber (sealed) sticky floor tile thing off of the Time-Capsule.   This floor blocks the small internal fan entirely.   Once done with it took just removing a few screws to get the drive out.   I purchased a 3.5” USB drive enclosure from Ebay -

This let me re-house the drive.   Then following, the guide here -

Used a Raspberry Pi B to plug both hard drives into the Pi and connect to Ethernet.  During the process I did take it upon myself to format the drives and start the backups clean.



It working great.    OK,  its not the most aesthetically pleasing 3 power plugs and a birds nest of USB cables;  however its all hidden and runs very cool.  It has cost me the price of drive enclosure ( £11.99 ) to continue my household backup's

+ I have Samba working now on the Pi so I can backup to Windows & Mac’s with ease.     The whole process took about an hour to get working.


To conclude

I would have loved for Apple to step-up acknowledge this design issue and replace my Ttme-Capsule;  however its refreshing to find that you really can build something from next to nothing to solve a problem like this. 

 Just worried for others that a Time-Capsule may burn your house down.






Copyright © Richard Jones