What is IoT?

The Internet of Things (IoT) is any device which is connected to the internet, although usually the term is used to refer to ‘smart’ devices – those that can undertake actions without a user present. An example would be a smart thermostat such as Nest or Hive – these devices can be controlled using a web browser/application from anywhere in the world. The end user device sits on a home network which then controls the heating/hot water system (and further systems can also be linked in as needed).

There has been some negative press recently with regards IoT devices – as they do rely on both the internet and the service being up to work, events like the recent AWS outage can cause numerous devices to fail. However, IoT does also open up huge possibilities for updating devices that have previously been ‘dumb’ – for example, enabling your heating to turn on when the system detects you’re at home (and turn off again when you leave), which could save huge amounts of energy. Here’s one way we’ve used similar technology to help us improve a day-to-day process at Box UK.

The problem we wanted to solve

When we moved into our current office around eight years ago, the only way to remotely open the front door was using a number of intercoms that were spread out through the office. Due to the office layout that we wanted, these didn’t end up being near any desks. So, each time the front door needed to be opened for a client/visitor there would be a mad rush to get to the intercom (often by several people on multiple floors). We also had no effective way to identify who was at the front door – relying on a poor vocal relay only. And, as our reception was not on the ground floor, it was impossible to see the front door visually.

Other solutions we explored

We did look at buying an off-the-shelf system, but this would have required us to replace the locking system along with the fob entry system that we already had for staff . We also looked at mounting a camera to at least give us a video feed, but it wasn’t possible to link this into the telephone system that we already were using to open the front door.

The solution we implemented

We purchased a separate door entry system from 2CN, and while the door release system didn’t work with the door that we had we were able to link the door entry system into our existing VOIP/SIP technology (Freepbx/Asterisk). This meant that when the intercom button was pressed it would dial into our phone system, enabling us to speak to the person at the front door. The 2CN system also had a camera within the housing – and we took this stream and integrated it into an internal webpage system, so that we could also see who was at the front door. This fixed two of the problems above – no longer was there a rush to get to the intercom system, and once the call had been answered we knew somebody from Box UK had dealt with the client/visitor. The only thing we couldn’t do remotely was unlock the door, as this was still linked to the old intercom system.

The intercom system within the building was of an old analog type – when a button is pressed, it joins the circuit and the magnetic door lock releases, allowing the door to open. All we needed to do was enable this to happen, remotely, for each user that was given access to the above “frontdoor” system. We ordered one of the original Raspberry Pi boards and a relay board in order to connect this to the analog door entry system. All we needed now was a piece of software to enable us to change the GPIO pins – which would fire the relay and be wired into the current door release system (ensuring that the old intercoms would still work if required).

We found a web-based interface for the Raspberry Pi GPIO pins written by Google and release as open source (GNU GPL v3) here, which did pretty much what we wanted. All we had to do was host this on the Raspberry Pi, feed in the camera feed and end up with the following:

Front Door app

Clicking the Turn On button would activate the relay for 8 seconds, opening the front door.

So now the process is as follows:

  • Client/visitor presses front door button
  • Intercom system goes through into our phone server where it goes through to a ring group especially for “front door access”
  • Phone picked up by somebody, who loads the frontdoor control as above
  • Once the client/visitor has been verified by both voice and picture the front door is opened for them remotely
  • Visitor/client can then be greeted at reception

Next steps

Next, we wanted to limit access to the front door control as we found that the Raspberry Pi couldn’t handle a large number of streams on it at any one time. We added in Active Directory authentication using Apache authLDAP which we then restricted down to an LDAP group we named “Front Door Access”. This prevented any users that didn’t have phones, etc. from viewing the front door by mistake.

In summary

While this isn’t a smart device and doesn’t have automatic updating/cloud connectivity, it wouldn’t be hard to put this online (securely) to enable any of our users to remotely VPN into our network and then open this door as required. The total cost of this system (excluding the front door intercom) was just £40 and some time to get each of the components to work with each other. We also implemented a very similar system for the office’s garage door, as we were limited by the number of remote fobs available from the landlord. As before, we created a web application for this using a Raspberry Pi – showing just a little of what can be achieved with this technology.

If you want to learn more about what it’s like to work at Box UK take a look at the Why Join Us? section of our website, and check out our current vacancies to see if we have a place for you on the team.

About the Author

Alistair Gibbs

Head of IT Alistair has been working in the industry for the past decade both in the UK and Europe, supporting internal and external clients in various roles. Operating within a fast-paced environment, Alistair is experienced in numerous technologies such as Amazon Web Services, Windows Servers, Switching, Firewalls, Desktops, and everything in between.