Reading Hotspot project report

hotspot device and power supply

Earlier this year Thingitude bid for some funding from Reading Council to develop an Internet of Things project with students throughout the summer holidays as part of Reading 2016 Year of Culture. A couple of months later I was told the bid was successful!

Reading 2016 Year of Culture
 

(gulp) – what did I promise?!!

“We will create a live heat-map of Reading’s arts events, that shows the size of the audience at each event, and allows audience members to rate the event and share it on social media. We will provide the data to the venue owners and artists so they can see how big an impact the event had, and how it compares to other events.

For publicly funded events it will provide a direct, objective measure of the impact of the event, and therefore an indication of the value delivered through the funding.

This is delivered through developing a device that is installed in each venue (whether indoors or outside), and counts the number of mobile phones in the area as an estimate of audience size. The devices will use The Things Network to send their data to an app that presents the data in a useful way to artists, venues and allows audiences to rate the event.”

Ok, so we need to design, develop, test and deliver:

  • An app for the public that shows the venues on a map, and how many people are currently in the venue
  • An app for the venue owners so they can see over time which days, times, events are busy and which are quiet
  • A few devices that count mobile phones as a proxy for people, and then sends that data via wireless to the internet
  • Some kind of database to hold all the information
  • …oh, and the small matter of finding some students and a place to work

Now I respond well to a challenge, but in my day job the project budget is normally such that I can hand-pick a couple of top notch team members which sets the project up to succeed from the outset. And even if I can’t hand-pick the team, at least *I* know what I’m doing so can steer things along pretty well. Not so in this project – the joy of the Internet of Things is that it is all new and largely unexplored.

What could possibly go wrong..?

Getting started

Finding a place to work was supremely easy – our local collaboration, incubation and co-working hub offered me desk space before I could even ask. I am very grateful to GROW@GreenPark for their extraordinary hospitality and the residents for their friendship and generosity throughout our stay.
It was an amazing base for our project
.

Finding students – not so easy. Reading University has closed most of its computer science and systems engineering research (because…?!), and disappointingly I didn’t get a single applicant from the University. So my plan for genius geeky undergrads knocking out a couple of apps in a few weeks needed rethinking. Luckily we have UTC Reading – the first university technical college to be rated as “Outstanding” by Ofsted – and their Physics teacher often comes to Reading Geek Night. He put me in touch with their head of IT and within a couple of days I had a handful of applicants. Hmm, how should I interview 17/18 year olds? – ooh, lets run a hackathon and see if they are any good!

Slight aside – I feel very fortunate that ICL (remember them? – the UK’s answer to IBM) took me on as an A-Level student and trained me up for two years. It was a fantastic opportunity and in hindsight an incredibly brave thing to do – putting this grinning idiot in front of customers, installing computers, swapping broken parts… I was so young and knew nothing, yet they paid me well – £7k including London weighting in 1987 was pretty good going, and in real terms much better than 18 year olds are getting on today’s “modern apprenticeships”. And the training was superb. More of this please modern companies!

attendees at the Thingithon
Team Thingithon!

The thingithon was fun. Four students turned up and after a quiet start gradually opened up over the course of the day. It was a pretty steep learning curve, but they just about got the hang of the challenge I’d set by the end of the day and I was happy I could work with them.

They all said YES – so I had a team: Kieron, Sam, Simon and Tom. Tom is a year older and off to university at the end of the summer, whereas the other 3 have another year of A Levels to go. What I didn’t have was any computers! Frustratingly the college didn’t want them installing software on their school laptops, and wouldn’t flex the rules, so I had to beg/borrow the necessary kit propranolol pills 20 mg. Reading geeks and a brother in law came to the rescue! Many thanks to Ant, Ferg, Peter and Tom for lending us their spare old laptops – you saved the project 🙂

Whiteboard solution design
Whiteboard solution design

