I purchased a Raspberry Pi 1 Model B in early 2014 thinking, “ooh this could be cool”. My initial use was to use it to add Media Streaming capability to an old TV which was now nearly useless as it didn’t even have a digital TV tuner. I already had a Plex server up and running and was using it with other devices, so trying RasPlex was a fairly obvious use. It was great to watch as the RasPlex development community made steady progress improving the performance and capabilities of the client. Eventually the TV was replaced, I tried using the Pi as a Linux PC, but without a real purpose it didn’t really work out. I tried using at work to Connect to my XenDesktop using the Raspberry Pi Receiver that my friend and colleague Muhammad Dawood created here at Citrix. However being used to a Multi-Monitor setup, the Pi fell eventually into disuse.
The Citrix acquisition of OctoBlu in late 2014, led me into looking once again at what was happening the space comprising hardware (micro-computers, sensors) software and services that are connected or interconnected, an area which has been now defined by the term, Internet Of Things (IOT). So I’ve been watching from the sidel-ines, reading about new developments in all the areas which make up the IOT arena.
Needing a purpose
I personally find I need a purpose to drive my learning and experimentation. When I’ve wanted to learn a new programming language reading books and writing Hello World apps aren’t really my thing. I need to apply it to a problem to be solved. I’ve used this before to write a program in Visual Basic then re-write in Java and then once again in C#. I’m sure it’s not the best way, but I find it provides a great start. Anyway I’ve a problem, I’ve sort of solved it already but I figure it could be better, I’ll write a post about the project later, for now understand that it just provided the motivation to start.
As part of solving the problem I realised that I’d want to be able to send REST calls to devices in my LAN, exposing my system to the internet for anyone to make REST calls against was clearly going to be a bad idea. So I needed on my LAN that could act as a sort of Proxy. From the Citrix Synergy event earlier this year, I’d heard about some sort of gateway from the OctoBlu team, so I took a look at Gateblu and then stumbled across GateBlu for Raspberry Pi. So I dusted off my old Pi Model B, downloaded the GateBlu_RPi image and booted up my Pi to see what I could do.
RTFM! Had I’d paid more attention to the GateBlu_RPi documentation, I should have noticed that the supported devices were: Pi A+, B+, 2. Now all 3 of these have something in common and something my Pi B doesn’t have. They have 40 Pin GPIO header, compared to the 26 Pin header on earlier Pi versions. This triggered one of the problems, in that it the demo setup of the GateBlu_RPi is planning on using the physical pins 12 and 34. An obstacle than can clearly be overcome by re-assigning the pin it plans to use. The second error I had related to the software being unable to determine the revision of my Pi correctly, which I’ve explained more about in this follow-up post. However I quickly hacked around this.
Working (sort of)
So with a couple of quick changes to cope with the obvious errors, I managed to get the GateBlu registered in OctoBlu.
However I couldn’t get GateBlu to recognise that this GateBlu devices was also a Raspberry Pi with GPIO pins that I might want to use. So rather than keep trying with the Pi 1, I decided for the sake around £50 (Pi 2 + Case + Micro SD Card + 40pin GPIO Cobbler) I had an excuse to buy a Raspberry Pi2 to try and get it working.
The Raspberry Pi 2
So the Pi 2 arrived and it’s certainly a lot faster to book Raspbian. I tried the GateBlu image again, but sadly had the same problem as with the Pi 1. I can register the gateway, but not access it as a Raspberry Pi. I’m OctoBlu team are working on an update, so I’ll check back then. But for now at least as a gateway device it appears to be working and I can connect to a Belkin WeMo devices on my LAN via the Gateblu.
So now I have the Raspberry Pi 2, I decided I should start to play with the GPIO capabilities. Though this I suspect this research may be curtailed when my Particle.io Photon arrives next month and that leads to a different distraction.