Tag Archives: mozilla

Playtime with Mozilla WebThings

Mozilla WebThings recently moved out of experimental phase ( https://www.i-programmer.info/news/91-hardware/12721-mozilla-webthings-isnt-an-experiment.html ) and is their foray into the Internet of Things (currently primarily “Smart Home” devices ). It’s a platform for monitoring and controlling devices over the web. The core components  of a deployment are a WebThings Gateway, the WebThings Framework, and a Thing implementing the Web Thing API.  There are Node.js, Python, Java, Rust, Arduino, MicroPython, and other libraries.

Mozilla hopes that WebThings will be installed in commercial products, so this was a good reason for us to explore and assess the technology. A Raspberry Pi was setup on a LAN as the WebThings Gateway. A Netatmo Weather Station,(which uses wifi and has temperature, noise, pressure, humidity, and carbon dioxide sensors) and a Flic button (bluetooth connected button trigger) were setup as Things for for attendees to work with. Attendees brought laptops and/or breadboards/components, depending upon their interest and background.

Some attendees brought laptops and interacted with the gateway to enumerate sensors and values in Javascript, Python, and Android. One attendee brought an ESP8266 (an Arduino like prototyping board) with wired up an additional LED. He  uploaded code to the board that controls the LED states and added the custom “Thing” to the Mozilla gateway. Another attendee then created an Android client to control the LED.