Embedded Computing
  • About
  • Blog
  • Hardware
    • Which Platform?
    • Controller Platforms >
      • Adafruit Platform
      • Arduino Plaform
      • BBC micro:bit
      • Espressif Platform
      • iLabs Platform
      • Raspberry Pi Platform (MCU)
      • Seeed Platform
      • Silicon Labs Platform
      • Teensy Plaform
    • Computer Platforms >
      • BeagleBone Platform
      • Raspberry Pi Platform (SBC)
      • UDOO Platform
    • Peripherals >
      • Shields
      • Grove System
      • Sensors
      • Actuators
    • Displays >
      • E-Paper Displays
      • Reflective Displays
      • TFT Displays
      • LCD Displays
    • Legacy Platforms >
      • chipKIT Plaform
      • 4D Systems Platform
      • Intel Platform
      • LaunchPad Plaform
      • BoosterPacks for LaunchPads
      • LightBlue Bean
      • Maple Plaform
      • Mediatek Platform
      • Microsoft Azure IoT DevKit
      • Particle Platform
  • Software
    • Exploring RTOS with Galaxia >
      • Event Library
      • Semaphore Library
      • Mailbox Library
      • Timer Library
      • Clock Library
      • SWI Library
      • Task Library
    • Ultra-Low Power with EnergyTrace >
      • Ultra-Low Power with MSP430
      • Ultra-Low Power with Energia MT and Galaxia
    • Using Integers Instead of Reals
    • Going Python?
  • IoT
    • IoT Platforms: Which Hardware? >
      • Matter with Silicon Labs MG24
    • IoT Services: Which Solution? >
      • Recommended IoT Solutions
      • Platform-Specific IoT Solutions
      • Other IoT Solutions
      • Not tested IoT Solutions
      • Notification Solutions
    • Get Date and Time from Internet with NTP
    • Fast and Easy WiFi Connection with QR-Code
  • Tools
    • How to Start?
    • Reference >
      • Asking for Help
      • Boards Pins Maps
      • Ruler
      • Boards and Plugs
      • I²C Logic Level Converter
      • Standards for Connectors
    • Training >
      • Texas Instruments Workshops
      • Embedded Systems: Shape The World — MOOC edX UTAustinX UT.6.02x
      • Embedded Systems - Shape The World: Microcontroller Input/Output — MOOC edX UTAustinX UT.6.10x
      • Embedded Systems - Shape The World: Multi-Threaded Interfacing — MOOC edX UTAustinX UT.6.20x
      • Real-Time Bluetooth Networks: Shape the World — MOOC edX UTAustinX UT.RTBN.12.01x
      • Systems Thinking with Texas Instruments Robotics System Learning Kit
    • Books >
      • Getting Started with the MSP430 LaunchPad
      • Getting Started with Arduino
      • Arduino Cookbook
    • IDE >
      • The Battle of IDEs
      • More Options
      • Assessing the Next Generation of IDEs
      • Tools for Documentation
    • Equipment >
      • Saleae Logic Analyser
      • Rigol DS1102E Oscilloscope
      • XDS110 Debug Probe with EnergyTrace​
      • Segger J-Link Programmer-Debugger
      • Nordic Power Profiler Kit II
  • Projects
    • Libraries >
      • Master I²C Software Library
      • Date and Time Library
      • highView Library Suite
      • Others Libraries
    • smartDevices >
      • I²C smartColours Smart Sensor
      • I²C smartRFID Smart Sensor
      • I²C smartLED Display
      • I²C smartControls Smart Device
      • I²C smartWiFi Smart Device
      • I²C smartBLE Smart Device
      • I²C smartNode Smart Device
    • IoT Projects >
      • Remote E-Paper Weather and Message Board
      • Typie-Walkie with LoRa and E-Paper Screen
      • Typie-Walkie with E-Paper Screen
      • Remote e-Paper Pictures Panel
      • Remote e-Paper Messages Panel
      • Industrial IoT Project
      • Remote Contactless Temperature Monitor
      • Using Node-RED for IIoT
      • Low Power Home Network Weather Monitoring
      • Updated Low Power Home Network Weather Monitoring
      • Weather and Security Station with Blynk
      • SensorTag to Blynk Using Node-RED
      • Pervasive Reporting
    • AI Projects >
      • Colour Recognition with Neural Network
    • Other Projects >
      • Air Quality Monitoring
      • Driving a Large E-Paper Display with a Compact Xiao RP2040
      • Low-Power E-Paper Weather Station
      • Portable Particulate​ Matter Monitor
      • FRAM-based E-Paper Screen Controller
      • General Purpose 3.5" Screen
      • Colour Recognition with Neural Network
      • A Low Power Weather Station
      • Digital Volt-Amp-Watt Meter
      • Mobile Measurement with LCD Display
      • Screen with SRAM for GUI
      • Volt-Amp-Watt-Meter for Grove
      • Multi-Touch Project with CapTIvate

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.
Picture
Picture

Four Tests

First Test: GPIO Adapter

The first test was conducted using the GPIO adapter, with two GPIOs connected to a bread-board: 
  • pin 17 as output for LED,
  • pin 18 as input for button.

Picture
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.
Picture
I declared two GPIOs: 
  • pin 17 as output for LED,
  • pin 18 as input for button.

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.
​

    

    
With release 0.4.0, this procedure is now provided by the GUI.
Picture
Here is the result. 

The interface is confusing, as it is not clear whether the buttons display a state or a command. 
  • For LED 17 white with ON displayed, this is the state. Clicking on ON actually turns the LED off, just like the famous Start > Stop menu in Microsoft Windows.
  • For Button 18, no action is available but the interface use the same presentation. Button 18 turns active when the physical button is pressed.

​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

The third test was about using the HTTP on-off adapter with an remote Arduino though WiFi. 



    
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.
​
Picture

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.
Picture
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

  • Project Things by Mozilla
  • Web Thing API
  • Wiki
  • Forum
  • Issues
Picture

Posted: Feb 21, 2018
Updated: Apr 19, 2018
Powered by Create your own unique website with customizable templates.