The first few days were spent describing the project aims, writing up the user stories, flows and sketching a data model. The next big challenge – find a common programming language. It turns out that C and PHP aren’t so popular with the cool kids these days, which was a bit of a problem because the starting point code I’d written for the device was all in C, and the code I’d written for the server and web apps was all PHP. And the students *really* wanted to create mobile apps not web apps, so PHP was not a good candidate. Kieron, Simon and me did a bit of research on possible languages/frameworks while Sam got to grips with my C code and Tom started designing circuit boards.

The apps and programming choices

We settled on Meteor.js as the platform of choice. You write your code in Javascript, and the server side stuff runs on Node.js so that’s Javascript too, which means we need to learn just the one language and the Meteor framework. Plus the bonus – one set of code will give you a web app, an Android app and an IOS app. We win! Kieron set to work on the public/audience app and Simon took on the venue owner app.

bababa
The public/audience app with a map of venues

Programming has an odd relationship with time. You can spend days grinding through one seemingly simple feature, and then flash through the next 5 features in a couple of hours. It’s unpredictable, intensely frustrating, and you flip from feeling like a fool to a champion and back again. Over the weeks we all stumbled, got stuck, and then flew …sometimes straight into a wall! Kieron, Simon and me all struggled for a couple of weeks getting to grips with Meteor. Its biggest failing in my view is that it is so brittle – as in it breaks easily (and it ALL breaks); but it breaks silently with hardly any error messages, just a blank screen and a shrug.

Poor Sam struggled for a couple of weeks with C, and then rewrote everything on the device in Python. So now I had to learn Python. I may have complained about this. Sam didn’t mind, his stuff was beginning to work nicely. I remember spending several hours getting really annoyed at stupid Python because I couldn’t see how to convert my string into hex, which is straightforward in C (maybe half a dozen lines of code). So annoying, stupid langua… hey, what I just put “.encode(‘hex’)” on the end of the string? Oh, yeah that works. Hmmm…

I love Python.

I *quite* love Meteor too – it is frustrating when it breaks, but it breaks less often once you know what you’re doing. Funny that. Figuring out how to deploy it into production and for mobile phones is another battle with dodgy documentation, but worth the struggle!

Venues app shows todays data (or this week,month etc)
The venues app shows today’s data (or this week,month etc)

The back-end

Obviously we used The Things Network to connect our devices to the internet. The Things Network publishes our sensor data using Mosquitto (aka MQTT) and my server subscribes to the feed with the right security credentials and receives the data. I am please to say it works like a dream!

I chose MongoDB as the database to hold all the sensor data – it loves the JSON data from The Things Network, and it works really well with Meteor.
My original collector program was written in PHP, but seeing as everything else is javascript I rewrote it in node.js for consistency, along with an aggregator program.

The hotspot device

The “thing” in our Internet of Things project needed a collection of sensors on a circuit board. Over the summer Tom took it from this:

Lots of wires, LCD display
The hotspot prototype (all my own work, excuse the mess!)

…through a few iterations…

Hotspot board v1 - not helped by me ordering rather large capacitors by mistake!
Hotspot board v1 – not helped by me ordering rather large capacitors by mistake!
Hotspot board v2 - it works, but a few snags to fix
Hotspot board v2 – it works, but a few snags to fix

…to this:

The v3 board!  Much neater and now has curved corners to please the professionals :-)
The v3 board! Much neater and now has curved corners to please the professionals 🙂

We encountered a few problems along the way, which Tom overcame with each revision of the board. One of the local residents at GROW, Luke – gave Tom a masterclass in soldering and let him use his professional soldering kit which was incredibly helpful. We also uncovered some strange quirks of circuit board designers – they are very passionate about curved corners and dressed screw-holes. Who knew? Anyway, I think you’ll agree the circuit board is looking a lot better and a lot neater than when I started!

Tom beavering away with the soldering station
Tom beavering away with the soldering station

To finish it off we commissioned Alex from ADMG Consulting to design and 3d-print a case for us. Alex runs his 3d printer business out of GROW – he designs and builds 3d printers as well as designing items to print. This case has some very nice features including grooves for cables, angled holes for the sensors, built in mounts on the back, and a rainjacket for the mobile/outdoor version.

Here’s part of the case being printed:

The front cover being printed
The front panel being printed

…and here is the finished item. Ta-da!

hotspot device and power supply
The finished hotspot device!

The big questions

1. YES – it works. Not perfect, but perfectly good enough to start using. You can download it to your android phone or use the web app if you prefer – I’d love your feedback, but right now please use the Example quiet venue – I’ll keep that one running until I install the devices for the Council and we start using it for real.

2. YES – absolutely I would work with students again. I feel lucky with these 4 – all very bright, all happy to argue for their own ideas, all added a great deal to the project. It took a little while for them to realise that I was only searching Google and Stack Overflow to solve their problems, and it was easier all round if they did that themselves and only come to me with the bigger things to solve. It also took a little while for them to confidently try out new stuff without really knowing what they are doing. School does not teach these things, but that’s fine because they are all quick learners. Obviously they are not yet super high performing professionals, but their attitude was superb, they were 100% reliable, and I hope I get to work with them again.

3. YES – you can buy a hotspot for your venue! Get in touch 🙂

Reading Hotspot project launches

This week saw the launch of the Reading Hotspot project for Reading 2016 Year of Culture.

Four students from UTC Reading are working with Mark Stanley from The Things Network Reading to develop Internet of Things sensors that will be installed in arts centres and museums around Reading.

Mark explained the project:

“Reading’s arts scene has to work hard to get the attention of a largely commuting population. If we can better connect artists and audiences in Reading we can increase attendance at performances at venues in Reading.”

“By the end of the summer we aim to give audiences a very simple way to find out ‘Where’s hot in Reading?’ and rate the events they attend. We’ll provide the arts and culture venues with objective data that demonstrates the impact of different events, and which will support funding bids for future events.

The team(left to right): Kieron Cardall, Simon Light, Sam Kimbinyi, Tom Helyer

The team(left to right): Kieron Cardall, Simon Light, Sam Kimbiny, Tom Helyer

The team has been given a base at Reading’s collaboration incubation and co-working hub, GROW@GreenPark, and will run throughout the summer holidays. The students are using laptops donated by local geeks and supporters of The Things Network.

“Reading Hotspots is about connecting Our audiences and artists and growing the attendance at arts events in Reading, but it’s also about demonstrating that Reading is once more becoming a hub of technology innovation in the UK.” said Mark. “Reading has the biggest Things Network in the UK, it’s free to use and there is a lot of community interest in what we can do with it! I’m delighted that Reading Council is looking at low cost ways to explore Smart City technology like this, it’s very encouraging and forward thinking.”

About The Things Network

The Things Network is a global, free to use, wireless data network for the Internet of Things. It began in Amsterdam in August 2015 and has spread to nearly 200 communities around the world.
Mark Stanley and Mike Beardmore started The Things Network in Reading in December 2015, so the people, schools and startups in and around Reading can use it to build and connect their “Things” to the Internet.

Contact: Mark Stanley: mark.stanley@coraledge.co.uk or for visit https://facebook.com/ttnreading

About Thingitude Ltd

Thingitude is a non-profit organisation established to promote, support and develop community-led open source Internet of Things projects. We believe a great deal of Smart City innovation and value will come from a bottom-up community-led approach to complement the top-down consultancy-led approach. We also believe in Smart Towns, Smart Villages, and Smart Countryside!

Thingitude was successful in its bid for Reading 2016 Year of Culture funding for the Reading Hotspot project. The project is also part-funded by Coraledge Ltd.

Contact: Mark Stanley: mark.stanley@coraledge.co.uk or visit http://thingitude.com

About Reading 2016 Year of Culture

Year of Culture will be the most important cultural and creative activity undertaken in Reading in a generation. The aims of the initiative include uniting the existing arts and culture organisations in Reading, and increasing the cultural ambition of Reading to make the town a destination for arts and culture in the UK

Reading 2016 received seed funding from Reading Cultural Partnership and is supported by Reading UK CIC, the University of Reading, Reading Borough Council, Reading College, Alt Reading as well as many local arts groups and businesses.