WebThings Gateway a very lightweight and flexible IoT Gateway

My own home automation architecture

I was looking for a simple, lightweight, extendable (really extendable or easily programmable) and opensource software for building my own home automation system. I found WebThings Gateway and especially WebThingsIO community!


WebThings Gateway Web Interface

Responsive web interface with essentials features well organized.

  • Things: it gives me a global view of all my devices
  • Rules: it lets me easily create simple and powerful rules
  • Logs: store my sensors data and it shows me just in a plot
  • Floorplan: add your floorplan as image and organize things
  • Settings: a good settings section, the add-ons are really powerful
  • Log out: oh yeah, security! You must have credentials to access

Special feature: WebThingsIO offers you a custom subdomain on webthings.io fully auto-configured by the gateway software and you don’t need to create port-mapping rules on your router

Easy to install on linux and raspberry. On linux you enable it at startup by systemctl.


Uncompressed archive is 6.3MB only. Of course you need to install dependencies.

WebThings Gateway uses about 300MB of RAM.

WebThings Node uses about 60MB of RAM. What is “WebThings Node”? It is the Node server installed on raspberry, but let see it in deep in the following paragraph.


At the beginning I installed WebThings Gateway on my RaspberryPi until I discovered WebThings Node: there are no needs to install gateway on the Raspberry you are using as a device, just use the raspberry as device and install the gateway somewhere else!

The Gateway is the central point. It connects to every compatible device. Compatible devices are such device that implement compatible protocol/interface such as WebThings protocol.

WebThings Node expose things and you can create any-things! Do you want to expose your RaspberryPi led? Just expose it via WebThings Node and code the link with the GPIO. Here an example.
Do you need a button? Create the JavaScript class like this.

Idea: why to expose physical device only? Why don’t expose a smart read-only switch?

Video Camera

I spent a lot of time and energy on this chapter. There are no so much documentations on this, but you can read the source code because it is OpenSource!

I read the code of WebThings Gateway and I found the way to create a “thing” as video camera with snapshot and live streaming feature (HLS and DASH).

You can have a look at the code here.

My infrastructure

MacBook5,1 with:

Raspberry Pi Model B with:

Raspberry Pi Model B+ with:


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>