My Vision of a Smart Building Operating System

I have a vision of a smart building operating system.

A whole building operating system, built on web technologies, which weaves together every sensor, actuator and human-computer interface in a building into a seamless user experience.

Smart Building OS User Interface

This vision builds on everything I’ve learnt from working on Webian, Firefox OS and Mozilla WebThings.

Rather than a single desktop or mobile computer, the OS is designed to operate over many different pieces of hardware spread throughout a building.

Hub, Terminals and Devices

Every terminal is a web client, every device has a URL and a hub acts as a central web server.

OS Architecture

Hub

The hub is a central computer for the building.

Hub

This central computer is inspired by the “ship computer” trope and similar ideas often portrayed in science fiction (e.g. the duotronic ship computer from Star Trek, Holly from Red Dwarf, HAL 9000 from 2001: A Space Odyssey, Eddy from The Hitchkiker’s Guide to the Galaxy, KITT from Knight Rider or The Great Machine from Forbidden Planet1).

It acts as a central hub for monitoring, controlling and automating a building. Think of it as a permanent electrical appliance, like a boiler or a fuse box, but for information rather than heat or electricity.

As a long term vision, imagine the hub hosting a semi-autonomous software agent with a conversational voice interface and an interactive 3D model of the building. As a starting point, a server for hosting 2D graphical web applications.

Hub Architecture

Fundamentally the hub is a web server which hosts web applications and stores user data. Each application is isolated inside its own sandboxed container which includes all of the dependencies the application needs and can be atomically updated. Both the host operating system and applications receive automatic over-the-air updates. A reverse proxy sits in front of all the applications and routes HTTP requests to the correct application.

Hub UI

The first of those applications, the “killer app” and default home page of the OS, provides a unified web interface for monitoring, controlling and automating all of the connected devices in the building. It does this by bridging a range of different smart home protocols and commercial building management systems to a single standardised Web of Things API using the Web Thing Protocol, which is then consumed by the web front end. Third party apps and services can also request access to this API.

Terminals

Terminal

“A computer terminal is an interface where the mind and body can connect with the universe and move bits of it about.” — Douglas Adams, Mostly Harmless

Terminals could be a smart display or smart TV (think tabs, pads and boards), or even a smart speaker or VR headset. These are devices which provide a human-computer interface through vision, audio or touch.

Terminals act as web user agents which enable users to interact with the web applications hosted on the hub, but also discover and use installable web applications from anywhere on the World Wide Web.

Terminal Architecture

On the front end is a shell for discovering and using web applications. On the back end are core services which provide the shell with access to hardware such as network adapters, displays, cameras, speakers and microphones.

Terminal UI

The shell communicates with the core services using the Web Thing Protocol. This also means that terminals can act as web things themselves, so that they can be remotely controlled over the network.

Devices

Devices

Devices are the sensors and actuators which interface with the physical world. That could be a motion sensor, door sensor, smoke alarm, smart socket or a light bulb for example.

Devices may natively be web things, or may be bridged to the Web of Things by the hub, from a range of different protocols like Zigbee, Z-Wave, HomeKit, Matter, BACnet and Modbus.

Either way every device has a URL on the Web of Things which acts as a globally unique identifier and resolves to a machine readable WoT Thing Description. The Thing Description describes the capabilities of the device in a machine readable format and provides URL endpoints with which to communicate with it.

Implementation

Interested? Come and join us in the WebThings open source community where Krellian are building the key components which will eventually make up “Krellian OS”, including WebThings Gateway and WebThings Shell.


  1. The name Krellian is actually inspired by the 1956 science-fiction film Forbidden Planet. Krellian meaning “of or belonging to the Krell”. The Krell were an ancient alien race who created “The Great Machine” on Altair IV, a vast underground machine controlled by thought and capable of monitoring and affecting change throughout the whole planet. The machine continued to function autonomously for thousands of years after the Krell themselves went extinct. It serves as both an inspiration and a warning. ↩︎

A New Future for the WebThings IoT Platform


Originally posted on Medium.

After four years of incubation at Mozilla, Krellian is proud to become the new commercial sponsor of WebThings, an open platform for monitoring and controlling devices over the web.

Today we are announcing the release of WebThings Gateway 1.0 and setting out a vision for the future of the WebThings project.

WebThings

WebThings is an open source implementation of emerging W3C Web of Things standards and consists of three main components:

  • WebThings Gateway — a software distribution for smart home gateways which enables users to directly monitor and control their home over the web, without a middleman
  • WebThings Framework — a collection of re-usable software components to help developers build their own web things which directly expose the Web Thing Protocol
  • WebThings Cloud — a collection of cloud services for securely deploying connected devices and remotely managing them over the internet

