Dr. Humza Akhtar

2 results

Simplifying IoT Connectivity with myDevices and MongoDB

In the highly competitive era of Industry 4.0, companies that are able to adopt emerging Internet of Things (IoT) technologies and shift from traditional offerings to digitally differentiated ones are moving to the forefront of their respective industries. McKinsey & Company estimates that by 2030, IoT could enable $5.5 trillion to $12.6 trillion in value globally, including the value captured by consumers and customers of IoT products and services. From smart thermostats to smart factories, IoT already connects billions of devices worldwide. Figure 1 shows potential areas where IoT solutions make a difference. Figure 1:   IoT applications by industry (non-exhaustive). All of these IoT applications and solutions require technologies that can offer low-power operation, low-cost, and low complexity in setting up and maintaining end devices. End devices that are able to communicate wirelessly over large distances with low-power consumption are key. The data generated by IoT devices is time series and high frequency, placing a unique strain on the underlying data infrastructure. Because of the polymorphic nature of IoT sensor data, the database must support flexible data schemas, making it easy for developers to work with the data. It must also ensure that the IoT applications are resilient to future changes. MongoDB embraces the variety and volume of IoT data without compromising on performance. Through its document model, MongoDB eliminates data movement and blends time series with the rest of the enterprise data in a single developer data platform. In this article, we’ll describe how myDevices leverages the MongoDB developer data platform for IoT. Overview of myDevices myDevices is a U.S.-based IoT solutions company that empowers system integrators, MSPs, ISVs, VARS, and enterprise customers to quickly deploy IoT solutions to their customers. The company has more than 1000 plug and play sensors and multiple Long Range Wide Area Network (LoRaWAN) gateway options to create IoT solutions for a variety of use cases. Over time, myDevices has created the world’s most extensive IoT device catalog from more than 150 hardware manufacturers around the globe. LoRaWAN offers unique IoT benefits, such as long range and coverage, which may reach up to 15 kilometers in line of sight (LOS). It offers ultra-low power consumption for end devices, low-cost infrastructure, and high capacity, which makes it possible to link thousands of devices to one single gateway. myDevices understands that connecting devices from disparate manufacturers can be very challenging; thus, they have created a no-code solution that includes plug-and-play templates to connect sensors to the gateway just by scanning a QR code. After the sensor is connected to the gateway, users can perform remote monitoring and device management from a single-view interface. They can also get alerts through text and email and set up charts for visualization of sensor data. The alert rules can be configured as time based or threshold based in the myDevices platform. The myDevices IoT platform is secure from the edge to the application layer through the cloud. The security is composed of LoRaWAN network security at the edge, TLS to the cloud, and SAML at the application layer. Figure 2 shows the architecture of the myDevices platform and how it connects to the sensors. Figure 2:   MyDevices architecture. myDevices also has multiple ready-to-go solutions for a variety of IoT use cases and applications. From machine health predictive maintenance to soil moisture detection, there are sensors that just work with the IoT in a box application. It takes only minutes to set up connectivity between the sensor and myDevices cloud, and myDevices enhances productivity because you don’t have to worry about writing code to extract data from the sensors and establishing secure connectivity with the gateway. As LoRaWAN enables hundreds, if not thousands, of sensors sending data to a single gateway, it requires a database that can easily and automatically scale. When it comes to publishing data out of myDevices cloud to MongoDB Atlas, myDevices provides a webhook integration functionality that can be set up in minutes to establish connectivity between the two systems. Database requirements for IoT and MongoDB Atlas MongoDB and MongoDB Atlas are ideal partners for any IoT deployment, offering: Deployment flexibility (on-premises, in-field, cloud) Multi-cloud flexibility (AWS, Azure, GCP) Schema flexibility (frequent changes and additions) The ability to blend different data (time series, operational) Real-time analytics readiness Automated data tiering As a result, IoT data platforms and service providers, such as Bosch and Software AG, as well as some of the world’s most intensive IoT users, including Toyota, Mercedes-Benz, and Vodafone, choose MongoDB for their IoT platforms and services. MongoDB’s developer data platform supports the entire IoT data life cycle, from ingestion, storage, querying, real-time analytics, and visualization to online archiving (Figure 3). MongoDB Atlas brings the core components of real-time analytics into one developer data platform. Figure 3:   MongoDB Developer Data Platform for IoT. Let's talk about a few features that directly support IoT applications: Native time series platform: MongoDB supports native time series collections with hands-free schema optimization supporting high-efficiency storage and low-latency queries. This is an extremely important feature for IoT applications. Change streams: MongoDB change streams allow applications to access real-time data changes in the database without any complexity or risk. IoT applications can use change streams to subscribe to all data changes on a single collection, a database or an entire deployment and immediately react to them. This approach enables quick response time and fast decision making. Aggregation framework: By using the built-in aggregation framework in MongoDB, users are able to do real-time analytics without having to move the data to another platform. By using the aggregation framework, the work is done inside MongoDB, and the final results can be sent to the application, typically resulting in a smaller amount of data being moved around. For IoT applications, this can be a powerful tool to only transmit the filtered data to the Cloud or central storage resulting in improved security and reduced cost. Data Lake: As data is ingested, Atlas Data Lake automatically optimizes and partitions the data in a format and structure best for analytical queries. This capability significantly reduces the complexity of transforming data for the data scientist tasked with building machine learning models for analytical use cases and applications Data Federation: Atlas Data Federation provides the ability to federate queries across data stored in various supported storage formats, including Atlas Clusters, Data Lake Datasets, AWS S3 buckets, and HTTP stores. This feature reduces complexity of bringing data together for analytical model testing purposes. Data API: Companies can use Atlas Data API to integrate Atlas into any apps and services that support HTTPS requests. Leveraging this feature, the data from the myDevices cloud can be sent to Atlas and then used for storage and for analytical purposes using the aggregation framework or via the Atlas ecosystem connectors with third-party analytical software. Ecosystem integration: MongoDB Spark Connector opens up access to all Spark libraries for use with MongoDB datasets: Datasets for analysis with SQL (benefiting from automatic schema inference), streaming, machine learning, and graph APIs. Charts: MongoDB Charts is the best way to visualize IoT data stored in MongoDB. Charts is built specifically for the document model, no ETL, no time loss to data manipulation or duplication required to visualize rich JSON data. Using Charts, powerful engaging data experiences can be created for the use case stakeholders in no time. Integrating Atlas and myDevices using Webhooks and Data API myDevices offers a variety of no-code integrations for its clients to quickly get started by sending data to the platform of their choice. For MongoDB Atlas clients, this is great news because, by using myDevices Webhook integrator and payload transformation feature, MongoDB Atlas clients can receive and store LoRa sensor data into the specified collection. Let’s run through the methodology to perform this integration: Step 1: Log into your Atlas Cluster and set up Data API and API key. The MongoDB Atlas Data API lets you read and write data in Atlas with standard HTTPS requests. To use the Data API, all you need is an HTTPS client and a valid API key. It is important to understand that the Data API is not a direct connection to the MongoDB database. Instead, it routes requests through a fully managed middleware layer, called Atlas App Services, that sits between your cluster and client apps. This layer handles user authentication and enforces data access rules to ensure that the data is secure. The Data API supports two types of endpoints: Data API endpoints are automatically generated endpoints that each represent a MongoDB operation. You can use the endpoints to create, read, update, delete, and aggregate documents in a MongoDB data source. Custom endpoints are app-specific API routes handled by functions that you write. You can use custom endpoints to run your app's backend logic or as webhooks that integrate with external services. In this example, we are using a data API endpoint. You can follow these easy steps to enable Data API and create a Data API Key. Step 2: Log in your myDevices Console and set up integrations After you log in, click on new webhook creation through the INTEGRATIONS option on the right-hand panel (Figure 4). For the purpose of this article, we are assuming that you have already created an organization in myDevices and added sensors and gateways to it. If you have not, please refer to myDevices API docs to get started. Figure 4:   Set up integrations in myDevices. Step 3: Click on Webhook integration to open up the new Webhook creation panel. In this step, choose Webhook as the desired integration option, as shown in Figure 5. Figure 5:   Choose Webhook as the integration option. Step 4: Add key information. In this step, you’ll want to include key information, such as Url, which is your Data API endpoint, Webhook Header, which will include the api-key at the very minimum, and the payload transform script, where you can specify the cluster, database, and collection where this sensor data needs to be stored (Figure 6). Figure 6:   Paste the endpoint generated by Data API in Atlas. An example payload transformation script looks like the following. This is according to Data API requirements where you have to specify the cluster, database and collection name in the raw body data. function Transform(event, metadata) { return { dataSource: "my_cluster", database: "my_database", collection: "current_sensor", document: event, }; } Step 5: Save your webhook. Once you save your webhook, you can observe sensor data flowing into your MongoDB Atlas collection from the actual device using MongoDB Compass or Atlas Charts (Figure 7). For more details on how to create Charts, please visit the Atlas Charts documentation . Figure 7: Visualize sensor data using Atlas Charts. Conclusion We have shown how easy it is to connect myDevices IoT platform with MongoDB using the Data API . The overall architecture is shown in Figure 8. Figure 8: End-to-end architecture of myDevices and MongoDB Atlas integration. Simplifying IoT connectivity is of paramount importance for any organization looking to embark on a digital transformation journey. Fortunately, both myDevices and MongoDB Atlas provide platforms that simplify management of the full life cycle of an IoT device from provisioning to connectivity to data storage and archival. To learn more about how MongoDB enables IoT for our customers, please visit our IoT use cases page .

