Demystifying Unified Namespace for IoT: Building a simple proof of concept to understand
Structure and Purpose
Building a Unified Namespace for simple home automation may seem like overkill, but it provides a practical way to learn about IoT architectures and tools, surpassing abstract examples. This article walks through the basics of a Unified Namespace.
Below is the home experiment that can scale to machine monitoring and other industrial IoT use cases.
GitHub Repository to Follow-Along
Check out my GitHub repository below to follow-along step by step:
The app on hugging face spaces serves as one example visualization:
Hardware Summary
Below is a high-level annotation of the hardware used for this simple demonstration. A Tulip edge device (EdgeMC) and the Tulip Machine Kit are used to measure the fan’s current draw and correlate to fan speed.
What is a Unified Namespace?
According to HiveMQ, a Unified Namespace (UNS) is a solution that enables you to:
Collect data from various industrial IoT (IIoT) systems, add context to the collected data, and transform it into a universally comprehensible format
Unlike rigid architectures (such as ISA95), UNS allows almost any system to communicate with another via MQTT (Or another protocol used by all systems and devices). This flexibility replaces proprietary, rigid integrations with opportunities for smoother system integration.
In my UNS example, I’ll demonstrate how to stream information from a Tulip edge device (Edge MC) to both Tulip Interfaces and a time series database. See below for the architecture:
Why This Architecture?
The architecture serves multiple purposes:
Implementation Components
Edge Processing
Cloud Integration When streaming data from edge devices to the cloud, consider:
Implementation Details
InfluxDB Implementation
Data storage choice depends on use case. InfluxDB works well for time series data, while solutions like MongoDB better suit document-based data that doesn’t fit a standard schema.
InfluxDB offers three main integration methods: 1. Node-Red Module: Simplifies the REST API process 2. Python Client: Enables SQL queries with pandas DataFrame output 3. Telegraf: Handles complex cases, receiving data from sources like MQTT
Below is an example of querying data on the InfluxDB Data Explorer
Tulip Interfaces The implementation uses Tulip Machine Node-Red Modules to write fan data as Machine Attributes. While this example uses a simple fan, the architecture applies equally to industrial equipment like: - CNC Mills - Punch Presses - Bioreactors
Apps on the Tulip library such as Machine Monitoring Terminal provide a pretty simple starting point for interactive machine monitoring use cases
Custom Web Applications A Gradio-based monitoring app demonstrates data visualization capabilities:
Solutions such as Gradio provide simplicity to building interfaces although scalability may be a concern as apps grow in size and complexity. Below is a screenshot of the quick gradio app I made for this proof of concept
Scaling and Implementation Considerations
Fit-for-Purpose Design
It’s important to match the tech stack to use case requirements. If the tech stack doesn’t tie back to use cases and specific user needs, there’s likely a lot of fluff in the architecture and toolkit. Here’s a few examples below:
Scaling Considerations
As a solution scales, you may hit other constraints around scaling the MQTT and / or Kafka broker, managing edge devices at scale, and managing Node-Red flows at scale. Here are a few considerations below:
Let me know what you build with a UNS!
营运优化资深经理
4 个月"Unlike rigid architectures (such as ISA95), UNS allows almost any system to communicate with another via MQTT" ..........Is there anything that is specified in ISA95 that prevents you from doing that?
Automation Professional | Expert in SCADA, PLC, DCS | Transforming Pharma & Life Sciences through Industry 4.0 and Digital Innovation
4 个月Purnendu Saptarshi