Category Archives: thingstud.io

A Fresh Pi2 Start

pi2

The thing about rushing in with something new is that you tend to bring your learning mistakes with you.

Firstly for new readers, why am I fascinated with the Raspberry Pi? Well I’ve been working on IOT for some time now and I’ve tried out many ideas most of which you’ll see blogged about in here. I originally used an Atmel 1284 based solution of my own (own board, own software) to control a number of Atmega328-based boards by short range radio. Indeed right now I have 3 properties – two here in the Northeast and one in Spain which are using this successfully. But there were a lot of range issues with the radios and I was running out of steam with the 1284s and along came the ESP8266 chips… This opened up so many possibilities but I really needed something more powerful at the helm without spending more money (many have heard me say “I’m not spending £60 to switch a lightbulb”) – and in the nick of time along came the Raspberry Pi2 – which for £30 is a bargain even though you really have to learn just a little Linux to make good use of it.

The Raspberry Pi 2 was so new to me a matter of weeks ago (never had the original Pi) that I loaded the entire kitchen sink onto it. In anticipation that this might happen I bought a second Pi2. That gave me all sorts of issues, stalled keyboard, memory problems.. I w2as convinced it was the microSD chip… then I realised the other day that this could all be put down to a lousy power supply! I replaced that with something meaty and I’ve never looked back.  Mindful of the fact that my 32Gb microUSB drive for the first Pi2 was taking an hour or more to back up I went out and bought a Sandisk Extreme 16Gb and an Anker USB3 adaptor and that really made a difference – but still I was basing everything on a bloated software base. So this week I sat down and started from scratch.

You can save many, many megabytes by un-installing the rubbish that comes with the Pi2, that Wolfram thing which I cannot imagine any use for, the games etc. Having stripped the Pi down to essentials I then installed Webmin (and if you are not using this, why not?) – which by its nature needs PHP and MQSQL to run – and that’s fine as I have a use for both (graphing). When fitting the WIFI dongle to the board (who wants another wire) I realised I could do with the equivalent of the Windows WiFi properties window and stumbled on Conky – I’ll let you research that one. I then installed Mosquitto with some help from Mike at ThingStud.io (and others) and finally with LOADS of help from the guys responsible for Node-Red, put that up (the installation is very different to my first attempt).

With all of that in place and all the latest updates (courtesy of Webmin) I’ve barely used over 3.5GB which is excellent because as time goes on the size of the microSD will start to shrink if nothing else because these devices have limited lives and the more expensive chips have intelligence on-board to move data around as parts of the chip die. I’m hoping to get several years of life out of this when I’m done so the more spare capacity the better.

So there we are, a clean start on which to build my ESP8266 and Arduino-based home control.

Facebooktwittergoogle_pluspinterestlinkedin