August 10, 2018
Word on the street has it that IoT is hard. That broad statement is an accurate assessment for the relatively slow perfusion of IoT devices, whether they are in industrial facilities, homes or anywhere else. The term “pilot purgatory” has been bandied about to describe the situation in the enterprise and industrial realm. Earlier this year, a McKinsey blog post posed the question whether it made more sense to think of an “industrial evolution” as a more apt term for the digitization of manufacturing than the industry-revolution-referencing term “Industrie 4.0.”
But developing an IoT application need not be so hard, declared Gabe Weiss, a senior developer advocate at Google in a session at Google Cloud Next. Flanked by four colleagues, Weiss walked the audience through the creation of a stress-monitoring IoT application that was up in running in less than an hour. “I don’t want to fool you into thinking that: ‘yes, we’re going to be building an end-to-end app today on stage’,” Weiss stressed. The developers had answered many of the project-related questions beforehand. It would also be an exaggeration to expect to craft a production-ready IoT project in such a short time, Weiss said.
The session did, however, illustrate that with sufficient strategizing and familiarity with a technology such as Google Cloud Platform, the prospect of building a single experimental IoT application can be straightforward. “What you can put together in this short amount of time is immediately useful,” Weiss said. “The data that you can get me from these simple applications can immediately be introspected, can be looked at, can be used to get ROI on whatever business that you’re doing.”
The first step in building an application is to identify an idea, which will then dictate the types of technologies needed. “The question I wanted answered was: ‘Who up here amongst us is the coolest on stage? Who is the most nervous, the most anxious in front of everyone?’” referring to his developer colleagues.
One reliable way to detect stress is the chemical cortisol, a stress hormone found in body fluids such as blood and saliva. The event organizers balked at the prospect of having a biohazard on stage, so Weiss pondered measuring blood pressure. “How elevated it is will tell you how stressed you are,” he said. “It requires you to be able to detect heart rate, and you have to be able to apply and release pressure in an even way around your arm. It’s totally doable with IoT, but maybe a little ambitious for a 50-minute session. So I kind of got rid of that.”
The next option was to monitor stress via the vagus nerve, which regulates the pulse. In periods of stress, the vagal impulse is suppressed, causing the heart rate to soar.
So the developers set off to measure heart rate and pulse, benefitting from the widespread availability of off-the-shelf sensors dedicated to these applications. Next up was developing a Python app that could read data from the analog sensors, drawing on open-source Python libraries. “Our device is an Arduino. It could run analog devices easily, and connect over serial to a Raspberry Pi, which is super easy to connect and it runs Python,” Weiss said. “Obviously, for most [production] IoT, that’s not what you’re going to be using. It’s not cost-effective. But for our purpose, it’s just to highlight the technology.”
The team used Cloud IoT Core for data ingestion, which is a Google Cloud Platform gateway for devices to send telemetry data to the cloud and manages device authorization, security and management. “It allows you to configure your devices from the cloud,” Weiss said. “It allows devices to report their state, so you can check the health of your fleet from the cloud without having to talk directly to your device.”
In the demo, the Angular app read from Cloud Firestore in real time. The sensors pushed readings once per second into the cloud. But the team used Google Sheets to look at historical data and applied a rule to change the color to the data anytime it traveled above a set threshold. “It’s a way to get a quick-and-dirty look after your data by doing some analysis in semi-real time,” Weiss said.
So who was the most stressed person on stage? It wasn’t clear, although Weiss pointed out that his pulse was the lowest of the bunch — even after sprinting across the room toward the end of the demo. More clear-cut was the conclusion that developing an experimental but functioning IoT project can be a straightforward affair when developers have both a solid idea along with comprehensive and familiar tools at their disposal.
About the Author(s)
You May Also Like