Message Rule

  • Message rules are the simplest of all the rules, they are the entry point of your business logic. A.K.A; -what to do when a new messages from your IoT sensor reaches the platform. In a real life scenario, your devices may send different kinds of messages that you may want to decode and handle them differently, you can specify a rule for each type of message you defined that gets automatically invoked when that type of message was received by the platform.

  • This comes handy when you want to perform some of the tasks like; extract the data, process their validity, apply your functional logic, store It in a record, trigger alerts & notifications, send messages to other devices, etc.

  • You don't have to create a message rule, as soon as you define a message, a empty rule is created for you, you can just start writing your code here Home -> Rules Engine -> Message Rules

  • Context Variable: msg

Inbuilt Message Simulation

  • When you start developing a sensor communication, often you want to keep sending data to the platform from your devices, this can be a annoying at times, there are multiple ways you can address this issue, one of the best way is, just click on the simulate message on the right side of the rules engine editor. Rules Engine -> Message Fields (expand it) -> Simulate.
1440