Solving IoT Problems with Node.js for Hardware
Tod Kurt knows a thing or two about IoT devices. As the creator of blink(1), he’s shipped over 30,000 units that are now out in the wild and in use for custom signaling on everything from compile status to those emotionally important social media indicators. His talk at the 2016 Hackaday SuperConference covers the last mile that bridges your Internet of Things devices with its intended use. This is where IoT actually happens, and of course where it usually goes astray.
I think this device is a good reference for thinking conceptually about Internet of Things. It’s dead-simple hardware: a thumbnail-sized PCB with a USB connector hosts two WS2812 RGB LEDs and a microcontroller. The enclosure is a little metal frame with a plastic diffuser that completes the look. You need to give it connectivity (and power) through the USB connection for it to work.
Does this qualify as IoT? Absolutely. Think of IoT as anything that brings data into the real world (or vice versa). LEDs have been on face plates of computers forever, but since the day that panel-programmed machines were put to rest, those LEDs have rarely ever conveyed meaningful data. Blink(1) can be set up through just about any API you can imagine to tell you something meaningful at a glance and at a distance. But that “last mile” is where the magic actually happens.
Cost and Complexity
Users need a way to interact with connected devices. But without a sizeable screen and multiple inputs that is a daunting task. Also, these devices often lack some important stuff like encryption (think SSL) and the ability to know when a device needs to be upgraded, plus an easy mechanism to do so. Tod contends that for a large swath of use cases, the best thing you can do is to make the device a computer peripheral.
This is most obviously done in the case of USB devices. The computer is the gatekeeper of that USB port and provides a direct and easy connection for software access to it. This can be true of wireless devices as well, but your best bet on that front is devices that are LAN only and depend on another gatekeeper to regulate access to them.
Lacking One OS to Rule Them, Tod Looks to Node
Tod heralds the many benefits of including a computer in the deal. You get a robust and continuously modern way for the user to interact using a GUI. And these central devices come with heavy lifting capabilities, like the option to handle encryption and orchestrate firmware upgrades when necessary. You will even have a mechanism to alert users when an upgrade is necessary.
This is no small thing. We are in the pit of despair with botnets right now because of early devices that didn’t think deeply about security and upgrades. Households that include devices in these botnets are completely unaware that their device is up to no good, and even if we found every device that has been pwned there’s no way to notify the owners. But I digress.
Of the myriad options to explore for cross-platform apps, Tod is preaching for Electron, a browser-based framework that uses Node.js for your every whim. This last part isn’t hyperbole. One of the chief benefits of Node.js is the extremely widespread adoption that means if you can think of a use, a library probably already exists. There are numerous examples of support for common hardware (from ESP8266 to Sphero BB-8 toy robots). Even if your programming chops can’t keep up with the new hotness there are tools like Node-RED which help you stomp out complexity with a graphic programming flow.
Think Security, Think User, Then Think Product
This is not a sales pitch for Blink(1) — although you find it in the Hackaday store — but a proven example of the way we need to be thinking about building up the Internet of Things. The default has been to build it and think about everything else if it turns out someone wants to buy it. We’re eating our humble pie for the hubris of early designers. Only a paradigm shift in thinking about these issues early will make future IoT devices secure, but also deliver on the promise that has so far failed to materialize. We’ve been told that IoT will be awesome, fixing the last mile will let you deliver on that by making users love what you build.
Filed under: cons, hardware
from Hackaday http://ift.tt/2he2MS4
via IFTTT