December 6, 2022

Achieving Industrial Connectivity at Scale with Wimera and MongoDB

Industry 4.0 (I4.0) represents the beginning of the Fourth Industrial Revolution. It includes the current trend of automation technologies in the manufacturing industry as well as disruptive technologies and concepts, such as cyber-physical systems (CPS), Industrial Internet of Things (IIoT), cloud computing, and immersive visualization. Through Industry 4.0, embedded systems, semantic machine-to-machine communication, IIoT, and CPS technologies are integrating the virtual space with the physical world. These technologies are enabling a new generation of industrial systems, such as smart factories, to deal with the complexity of fast-paced and hyper-personalized production. In this article, we’ll explore Wimera’s unique solutions to the challenges of I4.0 and IIoT, built with MongoDB. Information and insights With IIoT, existing industrial systems will be modernized to drive digital transformation and unlock tomorrow's smart enterprise. IIoT has been finding its way into products and sensors while revolutionizing existing manufacturing systems; thus, it is considered a key enabler for the next generation of advanced manufacturing. Industry 4.0 generally comprises many complex components and has broad applications in all manufacturing sectors. The first challenge faced by manufacturing companies when embarking on the I4.0 journey is to sensorize and connect their manufacturing equipment in order to collect, store, and analyze data for information and insights. Wimera Systems is solving this challenge as an I4.0 enablement company offering IIoT solutions using their unique hardware, software application, and AI/ML-based analytics engine. Wimera’s Smart Factory Suite has seen tremendous growth, with 2500+ global installations across 50+ customers. MongoDB has been pivotal to that growth, acting as the core component of the IIoT suite and enabling the company to offer its services at scale without having to worry about managing the complexity of an IIoT database. Bringing AI-powered IIoT to the manufacturing shop floor Manufacturing companies are emerging from the pandemic with a renewed focus on digital transformation and smart factories investment. COVID-19 has heightened the need for IIoT technology and innovation, forcing manufacturers to compete in a digitalized business environment. Many manufacturers still operate using legacy technologies and systems; on most shop floors, equipment and operator efficiency are manually calculated and tracked using spreadsheets. The machines are maintained using time-based rather than condition-based maintenance strategies. And, no real-time visibility exists on consumables and tools usage. All these practices result in increased maintenance costs, suboptimal production, and ultimately, customer dissatisfaction. Wimera understands these challenges all too well, which is why they created the Smart Factory Suite supporting both on-premise and cloud deployments. The Smart Factory Suite provides insights for managing the entire production landscape through interconnected devices and machines, operations, and facilities. It can predict and make real-time adjustments for increased production efficiency and less downtime. The suite is primarily utilized for empowering manufacturing operations, equipment maintenance, warehouse operations, and inventory management. With Smart Factory Suite, Wimera serves a wide range of manufacturing industry sectors including, but not limited to, automotive, electronics, chemical, and food processing companies. Deploy and run anywhere with MongoDB MongoDB, with its freedom to run anywhere, lets Wimera offer both on-premises and cloud deployment options for its customers. In both cases, the suite is directly connected with machine controllers using Wimera libraries for all popular Programmable Logic Controller (PLC) brands. The suite is also connected to legacy machines through external sensors installed by the Wimera team. Data is extracted via the Wimera ReMON Data Acquisition (DAQ) device (Figure 1) that utilizes the MongoDB database as the persistent data storage. MongoDB’s flexible data model makes it easy to combine and enrich this data and enables live dashboards and instant alerts for factory personnel. The data collected and optimized by ReMON DAQ is further fed to ReMON AI , an advanced analytics engine. ReMON AI provides advanced analytics through AI/ML models and leverages MongoDB to deliver application-driven analytics in real time. Figure 1: ReMON DAQ and ReMON AI (source: Wimera ReMON ). Whether through on-premises or cloud deployment (Figures 2 and 3), Wimera’s customers have benefited from MongoDB’s capabilities that are critical for IIoT applications, such as time series collections and the flexible, intuitive document data model. Figure 2: Wimera IoT architecture on premises. Figure 3: Wimera IoT architecture on cloud (using MongoDB on AWS). In one customer example, while deploying IIoT at a multinational CNC machine shop, the customer preferred to use their existing production monitoring application enriched with IoT data coming from Wimera’s Smart Factory Suite. In this case, MongoDB enabled easy and seamless integration of the IoT application with the customer's application via a simple API. Additionally, high-speed data coming from a vibration sensor was handled effectively by MongoDB time series collections, resulting in real-time alerts sent to maintenance teams for instant corrective actions on the shop floor. In another example, a multinational automotive manufacturer wanted a single platform that could collect and combine data coming from vendors in different formats and contexts. MongoDB's flexible document model helped manage the varied data types easily, allowing the customer to benefit from a single application capable of managing multiple vendors in parallel. This flexibility offered by MongoDB enables the customer to keep adding new vendors instantly without changing the underlying cloud infrastructure or tweaking schemas. Interested readers can check out additional case studies on Wimera’s website. Building better together Wimera and MongoDB’s partnership gives customers confidence with validated architectures to ensure successful, optimized, and scalable deployments at their facilities. Wimera’s continued partnership with MongoDB also helps guide the company’s product roadmap as we expand in the IIoT, Smart Factory market together. MongoDB is the only enterprise grade database chosen by the Wimera development team due to easy handling of the large volume of data generated from machines and sensors while maintaining a high performance… If we want to insert thousands of records in a second, then MongoDB is the best choice for that given our solutions are for Industrial IoT. Also, horizontal scaling (adding new columns) is not an easy process in any RDBMS system. But in the case of MongoDB, it is very easy Nagarajan Narayanasamy, CEO, Wimera Systems Private Limited A bright future ahead Since 2019, Wimera has been an early adopter of MongoDB for their Industrial IoT application for discrete manufacturing industries and process industries on multiple domains. “Currently, Narayanasamy says, “Wimera’s Industrial IoT solutions are matured, and we are focused on scaling globally.” Wimera now targets expansion in India, APAC, EU, and USA for the discrete manufacturing and process industries and also for select OEMs and machine builders. “As MongoDB continues to scale itself globally through its multi-cloud data distribution strategy, we see a good synergy partnering with MongoDB for the mutual benefit of both companies and the community as a whole. We also would like to work with MongoDB on the technology roadmap and solve some of the real-life challenges faced by manufacturing industries,” Narayanasamy says. Wimera has recently started their MongoDB Atlas journey, and the adoption will grow as their customers demand more cloud solutions compared to current on-premises deployments. MongoDB will continue to help IoT companies like Wimera take their product offering to the next level and enable their customers to digitally transform their manufacturing operations. To learn more about MongoDB’s role in industrial connectivity and IIoT, please visit our Manufacturing and Industrial IoT page.

December 1, 2022