Mozilla WebThings is Mozilla’s open-source implementation of the Web of Things, including the WebThings Gateway and the WebThings which connects real-world objects to the internet. This allows you to create smart devices for your home and control them remotely without the need for middle man applications.
- Slide the Raspberry Pi into the base of the plastic case ensuring that you align and insert the power, HDMI and audio ports into their respective openings.
- Position the Raspberry PI so that it sits on the mounting points of the case.
- Slide the case’s lid into position and push it all the way in.
- Fully insert the pre-flashed micro SD card.
- Connect the power cable to the port shown above.
- Plug the power supply into a socket.
- Wait for your Pi to boot, this can take up to 3-4mins.
- From your host computer or smartphone, look for and connect to WebThings Gateway in your available networks. Its SSID will be WebThings Gateway XXXX
A window will appear displaying available WiFi networks.
- Select your network and enter the password when prompted and click Connect.
You can skip this step if you’ll only be using the gateway locally or if you’ll be manually configuring DNS. If you skip it and change your mind later on, you’ll need to re-flash the micro-sd card in order to register a subdomain.
- From a computer or smartphone connected to the same network as your gateway, point a browser to http://gateway.local/
- Enter a subdomain in the relevant field. Make sure that it’s something memorable.
- Enter a valid email address in the email field.
- Click Create.
The system will process your request, this will take a little while
Once you’ve created a subdomain, you’ll be presented with the user account window. A user account is how you’ll access the gateway to manage your devices.
- Fill in all the fields and click Next.
You’ll be presented with a blank screen bearing the message No devices yet.
The WebThings Gateway uses an add-on system to let it understand how different connected devices and services work. For each type of device or service, you’ll need to install and configure the relevant add-on so the gateway can use it to discover and connect to them. This example shows how to install the Weather add-on so you can connect to an open weather information service and display current conditions.
- Click on the menu icon on the top left and navigate to Settings>Add-ons.
- Click on the + icon on the bottom right. You’ll be presented with an alphabetical list of add-ons.
- Navigate to the Weather add-on and click Add.
After a little while, the add-on will display as Added and you’ll get a message saying that no locations are configured.
- Click on the back arrow. This will take you to the list of installed add-ons.
- Find the Weather add-on and click Configure.
- Click on + under Locations.
- Enter the name of the location you want to track and its latitude and longitude, you can find that information here.
- Set the units that you want to use. You can leave the default Open-WeatherMap API key selected.
- Click on Apply.
- Click on the back arrow twice and then select Things from the menu.
- Click on the + to scan for devices. This should discover the Weather thing with your specified location name.
- Click Save.
You should now be able to view weather data by going to the main Things page to see the installed Weather thing.
You now that you have your WebThings up and running, You can refer to the following resources for further functionality and configuration: