How to build your own private smart home with a Raspberry Pi and Mozilla’s Things Gateway

Last year we announced Project Things by Mozilla. Project Things is a framework of software and services that can bridge the communication gap between connected devices by giving “things” URLs on the web.

Today I’m excited to tell you about the latest version of the Things Gateway and how you can use it to directly monitor and control your home over the web, without a middleman. Instead of installing a different mobile app for every smart home device you buy, you can manage all your devices through a single secure web interface. This blog post will explain how to build your own Web of Things gateway with a Raspberry Pi and use it to connect existing off-the-shelf smart home products from various different brands using the power of the open web.

There are lots of exciting new features in the latest version of the gateway, including a rules engine for setting ‘if this, then that’ style rules for how things interact, a floorplan view to lay out devices on a map of your home, experimental voice control and support for many new types of “things”. There’s also a brand new add-ons system for adding support for new protocols and devices, and a new way to safely authorise third party applications to access your gateway.

Hardware

The first thing to do is to get your hands on a Raspberry Pi® single board computer. The latest Raspberry Pi 3 has WiFi and Bluetooth support built in, as well as access to GPIO ports for direct hardware connections. This is not essential as you can use alternative developer boards, or even your laptop or desktop computer, but it currently provides the best experience.

If you want to use smart home devices using other protocols like Zigbee or Z-Wave, you will need to invest in USB dongles. For Zigbee we currently support the Digi XStick (ZB mesh version). For Z-Wave you should be able to use any OpenZWave compatible dongle, but so far we have only tested the Sigma Designs UZB Stick and the Aeotec Z-Stick (Gen5). Be sure to get the correct device for your region as Z-Wave operating frequencies can vary between countries.

You’ll also need a microSD card to flash the software onto! We recommend at least 4GB.

Then there’s the “things” themselves. The gateway already supports many different smart plugs, sensors and smart bulbs from lots of different brands using Zigbee, Z-Wave and WiFi. Take a look at the wiki for devices which have already been tested. If you would like to contribute, we are always looking for volunteers to help us test more devices. Let us know what other devices you’d like to see working and consider building your own adapter add-on to make it work! (see later).

If you’re not quite ready to splash out on all this hardware, but you want to try out the gateway software, there’s now a Virtual Things add-on you can install to add virtual things to your gateway.

Software

Next you’ll need to download the Things Gateway 0.3 software image for the Raspberry Pi and flash it onto your SD card. There are various ways of doing this but Etcher is a graphical application for Windows, Linux and MacOS which makes it easy and safe to do.

If you want to experiment with the gateway software on your laptop or desktop computer, you can follow the instructions on GitHub to download and build it yourself. We also have an experimental OpenWrt package and support for more platforms is coming soon. Get in touch if you’re targeting a different platform.

First Time Setup

Before booting up your gateway with the SD card inserted, ensure that any Zigbee or Z-Wave USB dongles are plugged in.

When you first boot the gateway, it acts as a WiFi hotspot broadcasting the network name (SSID) “Mozilla IoT Gateway”. You can connect to that WiFi hotspot with your laptop or smartphone which should automatically direct you to a setup page. Alternatively, you can connect the Raspberry Pi directly to your network using a network cable cable and type gateway.local into your browser to begin the setup process.

First, you’re given the option to connect to a WiFi network:

 

If you choose to connect to a WiFi network you’ll be prompted for the WiFi password and then you’ll need to make sure you’re connected to that same network in order to continue setup.

Next, you’ll be asked to choose a unique subdomain for your gateway, which will automatically generate an SSL certificate for you using LetsEncrypt and set up a secure tunnel to the Internet so you can access the gateway remotely. You’ll be asked for an email address so you can reclaim your subdomain in future if necessary. You can also choose to use your own domain name if you don’t want to use the tunneling service, but you’ll need to generate your own SSL certificate and configure DNS yourself.

You will then be securely redirected to your new subdomain and you’ll be prompted to create your user account on the gateway.

You’ll then automatically be logged into the gateway and will be ready to start adding things. Note that the gateway’s web interface is a Progressive Web App that you can add to homescreen on your smartphone with Firefox.

Adding Things

To add devices to your gateway, click on the “+” icon at the bottom right of the screen. This will put all the attached adapters into pairing mode. Follow the instructions for your individual device to pair it with the gateway (this often involves pressing a button on the device while the gateway is in pairing mode).

Devices that have been successfully paired with the gateway will appear in the add device screen and you can give them a name of your choice before saving them on the gateway.

The devices you’ve added will then appear on the Things screen.

You can turn things on and off with a single tap, or click on the expand button to go to an expanded view all of all the thing’s properties. For example a smart plug has an on/off switch and reports its current power consumption, voltage, current and frequency.

With a dimmable colour light, you can turn the light on and off, set its colour, and set its brightness level.

Rules Engine

By clicking on the main menu you can access the rules engine.

