Tadiran
Optimizing IoT Device Integration & Automation with AWS Serverless Architecture
Learn how Tadiran setup a new IoT-enabled workflows with existing applications environment
Industry
Manufacturing IoT
Technology
OVERVIEW
Customer Tadiran is a leading worldwide technical and electrical appliances manufacturer company. Some of the company’s more famous product lines include batteries and air conditioners.To satisfy the consumer needs, Tadiran is bringing into the market new models of smart air conditioners with modern IoT capabilities built-in, and expects the market to grow fast.
KEY CHALLENGES
Enhancing Tadiran’s air conditioning products with new technical capabilities opens new business possibilities, but introduces challenges too. One particular challenge faced by Tadiran is how to integrate the new IoT-enabled workflows with their existing applications environment. The integration should allow the company full visibility to the new devices status, while making it possible for the business users to access information using their existing tools. Therefore, an integration project was required to implement.
Tadiran’s product line of air conditioner devices manufactured and sold to private consumers has recently been updated to include IoT-enabled devices. The smart sensor and communication technology is provided by TUYA, a leading smart device company. Consumers are able to view and control these air conditioning devices as part of their Smart Home solution, using the TUYA Smart mobile application.
Management of the smart devices is over the TUYA IoT Platform web interface. This collects and displays information from end users and their devices. Typical events provided by the platform include new user registration, adding a new device (installation) and deleting a device (decommissioning). Devices have physical location, typically a specific room in the owner’s street address, and a single user may have many devices. When turned on or off, the devices transmit the event to the platform accordingly. Devices that are running, communicate their current status to the platform every 6 seconds, or 10 times per minute. Each status update includes the device unique ID, device type, timestamp and depending on the model, various other properties such as the current temperature setting or fan speed. Importantly, if any errors or faults occur, the device is self-aware of this and includes the error status and code – if available – in the status update. TUYA uses Apache Pulsar for message queue implementation.
On the other hand, all Tadiran’s equipment data, including the info of each device, contact details of customers and the maintenance status are stored in a SAP system. One of the key functions is that maintenance can be scheduled and arranged via SAP when notification of device fault has been received. For managing customers, SAP C4C (Cloud for Customer) on the web is used. To streamline this process, an integration between TUYA IoT Platform and SAP C4C is needed.
SOLUTION
Renova Cloud reviewed the customer’s requirements and identified the following:
- The integration should be implemented in code on a platform where it can be easily modified to accommodate future needs
- The platform and services used must have high availability and reliability; downtime should be avoided and the status of the services easy to monitor
- Scalability and elasticity; in the beginning the number of IoT-enabled devices is small, but it’s expected to grow with a pace that is hard to predict
- Cost-effectiveness: since the goal of the project is to build a custom integration between existing platforms, the integration itself should not be a major cost factor
All the requirements suggested that a highly reliable hosting platform with managed services was needed. Selecting AWS to host the services was agreed between Renova Cloud and customer, who saw the advantages of being able to extend the solution in the future.
Renova Cloud identified the following major tasks for the solution:
- Listen to TUYA IoT Publisher (Pulsar) for device events of interest
- Call TUYA API to retrieve more details of devices, customers and customer contacts
- Call SAP C4C API to add or update devices, customers and service requests
- Store all events and logs for potential auditing, troubleshooting and review purposes
- Package data by device so that system admin retrieve monitoring reports of devices
The tasks 1-3 have unpredictable volume which depends mainly on the amount of events of interest, such as new user registrations, new device installations and any faults occurring. The task 4 involves storing the data for events of interest, so the volume is related to the cumulative amount of such events in the past. The task 5 involves user such as system administrator accessing the monitoring on-demand, the volume is expected to be correlated with the number of device faults and service requests happening in the recent time period.
The requirements lend themselves well to serverless architecture, with the tasks divided into small functions run whenever needed and can scale massively due to the parallel execution. Renova Cloud drafted an AWS architecture using Lambda functions written in Python and orchestrated with Step Functions, with API Gateway in front and communicating utilizing SQS queues. As storage solution, DynamoDB is used for short term and serving monitoring data for status dashboards, while S3 is used for archival. The calls to external APIs of TUYA and SAP C4C are managed with Lambda functions, with requests and responses logged in CloudWatch. EventBridge sets the schedule of device status monitoring.
TUYA message queue uses Apache Pulsar so an implementation of a subscriber was required. Renova Cloud wrote the Pulsar subscriber application in Java code running in ECS as Docker container with image versions stored in ECR. To achieve the best scalability and elasticity, ECS Fargate launch type is used and therefore the solution is fully serverless.
To ensure security of the solution, all the credentials are stored in Secrets Manager and retrieved securely by the applications. S3 buckets are encrypted using keys from KMS. If any errors are encountered during the workflows, these are logged and SNS notifications are sent to admins.
The overall architecture integrates many AWS serverless services as a complete solution.
There are 3 separate environments, DEV, UAT and Production, to allow the customer test any modifications before applying them in live production data. Renova Cloud performed load testing to set the correct sizing for Fargate tasks and confirm the scalability of the solution.
BENEFITS
After going live, Tadiran is able to automatically receive real-time updates of TUYA IoT devices to their SAP C4C system. This saves significant time and resources as the IoT device updates do not need to be manually monitored and entered to the main enterprise resources management system. It also ensures that important updates are not missed, and that the 2 systems stay synchronized and contain the same information of users, devices and maintenance status.
The integration provides many business benefits such as the ability to quickly identify new customers as they start using the IoT devices and send onboarding materials immediately as the user comes online, thus improving the end user experience and reducing the dependence on helpdesk staff. The installation and decommissioning of IoT-enabled devices is updated in resource management system in real time, ensuring the accurate inventory and improving the ability to target support resources such as availability of spare parts in local stores.
The clearest benefit is reduced downtime of IoT-enabled air conditioning devices; a fault status message from a device will trigger service request creation workflow which automatically opens a ticket in C4C with all the required information. This allows the support team to quickly respond appropriately, for example by contacting the device owner or allocating maintenance staff with spare parts and maintenance schedule. So far T is seeing at least 20% reduction in response time and device downtime thanks to this automated workflow.
In the future, Tadiran is seeking to expand the usage of AWS to enable additional workflows and to build reports and analytics dashboards. Also the application of predictive analytics using AWS Machine Learning services aiming for early detection and prediction of device faults is being considered as a possibility. Building these services on the basis of AWS serverless applications allows the ability to scale and grow fast and securely.