Mozilla WebThings on Raspberry Pi - getting started
Mozilla has made a universal hub for smart home devices to link together devices of different vendors and protocols (including Zigbee and Z-Wave), and manage them without using clouds and from one place. A year ago there was news about the first version, and today I am posting a translation of the updated documentation the other day, which answers most of the basic questions for the project. I look forward to discussions and exchange of views in the comments.
WebThings Gateway for Raspberry Pi
Mozilla's WebThings Gateway is a software for the gateways used in smart home systems, which allows direct monitoring and control of smart devices via the Internet without intermediaries.
What do you need
- Raspberry Pi computer and power supply (Raspberry Pi 3 requires at least 2A)
- microSD card (at least 8 GB, class 10)
- USB adapter (see list of compatible adapters )
Note: Raspberry Pi 3 comes with Wi-Fi and Bluetooth. A USB adapter is required to connect devices using protocols like Zigbee and Z-Wave.
1. Download the image
Download the image from the Mozilla IoT website .
2. Sew the image
- Open etcher
- Insert the memory card into the adapter of your computer.
- Select an image as the source
- Choose a memory card
- Click “Flash!”
When finished, remove the memory card.
3. Download the Raspberry Pi
- Insert memory card into Raspberry PI
- Connect USB adapters if available
- Turn on the power to start the download.
Note: The first boot of the Raspberry Pi may take 2-3 minutes.
4. Wi-Fi connection
Once downloaded, the gateway will create the “ WebThings Gateway XXXX ” access point (where XXXX is the four digits from the Raspberry Pi's MAC address). Connect to this point from your computer or smartphone.
After connecting, you should see the welcome screen of the WebThings gateway, which will then start searching for your home Wi-Fi network.
Select your home network from the list and enter the password to connect.
- If you connected to the “WebThings Gateway XXXX” access point but don’t see the welcome screen, try opening the page at 192.168.2.1 .
- The Raspberry Pi can also be connected to the network using an Ethernet cable. In this case, it will try to get the IP address of the network from your router automatically. Then type in the browser “http: //gateway.local” for the initial configuration of the gateway.
- If you move the gateway to another place or it loses access to the original network, it will automatically switch to the access point mode so that you can connect to it and configure another network.
5. Subdomain selection
After connecting the gateway to the network, make sure that your computer or smartphone from which you are setting up is on the same network. After that, go to the gateway.local address in the browser.
After that, you will have the option to register a free subdomain to access the gateway outside the local network through a secure tunnel from Mozilla.
Enter the desired subdomain and email address (to reset the password in the future), and click Create.
- You can skip this step and use the gateway completely locally, or by configuring port and DNS forwarding yourself. However, in this case, if in the future you still decide to use the Mozilla subdomain, you will have to completely reset the gateway settings.
- If the page at gateway.local does not open, try to find the IP address of the gateway through your router (look for a device like “gateway” in the list of connected devices or with a MAC address starting with “b8: 27: eb”), and try to open the page directly over IP.
- If gateway.local and http: // do not work, make sure that both your computer and the Raspbeery Pi are connected to the same network.
- If you have already registered a subdomain earlier, enter its name and the email address that you used when registering it. The screen will show instructions for gaining access.
6. Create an account
After registering the subdomain, a page opens with the following steps for configuring the gateway. Enter your name, email address and password, and click “Next”.
Note: Additional accounts can be created later.
After that, the “Things” page should open to connect smart devices to the gateway.
See the WebThings Gateway User Guide for further configuration.