Scripts & Things Recap: 12/5/2018
A big thank you to everyone who joined in the fun — especially to our presenters.
Demo #1: The Moddable SDK BLE Stack
Brian gave a brief tour of the features of the BLE stack, including the Client API, Server API, Discovery, Advertising, GATT services, and Security Manager. For details, check out Brian's blog post introducing the BLE stack and the Moddable BLE documentation on GitHub.
To demonstrate the capabilities of the BLE stack, Brian showed off two demos: an ESP32-based "air pedal" and a remote Apple Media Service controller implemented on an ESP32 Moddable Zero.
The Air Pedal is intended to be used by musicians as a foot pedal for turning the pages of digital sheet music on an iPad or other BLE-compatible device. This clever contraption is essentially a DIY equivalent to the AirTurn PEDPro, which retails for $69 on Amazon. It works by implementing BLE HID over GATT to emulate a (two-key) keyboard. Tapping the buttons on the device send up and down arrow key notifications to the paired iOS or Android device to turn the pages of the music.
Apple Media Service allows BLE accessories to interact with the iOS media player. It exposes characteristics for controlling media playback and notifying on track/media changes. Brian's AMS Client App uses BLE, HTTPS, JSON, JPEG, and the Commodetto graphics library to deliver a rich user experience on an small ESP32-powered touchscreen device. It allows for remote control of the iOS media player; it displays track info, playbar, and album art; and it has media control touch buttons for previous track, play/pause, and next track operations. Please see Brian's AMS blog post for more information and a video.
Brian's presentation and demos made it very clear just how much you can accomplish using BLE with an extremely inexpensive microcontroller and a few extra parts. We look forward to seeing more BLE-based demos from our community at future meetups.
Demo #2: Lights API
Peter Hoddie gave the next presentation, which explored Lights, an API that unifies the discovery, remote control, and monitoring of a variety of commercial Wi-Fi lighting solutions. Lights facilitates changing the power, brightness, and color of IoT lights while also providing tools for light discovery, maintaining state, and managing security. It has been implemented for the protocols used by LIFX, Nanoleaf, Philips Hue, and YeeLight.
Demo #3: Lellan SmartTile
Next we had a presentation from CEO of Lellan, Frank Halasz. This engaging talk was on the Lellan SmartTile, a one-square-foot Wi-Fi controllable lighting panel that contains a grid of 36 individually addressable RGB cells.
Frank explained how these panels are typically used in large-scale digital canvases that are installed in bars, restaurants, hotels, and more. Unlike the consumer-oriented lighting systems presented by Peter, Lellan typically targets architects and interior designers who wish to bring one-of-a-kind digital art to life in commercial spaces.
Demo #4: mDNS Door Monitor
Our final presentation was given by Lizzie Prader, who showed off a multicast-DNS-based door monitoring system. Lizzie's demo combined a hall effect sensor and a battery-powered ESP8266 to send notifications over Wi-Fi when a door is opened or closed.
A challenge of battery-based monitoring projects is that it is not practical for the device to remain active and ready to respond to state requests at all times. It is only reasonable to wake up the device briefly on state changes, turn on the Wi-Fi radio, send out a notification of the new state, and then power back down. This is problematic when other devices that need to know that state are, themselves, entering and leaving the network over time.
Lizzie presented one solution to this challenge: using an mDNS Sleep Proxy to persist state on the local network. In this setup, the sleep proxy device (in the case of this demo, an Apple Airport) captures the state of the door sensor device on broadcast. The sleep proxy device is then able to respond to mDNS queries that are directed to the low-power device, while the low-power device remains asleep.
See You Next Year
We can only do this with your help. If you have a proposal for a presentation, demo, or workshop that would be a good fit at Scripts & Things, please reach out to us via our page on Meetup.com.
And, as always, we look forward to seeing you next month!