Closed hit-monchan closed 5 years ago
ok i manage to resolve it.
Go under IoT Device Simulator Management console -> Modules -> Device Types -> Message Payload -> Add Attribute.
Check the Sample Message Payload when you add attribute. There is a bug that i realize it somehow created "sub_metering_1\t" so i have to re-create by removing it and add attribute again.
I have type in "cost" for the attribute name and (sub_metering_1 + sub_metering_2 + sub_metering_3) * 1.5 for the formula.
I have encounter error when i click update preview
We could not run the pipeline activity. ERROR : Error in math expression or message contents, mathExpression : (sub_metering_1 + sub_metering_2 + sub_metering_3) * 1.5, message : {"sub_metering_1\t":16.25,"sub_metering_2\t":29.63,"sub_metering_3\t":23.44,"global_active_power\t":1.5,"global_reactive_power\t":8.78,"voltage\t":236.81,"id":"Jo5zQ2afg"}
Any advise ? Thanks !