Real-time processing of RIC data using the “Handler” tool
In this article, we will learn about the Handler module, which provides additional processing of the received data.
All materials from this case can be found at:
YouTube link with this use case.
Let’s suppose that we needed to calculate an additional parameter – effective temperature (an indicator characterizing the complex effect on the object of ambient temperature and humidity).
Effective temperature formula:
EТ = t – 0,4 (t–10)(1– f/100),
where f is air humidity and t is temperature.
1. Model Editing
In order to save the value calculated by the Handler, add an additional parameter to the model.
You can import the finished model to your project:
2. Creation and Launch of the “Handler” tool
Go to the “Handler” section and click “Create”. Fill in the “Name” and “Description” fields.
Press “Create” and you’ll see an example of code appear that counts the sum of the values of the two parameters and writes it to the third parameter. Let’s edit the description and the code itself for it to fit into our task. Press “Save.”
The code of this Handler can be found at:
Next, click the “Objects” tab to select the objects on which you want to run this Handler.
Now go to the “Models” tab to correlate the names of the variables specified in the code and the real parameter IDs from the device model.
Once all parameters have been filled in, start the Handler on the objects.
Now, when receiving temperature and humidity data, the Handler calculates an additional value – an effective temperature, which, for example, can be used in the automaton.
Try create your IoT project with Rightech IoT Cloud now 🙂
And if you have any questions, welcome to our chat of like-minded fellas: