IoT with Project Things by Mozilla
I've reviewed the beta release 0.3.0 of the Project Things by Mozilla. The goal of this project is to provide an open-source solution for home-automation.
Installation ran smoothly as expected on a Raspberry Pi 3, as per the procedure How to build your own private smart home with a Raspberry Pi and Mozilla’s Things Gateway. The only exception was about the first connection to the gateway. It should be done using the IP address and not the gateway.local as recommended. Using the IP address is required to get HTTPS connection and access from internet through https://<user>.mozilla-iot.org. The Mozilla gateway runs on a local Raspberry Pi 3 and can be accessed locally or remotely. Release 0.3.0 comes with a limited set of compatible devices (listed on the right), mostly Z-Wave and Zigbee for IoT, plus GPIOs and WiFi. Bluetooth is still under development, critical for popular sensors like the SensorTag. The interface is clean, with a main menu and limited options. I conducted four tests: GPIO adapter, playing with rules, HTTP on-off adapter, discovering features from remote devices. |
Four Tests
First Test: GPIO Adapter
I followed the procedure Configuring GPIO for use with the gpio adapter.
Actually, there are two ways of naming the pins, as per Appendix 1. A note on pin numbering. The Project Things by Mozilla relies on the GPIOs numbering, not the physical numbering. |
I declared two GPIOs:
Surprisingly, the Project Things by Mozilla provides no environment to configure the pins. So I had to open an SSH connection, dig deep into the folders hierarchy and launch a command-line utility to configure them. The parameter is a JSON file, described at Web Thing API. |
|
Here is the result.
The interface is confusing, as it is not clear whether the buttons display a state or a command.
I raised those issues at Discussion: Possible Confusion between State and Action on Devices. |
|
Second Test: Playing with Rules
Rules allow to link one device to another device. As for devices, it is not clear whether the rules transfer a state or a command. A command is just a change of state.
I wasn't able to implement a basic Flip-Flop: pressing and releasing the button once turns the LED on, pressing and releasing the button again turns the LED off, and so on. I raised those issues at Question: Do Rules Transfer State or Action. |
|
Third Test: HTTP On-Off Adapter
|
Here, the JSON file only state the name of the remote device, wifi101.local.
|
|
Forth Test: Discovering Features from Remote Devices
This is the major contribution of the Project Things by Mozilla. The gateway connects to a device, and the device describes the features it exposes.
Connecting a browser directly to the ESP8266 displays a JSON file with the list of available features as per the Web Thing API. I couldn't complete this test because the feature Add Thing by URL isn't implemented yet. |
|
Conclusion: Three Challenges
Although more a proof-of-concept than a real beta, this early release is impressive and allows to play with the interface and a set of devices.
More importantly, it provides the opportunity to get quite good an idea of the potential of the Project Things by Mozilla. |
The Metaphor Needs to Mature
Successful user interfaces are both familiar and intuitive: the challenge is to tailor the right metaphor and avoid implicit concepts.
The difference between state and action is still not clear. Clicking on a button with a lamp marked ON actually turns the lamp off. Similarly, the difference between devices with actions (like LED 17) and those passive (like Button 18) isn't clear. I'm confident the interface will address those concerns in the next releases, with a more mature metaphor. Join the conversation at Discussion: Possible Confusion between State and Action on Devices. |
|
Why Another User Interface When Solutions Exist?
Unless Mozilla has unlimited resources, I don't see the rationale for developing just another user interface. Focusing on what the project excels at —the Web Thing Description and associated features— would fasten the development and delivery of a fully functional solution.
As visitors familiar with this website already know, I'm a huge fan of Node-RED and its built-in dashboard. Why not use this tool? Join the conversation at Discussion: Scope of the Project and Re-Use of Existing Tools. |
Waiting for a Development Environment
Up to now, the user interface only addresses the end-user. I hope the project is going to include a development environment soon to ease the implementation of devices.
Again, Node-RED includes a development environment with debugging capabilities. |
Let's wish the Mozilla IoT Things team all the best for the development and release of the next versions. I hope to update this page when new iterations are available.
|
Links
Posted: Feb 21, 2018
Updated: Apr 19, 2018