The rules engine allows you to set ‘if this, then that’ style rules for how devices interact with each other. For example, “If Smart Plug A turns on, turn on Smart Plug B”.

To create a rule, first click the “+” button at the bottom right of the rules screen. Then drag and drop things onto the screen and select the properties of the things you wish to connect together.

 

You can give your rule a name and then click back to get back to the rules screen where you’ll see your new rule has been added.

Floorplan

Clicking on the “floorplan” option from the main menu allows you to arrange devices on a floorplan of your home. Click the edit button at the bottom right of the screen to upload a floorplan image.

You’ll need to create the floorplan image yourself. This can be done with an online tool or graphics editor, or you can just scan of a hand drawn map of your home! An SVG file with white lines and a transparent background works best.

You can arrange devices on the floor plan by dragging them around the screen.

Just click “save” when you’re done and you’ll see all of your devices laid out. You can click on them to access their expanded view.

Add-ons

The gateway has an add-ons system so that you can extend its capabilities. It comes with the Zigbee and Z-Wave adapter add-ons installed by default, but you can add support for additional adapters through the add-ons system under “settings” in the main menu.

Click the “+ Add” button on any add-on you want to install.

For example, there is a Virtual Things add-on which allows you to experiment with different types of web things without needing to buy any real hardware. Click the “+” button at the bottom right of the screen to see a list of available add-ons.

Click the “+ Add” button on any add-ons you want to install. When you navigate back to the add-ons screen you’ll see the list of add-ons that have been installed and you can enable or disable them.

In the next blog post, you’ll learn how to create, package, and share your own adapter add-ons in the programming language of your choice (e.g. JavaScript, Python or Rust).

Voice UI

The gateway also comes with experimental voice controls which are turned off by default. You can enable this feature through “experiments” in settings.

Once the “Speech Commands” experiment is turned on you’ll notice a microphone icon appear at the top right of the things screen.

If the smartphone or PC you’re using has a microphone you can tap the microphone and issue a voice command like “Turn kitchen on” to control devices connected to the gateway.

The voice control is still very experimental and doesn’t yet recognise a very wide range of vocabulary, so it’s best to try to stick to common words like kitchen, balcony, living room, etc. This is an area we’ll be working on improving in future, in collaboration with the Voice team at Mozilla.

Updates

Your gateway software should automatically keep itself up to date with over-the-air updates from Mozilla. You can see what version of the gateway software you’re running by clicking on “updates” in Settings.

What’s Coming Next?

In the next release, the Mozilla IoT team plans to create new gateway adapters to connect more existing smart home devices to the Web of Things. We are also starting work on a collection of software libraries in different programming languages, to help hackers and makers build their own native web things which directly expose the Web Thing API, using existing platforms like Arduino and Android Things. You will then be able to add these things to the gateway by their URL.

We will continue to contribute to standardisation of a Web Thing Description format and API via the W3C Web of Things Interest Group. By giving connected devices URLs on the web and using a standard data model and API, we can help create more interoperability on the Internet of Things.

The next blog post will explain how to build, package and share your own adapter add-on using the programming language of your choice, to add new capabilities to the Things Gateway.

How to Contribute

We need your help! The easiest way to contribute is to download the Things Gateway software image (0.3 at the time of writing) and test it out for yourself with a Raspberry Pi, to help us find bugs and suggest new features. You can view our source code and file issues on GitHub. You can also help us fix issues with pull requests and contribute your own adapters for the gateway.

If you want to ask questions, you can find us in #iot on irc.mozilla.org or the “Mozilla IoT” topic in Discourse. See iot.mozilla.org for more information and follow @MozillaIoT on Twitter if you want to be kept up to date with developments.

Happy hacking!

 

Editor’s note: Want to get started hacking? Here are a couple of projects to get you started:

 

About Ben Francis

Former Mozilla Software Engineer. W3C Invited Expert on Web Applications and the Web of Things.

More articles by Ben Francis…


75 comments

  1. Ilya

    > “connect the Raspberry Pi directly to your network using a network cable cable and type”

    That’s an extra cable I don’t have! ;)

    February 6th, 2018 at 14:51

    1. Mike Kienzle

      Spend a dollar and buy one?

      February 7th, 2018 at 03:51

      1. brent

        Whoosh!

        February 8th, 2018 at 18:08

  2. laoshaw

    does this project from mozilla have anything to do with the old “web of things”:
    https://webofthings.org/

    February 6th, 2018 at 15:07

    1. Ben Francis

      > does this project from mozilla have anything to do with the old “web of things”: https://webofthings.org/

      Yes, actually we are working very closely with the founders of that website via the W3C Web of Things Interest Group on defining standards for the Web of Things. This is an ongoing evolution of the Web of Things, including their Web Thing Model member submission from 2015 http://model.webofthings.io/

      February 6th, 2018 at 15:51

  3. Phil

    I have google home and prefer to use that for my voice UI. How does this work with google home?

    Secondly, this seems like a GUI version of hass.io for automation. Is this a competitor to hass.io or complementary?

    February 6th, 2018 at 23:19

    1. Ben Francis

      There is no Google Home integration yet, but it should be possible if Google Home can call the REST/WebSockets API on the gateway. We have already demonstrated this is possible using Alexa.

      Things Gateway has many similar functions to Home Assistant. There are Mozillians who contribute to that project and I hope that we might be able to share adapter code, and maybe even converge on a common Web Thing API (https://iot.mozilla.org/wot/)

      February 7th, 2018 at 14:07

      1. Brendon Kozlowski

        Came looking to see if this was the case. Very, very glad to hear that it is. TYVM to your team(s) for all of this! Including attempts at standardization with protocols. That’s *huge*. I’m a current SmartThings owner, but will be keenly watching this space.

        February 8th, 2018 at 09:50

  4. Patrick

    Thank you for the introduction!
    Is there an overview of how Project Things is different from other Home Automation solutions like FHEM, openHAB or Home Assistant (and why one should use one or the other?)?

    February 7th, 2018 at 02:11

    1. Ben Francis

      The Things Gateway is built from the ground up to support the Web of Things. OpenHAB is written in Java and Home Assistant is written in Python. Things Gateway is written in JavaScript (NodeJS), but adapters run in a separate process and can be written in any language (e.g. JavaScript, Python, Rust…).

      OpenHAB and Home Assistant are more mature projects which already have support for a wide range of devices. Things Gateway exposes the Web Thing API and arguably has a friendlier UI. We hope it will eventually have very broad hardware support via the Web of Things.

      February 7th, 2018 at 14:13

  5. John Doe

    Rules engine questions:
    Is this limited to primitive rules like IFTTT is or can I nest IF statements and use AND/OR to link more than one trigger/condition? Can I set more than one action to result from a trigger/condition, such as wait and set levels & colors? Can I set & use variables and while-do loops? Can I post notifications back to the app or send SMS?

    If I can’t do these things it’s not ready to replace what I’ve got.

    February 7th, 2018 at 07:21

    1. Ben Francis

      The rules engine only supports very simple rules so far, but this is quickly improving. We’ve also been able to integrate IFTTT via the OAuth support if you’d prefer to use that in the meantime.

      February 7th, 2018 at 14:14

  6. Martin

    Looking at how the interface is to use based, does the standard image support directly using a touchscreen on the RPi?

    February 7th, 2018 at 07:48

    1. Ben Francis

      It is intended that a separate device like a smartphone, tablet or smart display will act as a web client to the web server running on the gateway. But there’s no reason you couldn’t run a web browser on the same Raspberry Pi if you wanted to, with a connected touchscreen. The Things Gateway is based on Raspbian Lite and doesn’t have a graphical front end, so you’d have to install all the required packages or build your own OS image based on the full version of Raspbian.

      February 7th, 2018 at 14:17

  7. Tomasz Waraksa

    Would it be possible to have my numerous Raspberrys themselves available as Things, so that I can remotely control them from the dashboard? Things like reboot, run script etc. would be extremely useful for managing that little army.

    February 7th, 2018 at 07:50

    1. Ben Francis

      Certainly. Those Raspberry Pis would need to expose the Web Thing API (https://iot.mozilla.org/wot/) via an HTTP or WebSocket server. We’re currently working on software libraries in different programming languages to make it easier to build what we call “native web things” like this. For example, you could run a Python web server on the Raspberry Pis which hosts a Web Thing Description and a REST API which you can send an HTTP POST to request a “reboot” action.

      February 7th, 2018 at 14:19

  8. Grand Master P

    Are there add-ons available for smart locks (like Schlage Connect)?
    If not, can I use code for a smartthings z-wave device handler and use it on this platform?

    February 7th, 2018 at 12:19

    1. Ben Francis

      There’s no support for any smart locks yet, but we are in discussions with device makers. It may be possible to re-use existing open source code to build a Z-Wave adapter (or extend the existing one) to support smart lock devices.

      February 7th, 2018 at 14:20

  9. Linus

    How about razberry wave module via the GPIO pins?
    And any message broker support? MQTT or maybe the more secure XMPP.
    Homekit / Homebridge?
    And the ability to make if and or nested statements is a must.

    February 7th, 2018 at 14:25

    1. Ben Francis

      Not yet, I recommend you file these as feature requests on GitHub so other people can express their interest too and hopefully someone will write adapters. There is already an issue for HomeKit.

      https://github.com/mozilla-iot/gateway/issues

      February 8th, 2018 at 01:39

  10. Daniel

    I installed it and booted it up was am disappointed by a few things.

    I seem to be having a few issues. I can’t install the extension for Tp-Link. It consistently fails and I see no option for debugging.

    Second: The update screen appears not to load at all. I can click on it but there’s nothing there.

    February 7th, 2018 at 14:35

    1. Ben Francis

      Discourse is a good place to go for support https://discourse.mozilla.org/c/iot or find the team in #iot on irc.mozilla.org

      If you think you’ve found a bug that you can consistently reproduce then please file an issue on GitHub https://github.com/mozilla-iot/gateway/issues

      February 8th, 2018 at 01:42

  11. Mike Hankey

    Tried to get this working on Raspberry Pi 3 B+
    When I tried to download the 0.3 code from mozilla.iot.org – Link broke, tried FF,Chrome and IE.
    So I downloaded the zip file and flashed to SD card, booted and connected to “Mozilla IoT Gateway” and tried going to gateway.local – 404, configured wifi manually and was able to connect pc browser to IP address and got the “Choose a secure web address for your gateway” page, entered the information and clicked Create and the processing text is shown and nothing happens/dead link. When I click skip I get “TypeError: NetworkError when attempting to fetch resource.”
    I am a retired programmer and hobbyest and would love to get this to work and get involved.

    February 7th, 2018 at 16:16

    1. Ben Francis

      > When I tried to download the 0.3 code from mozilla.iot.org – Link broke, tried FF,Chrome and IE.

      Where is the broken link you found and what URL does it point to? If it was on the website please file a bug here https://github.com/mozilla-iot/mozilla-iot.github.io

      > connected to “Mozilla IoT Gateway” and tried going to gateway.local – 404

      When you connect to the Mozilla IoT WiFi hotspot it should behave as a Captive Portal and automatically show you a setup screen (not at gateway.local at that point). It may be that didn’t work on your OS, can you please file a bug on the gateway wifi setup repository with steps to reproduce and what OS you’re running? https://github.com/mozilla-iot/gateway-wifi-setup/issues

      > was able to connect pc browser to IP address and got the “Choose a secure web address for your gateway” page, entered the information and clicked Create and the processing text is shown and nothing happens/dead link. When I click skip I get “TypeError: NetworkError when attempting to fetch resource.”

      It sounds like your Raspberry Pi was having networking issues. If possible you may have more success if you plug it in with an Ethernet cable. If you keep having this problem then please file a bug in the gateway repository https://github.com/mozilla-iot/gateway/issues

      If you have further issues Discourse is a good place to go for support (https://discourse.mozilla.org/c/iot), or find the team in #iot on irc.mozilla.org

      February 8th, 2018 at 01:51

  12. Alex

    Having a litttle trouble – can’t get to the GUI. On boot I get this:

    Rasbian GNU/Linux 9 gateway tty1
    gateway login:

    Tried a bunch of things – no luck. Got the login and password info?

    February 7th, 2018 at 17:44

    1. Ben Francis

      The gateway is designed to be used as a headless web server, not by plugging in a monitor. Please follow the steps in this blog post to set up the gateway and access the web interface from your web browser.

      February 8th, 2018 at 01:53

  13. Nick

    This is a very exciting project. Consumer level home automation offerings suffer from extreme fragmentation. Home Assistant and OpenHab have helped in trying to wrangle the world together.

    Providing the tunneling and SSL cert with zero configuration is a big selling point for usability (home assistant is moving to a subscription fee in order to provide this functionality), but the number of available adaptors will need to grow quickly.

    I’m looking forward to seeing what adaptors the Mozilla IoT can get out in the next release, and taking a look at your next blog on how to create adaptors — I might be able to port over some of the custom components I use for Home Assistant.

    February 7th, 2018 at 19:22

    1. Ben Francis

      That sounds great! The next blog post will explain in more detail how to build an adapter, but there’s some information to get you started here https://github.com/mozilla-iot/wiki/wiki/Adapter-IPC and there’s an example on GitHub https://github.com/mozilla-iot/example-adapter

      February 8th, 2018 at 01:55

  14. Darryl K

    Will I be able to hang an ESP8266 or Arduino off of a serial port on the PI and gather data from an Arduino or ESP8266 that is collecting data from, say, a DIY weather station?

    February 7th, 2018 at 19:22

    1. Ben Francis

      Yes, you may need to create your own gateway adapter if you use your own messaging format over the serial port (see the links in the comment reply above).

      Alternatively we are working on a software library for Arduino modules which have networking capabilities are powerful enough to expose the Web Thing API themselves, so you can turn them into native web things and just add them to the gateway by their URL! http://iot.mozilla.org/wot/

      February 8th, 2018 at 01:58

  15. Garnet

    Are there any plans in the works for an MQTT link? That may open up a lot of doors for a number of developers.

    February 8th, 2018 at 07:43

    1. Ben Francis

      An MQTT adapter on its own isn’t particularly useful because it’s just a messaging protocol, we need to figure out particular devices that can communicate via MQTT and be exposed as a Web Thing via WebSockets.

      If you have ideas about devices which speak MQTT which could be bridge to the Web Thing API, please do file an issue on GitHub.

      February 8th, 2018 at 09:49

  16. Trevor Olsson

    Couldn’t connect to Pi using gateway.local.

    Worked using internal IP address 192.168.1.191

    February 8th, 2018 at 08:26

    1. Ben Francis

      Sometimes the mDNS broadcasts take a while to propagate and aren’t supported by all operating systems (e.g. Android). If the problem persists please file a bug including what operating system you’re using.

      February 8th, 2018 at 09:50

  17. James Taylor

    The appliance was easy to download and install.
    One big question I have is setting up a network configuration.
    I want to be able to set a static IP so that I can set up internal/external DNS.
    Is this planned for future release?

    February 8th, 2018 at 09:02

    1. Ben Francis

      The Raspberry Pi image is built on Raspbian so you can log in and configure the network on the command line if you want to (e.g. https://www.modmypi.com/blog/how-to-give-your-raspberry-pi-a-static-ip-address-update). You’ll need a serial cable, or to enable SSH by dropping a file called “ssh” onto the boot partition (it’s disabled by default). username: pi password: raspberry (please change the default password if you enable SSH).

      In future there may be a UI in Settings for network configuration.

      February 8th, 2018 at 09:54

      1. Chase Farmer

        Hello, Ben

        Could you go into a little more detail as to how to enable ssh on the pi? I’ve done it before using raspiconfig and running raspbian, but not sure how to do it running this OS. Thanks!

        February 19th, 2018 at 16:59

        1. Ben Francis

          The gateway is running Raspbian, so it’s the same.

          See https://github.com/mozilla-iot/wiki/wiki/Logging-into-the-Raspberry-Pi

          February 20th, 2018 at 03:26

  18. Lars

    Awsome project guys, thank you!
    Looking forward to see more adapters for common IOT devices (Ikea Tradfri, Bluetooth thermostats, 868mHz sensors, 433mHz switches,…).

    Is there any native android or ios app in development?

    February 8th, 2018 at 09:33

    1. Ben Francis

      No current plans for a native app, but we are throwing around some ideas. The web interface is a progressive web app though so you can add to homescreen to get an app icon on some operating systems.

      IKEA bulbs should be supported by the Zigbee adapter very soon, if not already, BTW.

      February 8th, 2018 at 09:56

  19. Frederick Blais

    I’m really glad Mozilla are working on something like this. Me and a friend did something a bit similar : a Raspberry Pi “gateway” communicating with different Arduino “devices” with gpio, sensors and actuators being the “properties”. Everything is setup on an Ethernet network with cheap ENC28J60 modules on the Arduino side to establish an UDP communication with the Raspberry Pi. All the source code is there : https://github.com/speccy88/Domotique2

    I would be interested in converting my code that polls the Arduino by Ethernet into an “adapter” so that our hardware could be made to work with your Things Gateway. This would prevent re-inventing the wheel on my part.

    I wonder how stuff like a LED display board that can show text strings could be controlled. I feel that “Thing Type” should be extensible for custom properties.

    Concerning the rules engine, I think it would be nice to have access to the list of properties our gateway has access to and be able to write more complicated triggers like
    (garage_temperature < 15 OR house_temperature < 20) AND heating_master_switch

    I would also like to see log graph capabilities on properties!

    February 8th, 2018 at 15:10

    1. Ben Francis

      Yes you could write an adapter to talk to Arduino devices over UDP. We’re also now working on a library to help you build a “native web thing” with the higher end Arduino boards that can support a full TCP/IP stack and expose the Web Thing API themselves. You’ll then be able to add them to the gateway by URL. See https://github.com/hobinjk/esp8266-wot for an early example.

      Thing types are intended to be extensible. You can just give your device the generic type “thing” and give it whatever properties you want. In future you should be able to define your own external thing types using semantic annotations (https://iot.mozilla.org/wot/#extensibility-with-json-ld).

      More complex rules and data logging are both on our backlog!

      February 16th, 2018 at 11:30

  20. Jan

    Good job, Men. Is support for storing in database and easy read back for graph (grafana) or via any programing cods? I am currently storing all the history in sql influxdb and I can set some the rules as predicted. Thanks

    February 8th, 2018 at 20:05

    1. Ben Francis

      Not yet, but data analytics is on our backlog. You could try to write you own third party application to do this which requests access to the gateway via OAuth and logs data over a WebSocket.

      February 16th, 2018 at 11:31

  21. john

    Hello.
    I am sorry if English is wrong because I am not good at English.
    This is a very wonderful technology!
    I set up the Things gateway and connected the hue bridge to the same network as the things gateway.
    But things gateway will not find hue bridge.
    Please tell me how I can recognize it.

    February 9th, 2018 at 03:13

  22. Kristian Polso

    Awesome stuff guys!

    Does the Things gateway have support for local GPIO-powered addons? It would be awesome to get support for f.ex. DHT22 temp sensor to get local temperature data.

    https://pisavvy.com/temperature-sensor-dht22

    February 9th, 2018 at 04:49

    1. Ben Francis

      Yes, but currently only simple devices like LEDs or relays. See https://discourse.mozilla.org/t/configuring-gpio-pins/25349/2

      February 16th, 2018 at 11:32

  23. kajmaj

    Really good job. Is there any chance to have Sonoff smart devices implemented into the project? (there are multiswitches, humidity/temperature controlled switch, gate controller etc.) ESP8266 based, Wifi/433Mhz, cloud operated.
    They work perfectly with Amazon Alexa, Google Assistant, IFTTT, Google Nest or with proprietary eWeLink.
    It would be great to have them implemented.
    Once more thaks for your work.

    February 9th, 2018 at 05:14

  24. Ben Francis

    Thanks for all the feedback so far!

    Please use Discourse for support questions (https://discourse.mozilla.org/c/iot) and GitHub for feature requests (https://github.com/mozilla-iot/gateway/issues), that way you’re likely to get a quicker answer.

    February 9th, 2018 at 06:37

  25. Guy McSwain

    Very cool, I’m ready to try it out. A question though, are you (Mozilla) providing a DNS service (subdomain) with secure tunnel for free or are there restrictions or fees associated now or in the future?

    February 9th, 2018 at 23:10

    1. Ben Francis

      Yes, Mozilla is currently providing subdomains and a secure tunneling service for free. We currently have no plans to charge for this service as it is experimental, but I can’t guarantee that will always be the case. It depends how popular it gets and what business model might grow up around it in future.

      But you can always opt out of the tunneling service and configure your own DNS and your gateway will continue to work. It doesn’t depend on the tunneling service to work.

      February 16th, 2018 at 11:36

  26. Harvey King

    Function wise, this look very similar to Home Assistant / OpenHAB.

    My question for you is: Functionality wise, what are you trying to do differently than Home Assistant / OpenHAB?

    February 11th, 2018 at 21:42

    1. Ben Francis

      I’m not familiar with all the features of Home Assistant and OpenHAB, but two things the Things Gateway has is experimental speech commands and a floorplan view of your home. But the main difference is that it’s built from the ground up to support the Web of Things.

      February 16th, 2018 at 11:37

  27. Markus

    This looks amazing… I have always been wondering why all other solutions out there do not care for privacy.
    Is a private solution to a smart watch? One that I could use with this framework?

    February 12th, 2018 at 01:22

  28. tj

    Would I run into any issues trying this on an extra Pi, while also running home assistant on a different pi as my main driver for now?

    This isn’t quite ready for me to use but I’d love to follow it and try it, can it run side by side with others without issue?

    February 12th, 2018 at 11:35

    1. Ben Francis

      If you don’t want to use the provided OS image, you can check out and run the gateway from GitHub by following the instructions here https://github.com/mozilla-iot/gateway/blob/master/README.md

      February 16th, 2018 at 11:38

  29. Ajay

    Sounds interesting. How can I utilize my existing google mini and amazon echo dot to take advantage of this?

    Thank you

    February 12th, 2018 at 12:44

    1. Ben Francis

      Not yet, see https://github.com/mozilla-iot/gateway/issues/654 and https://github.com/mozilla-iot/gateway/issues/655

      February 16th, 2018 at 11:39

  30. robert

    exactly what i have been looking for!
    i want local control like in the old “X-10” days….(kids ask your granddad)

    i’m excited about this as a hobby project for my home and farm…..

    is there a basic intro place for newbies?

    do you buy one zigbee dongle ….or one for each device?
    will a wemo smart plug work? …..does it need a dongle?

    i need a -plug in- type garage heater to turn off when the garage door is open.
    that is very basic but we have to start somewhere!

    thank you much

    February 13th, 2018 at 14:02

    1. Ben Francis

      You just need one Zigbee dongle to act as a Zigbee controller for a number of devices. See the wiki for the list of hardware that has been tested so far https://github.com/mozilla-iot/wiki/wiki/Supported-Hardware

      February 16th, 2018 at 11:40

  31. GUY FAUQUEMBERGUE

    Hi Everybody,

    Nice I have a couple of questions:
    Connectivity :
    What about the rasbee from Dresden Elektronik and the razberry from z-wave me
    Language
    Since i am French (nobody is perfect) I would like to know if you support other languages than English. Best regards, Guy.

    February 15th, 2018 at 06:50

    1. Ben Francis

      I don’t think Raspbee will work yet.

      There is a chance that RaZberry might work because it is supported by OpenZWave, but as far as I know nobody has tested it yet.

      See https://github.com/mozilla-iot/wiki/wiki/Supported-Hardware for the latest supported hardware status.

      February 16th, 2018 at 11:44

  32. Ben

    Hi guy’s,
    I’m using Domoticz on Raspberry Pi too…
    This project seem’s similar : isnt’is useless to reinvent it ? Could’nt you make an association ?
    Excuse my english : i’m a little frenchy ! (Yes, nobody’s perfect…)
    Best regards.

    February 16th, 2018 at 06:09

  33. Zan

    Hi,

    I have installed the mozillas things gateway on Raspberry Pi and now I am wondering if you support Bluetooth Low Energy (BLE). I can’t find the sensor when scanning.

    Best regards,

    February 16th, 2018 at 10:53

    1. Ben Francis

      We don’t support any Bluetooth/BLE devices yet, the main problem is that they don’t have any standard adopted smart home profiles we can support like Zigbee and Z-Wave do. But given the Raspberry Pi 3 has Bluetooth built in, it should be possible to create an adapter to talk to your BLE devices.

      See https://github.com/mozilla-iot/wiki/wiki/Supported-Hardware for the latest list of supported hardware.

      February 16th, 2018 at 11:47

  34. Fred

    Hello All,

    Super awsome but security security security and IoT…

    Rooting in https://readwrite.com/2018/01/31/the-key-iot-security-questions-you-need-to-ask/

    Please help me save some time and answer these 7 questions:

    1. The hardware-based root of trust: Does each device have a unique identity that is inseparable from the hardware?
    2. Small trusted computing base: Is most of the device’s software outside its trusted computing base?
    3. Defense in depth: Does your device software have multiple layers of protection built-in?
    4. Compartmentalization: Are you using hardware-enforced barriers to stop failures from propagating to other components?
    5. Certificates-based authentication: Do your devices use certificates (vs. passwords)?
    6. Renewable security: Can the device’s software be updated automatically to a more secure state?
    7. Failure reporting: Do you have a solution in place to report software failures to the manufacturer?”

    Thx,

    Fred

    February 18th, 2018 at 06:40

    1. Ben Francis

      I will try to answer your questions the best I can. But please note that as stated on the download page, this software is in still in an experimental stage, *not fit for production use*, and has not had any in depth formal security reviews yet.

      > 1. The hardware-based root of trust: Does each device have a unique identity that is inseparable from the hardware?

      This is really up to the device makers. Our gateway implementation bridges existing smart home devices to the Web of Things. But many devices like ZigBee, Z-Wave and WiFi devices do have a unique ID like a mac address.

      > 2. Small trusted computing base: Is most of the device’s software outside its trusted computing base?

      Please can you define your understanding of “trusted computing base”?

      > 3. Defense in depth: Does your device software have multiple layers of protection built-in?

      API requests use HTTPS from the client to the gateway, tunneled through an SSH tunnel from a cloud server to the gateway. Devices themselves may also use encryption on the local network (e.g. AES encryption for Zigbee, WPA for WiFi).

      > 4. Compartmentalization: Are you using hardware-enforced barriers to stop failures from propagating to other components?

      No. But gateway adapters run in separate operating system processes to help isolate them from the main gateway process.

      > 5. Certificates-based authentication: Do your devices use certificates (vs. passwords)?

      TLS certificates are used, and JWT tokens for API requests. Usernames and passwords are used for user authentication.

      > 6. Renewable security: Can the device’s software be updated automatically to a more secure state?

      Yes, we provide an OTA update system for the gateway software. We currently rely on the underlying operating system’s package manager for OS updates (apt in the case of Raspbian).

      > 7. Failure reporting: Do you have a solution in place to report software failures to the manufacturer?”

      Yes, on GitHub https://github.com/mozilla-iot/gateway/issues

      We are aware of some areas that security could further be improved, but know that at Mozilla we take security very seriously and this is an ongoing concern.

      February 20th, 2018 at 03:04

  35. Steph

    Hi Ben
    Thank you for taking the initiative and producing this very cool application.

    I’m working on Bluetooth 5 and Bluetooth ANT and I’d like to interface my nRF52832-based applications to this.

    I haven’t had time to look at the code in depth, and would be very interested in your response. What would it take to add a “driver” for a bespoke application (using a BLE or ANT ANT+) dongle?

    Thank you.
    Steph

    February 20th, 2018 at 16:42

    1. Ben Francis

      See this blog post for information on creating an adapter add-on https://hacks.mozilla.org/2018/02/creating-an-add-on-for-the-project-things-gateway/

      Feel free to ask any questions in Discourse https://discourse.mozilla.org/c/iot

      February 21st, 2018 at 08:03

  36. bob

    Hi Ben,

    Very cool project and kudos to all involved.

    On my todo list and watching the development … any plans for a Modbus protocol interface .. for such things as solar panels etc.

    Historical trend graphing would be a killer app.

    cheers

    February 22nd, 2018 at 15:12

    1. Ben Francis

      Hi, a “time series database” is on our backlog but I don’t think anyone is working on that yet (https://github.com/mozilla-iot/gateway/issues/173)

      I don’t think anyone is looking at Modbus, feel free to file an issue https://github.com/mozilla-iot/gateway/issues

      February 23rd, 2018 at 04:13

  37. Harry

    Hello.. very interesting and hassle free procedure to install. I hope it progresses well.. however after the initial installation I moved my raspberry pi 3, so it restarted. Now I can’t get to connect either through the subdomain or the local IP.

    February 23rd, 2018 at 23:04

    1. Ben Francis

      Hi Harry, you can get help via the support forum on DIscourse https://discourse.mozilla.org/c/iot

      February 26th, 2018 at 04:31

  38. Camilo Martin

    This seems like a very good initiative, but it has a few major pitfalls:

    1) You’ve released an IoT standard “to lay the groundwork” way, waaay after everybody else attempted at solving this problem. Thus, it falls to the “yet another standard” problem (https://xkcd.com/927/). IoT isn’t new (heck, even home automation isn’t new either) and to get people who already use other solutions to give them up for the benefits of an open standard will be a lot harder than if you weren’t jumping on a bandwagon years after everybody else.

    2) The only benefit this has is that Mozilla is doing it. It seems limited to basic GUI actions, extensibility seems like an after-thought (it should be code-centric! Everybody who needs a GUI already has one), and you’re specifically tying it to the Raspberry Pi (again, this would have worked several years ago, but have you seen just how many boards are out there already?)

    3) This looks more like a libre product than an open standard. It has no focus on the code, on making your own things from Arduinos/ESPs/etc, and it all-around looks dumbed down, which again, would only work if people who need that wouldn’t already have bought their big-brand solutions.

    4) To take this long, you could have waited another few months and released a solid 1.0 version. Showing off this alpha-stage GUI leaves a bad impression. There should be a lot of focus on how to help build/extend on top of this. Like the philosophy Firefox pioneered, of having to install the add-ons you like, and empowering people to build those, to create what’s new and transform what’s stale.

    All that said, I wish this becomes something makers will be eager to use; I don’t think there’s any other demographic Mozilla can appeal to at this point, and at the same time it would have a strong impact by appealing to it.

    February 27th, 2018 at 08:36

    1. Ben Francis

      Thank you for sharing your opinions.

      > 1) You’ve released an IoT standard “to lay the groundwork” way, waaay after everybody else attempted at solving this problem. Thus, it falls to the “yet another standard” problem (https://xkcd.com/927/). IoT isn’t new (heck, even home automation isn’t new either) and to get people who already use other solutions to give them up for the benefits of an open standard will be a lot harder than if you weren’t jumping on a bandwagon years after everybody else.

      Mozilla hasn’t “released a standard”, that isn’t how standards are created. Mozilla is one of over a hundred participating member organisations of the Web of Things Interest Group at the W3C including hardware manufacturers, software developers and service providers https://www.w3.org/WoT/IG/

      The Web of Things is not new, in fact the Web of Things community has existed for over 10 years. Mozilla is just a recent participant since standardisation started at the W3C.

      It’s important to understand that the idea of the Web of Things is not to compete with existing protocols like ZigBee, Z-Wave, Bluetooth, HomeKit and Weave but rather to provide a unified application layer which runs on top of them. Web technologies like HTTP, REST, JSON, SSL and OAuth are already a de-facto standard for commercial IoT cloud services and gateways, they’re just used in slightly different incompatible ways. We are working with the developers of many of these existing systems and contributing to work on a standard data model and API to enable ad-hoc interoperability and develop best practices around privacy and security.

      > 2) The only benefit this has is that Mozilla is doing it. It seems limited to basic GUI actions, extensibility seems like an after-thought (it should be code-centric! Everybody who needs a GUI already has one), and you’re specifically tying it to the Raspberry Pi (again, this would have worked several years ago, but have you seen just how many boards are out there already?)

      Project Things is certainly not tied to the Raspberry Pi. We already have a port for Openwrt and are looking at supporting a wide range of hardware, Raspbery Pi is just a convenient first target for our initial audience of hackers and makers. Extensibility through the use of add-ons and a schema-based system for web thing types is core to the project. We welcome contributions in porting to more developer boards.

      > 3) This looks more like a libre product than an open standard. It has no focus on the code, on making your own things from Arduinos/ESPs/etc, and it all-around looks dumbed down, which again, would only work if people who need that wouldn’t already have bought their big-brand solutions.

      As explained in the announcement blog post (https://hacks.mozilla.org/2017/06/building-the-web-of-things/) the Things Gateway is just one component of Project Things which is intended to bridge existing off-the-shelf smart home devices to the web. We are currently also working on a device framework with re-usable software libraries for building native web things with existing platforms like Arduino and Android Things.

      > 4) To take this long, you could have waited another few months and released a solid 1.0 version. Showing off this alpha-stage GUI leaves a bad impression. There should be a lot of focus on how to help build/extend on top of this. Like the philosophy Firefox pioneered, of having to install the add-ons you like, and empowering people to build those, to create what’s new and transform what’s stale.

      Mozilla works in the open by default. Our work on a Web of Things gateway has been available on GitHub since the very first commit around a year ago and 0.3 is the fifth release so far. We will continue to work in the open, release early and release often and we encourage community contributions to help create a solid 1.0 version which more people can enjoy.

      February 28th, 2018 at 05:18

Comments are closed for this article.