We are trying to compute simple formulas using Real Time analysis. How can we send the results to a property on a given device ?
Please follow the steps below:
-
Make sure the tag is writable
-
Go to real time analysis and click add
-
We need real time device as input and equipment linkage as output. Real time device settings please refer the picture below.
-
Equipment Linkage settings please refer the picture below. We use “Always effect” and “All conditions” triggerred. Condition is “Temperature exceeds 50” and Result is “Set Alarm to 1”
-
Press run to execute the logic
-
Result
Thank you for your answer, but after following your instructions, it still doesn’t work. If it is of any importance, we are working in a cloud environment.
Here’s what I have done :
-
Create a device with a writable property
-
Create a device detail using that device (here called “device_Test_IO”)
-
Create a realtime analysis, and use your guide to set up the Realtime device block and the device linkage block.
In theory, the value of Test_Calc should be set to two once Test_IO is greater than 10.
- Run the realtime analysis
- Set the Test_IO value to a number greater than 10 via MQTT.
Here, the Test_Calc should be equal to 2, but it isn’t.
What must I do ?
After some trial and error, we found the following :
Using this setup, and naming the variable in calculation defaultModule_Test_Calc (which, again, is the name of the variable we want to overwrite), the calculation does seem to work, however, the value isn’t carried to the device shadow.
As I said, the values are calculated, but not transfered to the device shadow.
I also want to note that the interface changed since yesterday. Those changes include :
- The removal of the Device Linkage Block
- The addition of a Device Model field when creating a realtime analysis
- The change from the “Parametre Set” button the “Real Time” button
Is there a guide, or a documentation I could follow to acheive those calculations ?
So far IOTedge can’t write back calculated result to device, we have reported to RD. They will plan to fix it.