This blog post will walk you through how to build your very own Raspberry Pi home automation gateway using the Mozilla Things Gateway software. For this project we will be using the a Raspberry Pi 3, but you can also use a Raspberry Pi Zero W should you want to.
Source: Build a Raspberry Pi Home Automation Hub using Mozilla’s Things Gateway | Raspberry Pi HQ