Flying the Nest

Following a company restructuring in August, Mozilla was looking for a new home for the WebThings community to continue their work.

Having co-founded the project whilst working at Mozilla, I joined discussions with two of my former colleagues Michael Stegeman and David Bryant about spinning out WebThings as an independent open source project. We worked with Mozilla on an agreement to transition the project to a new community-run home at webthings.io, and have spent the last three months working together on that transition.

WebThings Gateway 1.0

Today marks the public release of WebThings Gateway 1.0 and the formal transition of the WebThings platform to its new home at webthings.io. Going forward, Krellian will be sponsoring the new WebThings website and replacement cloud infrastructure, to continue to provide automatic software updates and a secure remote access service for WebThings gateways around the world.

You can read more about the 1.0 release and the transition of existing gateways to the new infrastructure on the Mozilla Hacks blog.

Krellian & WebThings

Krellian’s mission is to “extend the World Wide Web into physical spaces to make our built environment smarter, safer and more sustainable.” WebThings provides an ideal open source platform, built on web standards, to help achieve that mission.

In the short term Krellian will be leveraging the WebThings Cloud remote access service as part of our new digital signage platform. In the longer term we plan to explore other enterprise use cases for the WebThings platform, to help make buildings smarter, safer and more sustainable.

These commercial applications of WebThings will help provide revenue streams to support the long term sustainability of the open source project and allow it to continue to develop and grow.

The WebThings Community

Krellian highly values the thriving community who have supported the WebThings project over the last four years. From hackers and makers to educators and hobbyists, the community have been pivotal in building, testing and promoting WebThings around the world.

Amongst their achievements is the translation of WebThings Gateway into 34 spoken languages, the creation of over a hundred gateway add-ons and the building of countless DIY projects in a dozen different programming languages. Community members have contributed their time and effort to help build and promote WebThings and support other members in using it in thousands of private smart homes around the world.

We intend to support the community to continue with their great work, and have put in place an open governance structure to distribute decision making and foster leadership amongst the global WebThings community.

Future Roadmap

The following are some ideas about where to take the platform next, but we’d also very much like to hear from the community about what they would like to see from the project going forward.

W3C Compliance

WebThings has been developed in parallel with, and has contributed to, the standardisation of the Web of Things at the W3C. Since the last release of WebThings Gateway in April, the W3C Thing Description specification has reached “recommendation” status and is now an international standard.

We’d like to work towards making WebThings compliant with this standard, as there are still a remaining number of differences between the W3C and Mozilla specifications. In order to fill in the gaps between Mozilla’s Web Thing API and the W3C’s Thing Description standard, we plan to continue to lead work on standardising the Web Thing Protocol as a concrete protocol for communicating with devices over the web.

Production Gateway OS

The main WebThings Gateway software image is currently built on top of the Raspbian Linux distribution. This served the project well for its initial target of DIY smart home users, using the popular Raspberry Pi single board computer.

As the platform matures, we would like to explore a more production-quality IoT operating system like Ubuntu Core or Balena OS on which to base the WebThings Gateway distribution.

This will have the following benefits:

  1. A smaller footprint, reducing the minimum system requirements for running the gateway
  2. Enabling the targeting of a wider range of hardware for consumer and enterprise use cases
  3. Better security, through containerisation and automatic software updates for the underlying operating system

WebThings Controller

There was previously a project to build controller software for WebThings, to run on a controller device such as a smart speaker or smart display. The initial prototype was built on Android Things, but was discontinued when Google locked down the Android Things platform to specific OEMs and introduced restrictions on how it could be used.

Krellian would like to explore new controller software built on our open source Krellian Kiosk web runtime, which could allow for touch and voice input. This software would be designed so that it could either run on the same device as the gateway software, or on a separate controller device.

WebThings App

A native WebThings mobile app could act as a general purpose Web of Things client. This could potentially:

  1. Help to streamline the setup process of a WebThings Gateway
  2. Act as a client for native web things which don’t need a gateway
  3. Help with the standardisation process by providing a user friendly reference implementation of a Web of Things client

WebThings Cloud

Finally, we would like to explore expanding the WebThings Cloud offering. This could include an online dashboard for monitoring and controlling devices across multiple premises, and cloud to cloud integrations with other IoT platforms and voice assistants.


We’re excited about this new chapter in the WebThings story, and look forward to working closely with the community on our vision of a connected world where technology is seamlessly woven into the spaces around us and improves the lives of those who use it.

You can find out more about WebThings at its new home of webthings.io, follow @WebThingsIO on Twitter and sign up for the email newsletter to keep up to date with all the latest news.