Rules Engine allows routing of events – be it platform-generated or device-generated messages to any one or many of the consumer services in a flexible way. User defined functions, Notification services are examples of consumer services.
Clicking on ‘Add Rules’ button bring up a form to setup a Rule. The source events are shown here. This includes bunch of platform generated events.
These events can be forwarded to any of the consumer services. Notification service, Outport service and User defined services are the major consumer service types supported in this version of IoT Core/Core Lite.
Notification service in turn allows sending Email, SMS, in-App notification etc.
Outport service is a user defined REST based data export service. See Section “Extracting/Exporting IoT Data’ for more details.
User defined service allows users to write their own functions and invoke them by specific events.
The following example shows triggering user defined function whenever new device gets added to IoT Core/Core Lite. See “Processing IoT Sensor Data” for more info on how to write user defined functions.
Note: Whenever a new device is added, User can specify the name of the function that needs to be invoked with the device-generated messages in the device Registration form, under “Message Decoder”.
This makes the system to generate and insert a rule automatically so the device generated messages can be routed to given user defined function.
On Device-Add form, checking on ‘Enrich messages’ routes the messages sent by the devices into a microservice whose function is to append device metadata into the messages. This way the decoder function described above receives the message along with the metadata of the device for processing.
© copyright, vitalpointz Inc.