Last year, when Monterail decided to change their office to be a bigger and better-designed place , they decided that it should also be smarter. I was introduced to the team as a person who could make this happen. I collaborated with Monterail during the renovation of their new home and then finally joined the team.
Such a huge project cannot start without a good, long workshop about our needs and requirements. After a thorough workshop we decided to have the following features:
- light control,
- conference and call room occupancy signalization,
- individual access codes for the main doors for each team member in a centralized database,
- audio system with a wireless music streaming option,
- separate, manageable audio experience in the restroom,
- five TVs with the ability to manage the content displayed on them,
- kitchen LED lamp color management,
- ability to control everything via a web application (desktop, mobile, phone and panels mounted on the walls).
After that, the automation system project was done and the whole office concept was ready to be implemented in real life. The entire hardware side of the smart office had taken place during the construction work done by the renovation crew. Of course, there were some small complications during whole venture, but everything ultimately ended up as we wanted.
Most automation systems we found were built based on PLCs– due to their reliability and strict manufacturing restrictions.
“Let’s do something new, something that we haven’t seen on the Internet before.”
After some consideration we put our bet on Raspberry Pi. We debated about reliability as we couldn’t find a project based on RaspberryPi that big. We wanted to find out if it’s possible. And we did.
There is one master Raspberry Pi which controls all of the low-level hardware. To accomplish this we had to create two kinds of custom devices:
- The first one we called the “distribution board”: distribute power and provide connectors that connects all peripherals: the RPi itself, movement sensors, door lock, etc.
- The second device is a relay driver board. Relay is like a wall switch but instead of turning it on and off by hand you put voltage onto it. There is one relay for each light group which makes over 30 pieces to handle the entire Monterail office.
The main unit also runs a web server with a Web Application that allows to control all of the smart features.
This function is achieved by a regular movement sensor mounted in each room. Signals are gathered in the device described above.
There are five additional Raspberry Pis connected to separate TVs. They are all independent showing mostly funny memes or websites with meaningful information.
This was achieved by simply running Chrome in kiosk mode on each device. Chrome Debugging Protocol is used control it from the web (that is the main Raspberry Pi).
On some occasions (e.g. keynotes during events available to the public) we knew we needed an image from the projector to be shown on the TVs. Instead of rewiring the whole system, we made a simple hack: a bunch of HDMI switches and splitters connected together created the ability to change the TV source from Raspberry Pis. We can now use the Web Application to control if we display the projector on each TV independently.
We ended up having high quality speakers all around the office mounted in the ceiling. The owner of the building gave us them for free as our office space used be shopping area before we took all the walls down.
We divided them in multiple sections and connected to a broadcasting amplifier. Two of the Raspberry Pis are connected to the amplifier and run DLNA and AirPlay servers. Thanks to this, everyone connected to our WiFi can stream music wirelessly to a specific audio section. It works great after-hours.
Additionally, we have external speakers with a separate RPi in the restroom. It has an Internet radio player installed and a simple API exposed which allows to control it with our smart office Web Application. A nice touch to walk into a restroom and hear radio playing. The choice of Internet radio played in restroom is meticulously managed by people on #music Slack channel.
When someone joins Monterail it is required that they have a separate access card to office doors. Adding a new card by hand would be annoying, but since there is a possibility to connect a card reader to an external device…
We hooked it up with our main Raspberry Pi and set up a database with every employee matched with their card number and access code. This setup allows us to add new cards simply by inserting it into the database.
We have a custom-made RGB LED lamp in the kitchen formed in shape of the Monterail logo. It came with an IR remote to control it the colour palette.
Remote? We use Raspberry Pi to precisely control the colour it via our Web App, too. Connecting wires directly into an IR socket and emulating the remote with ready-to-go libraries was easier that you might think.
Controlling whole office from a computer or mobile phone is very handy, but what if we don’t have any of these devices with us? Lights can be controlled in an analog way, but we wanted to have the whole system within reach.
We came up with the idea of Android-driven tablets on the walls near strategic rooms. Each is running the same app that you’d find on the desktops. They can also display a room occupancy calendar so everyone can see the nearest availability of the room.
- The light control set up is fail-safe. If something with the RPi goes terribly wrong, we could still operate the lights in the “classic” analog way.
- The entire hardware setup had taken place during the construction work. I worked side by side the renovation crew and it was fun. Of course there were some small complications during whole venture but everything ultimately ended up as we wanted.
People would think that using Raspberry Pi in a system of that scale is crazy. They are too many things that may go wrong.
Now, after a year from launching our smart office system based on 7 Raspberry Pis we know there is nothing to be afraid of!
This system is, for sure, not ready to be mass-produced and implemented. Modules will need to be standardized and the RPi should be used in a “Computed Module” version. But it proves a point. An RPi can be used for much more complicated tasks than blinking LEDs or streaming video. It can manage your entire office!
Do you have similar experiences with Raspberry Pi or other systems? Or do you have bad ones? Feel free to ping me in the comments!