Skip to main content

Anedya Events(Beta)

Sometimes it is required to send real-time notifications from your devices to the user. This can be some alarms, events happening or simply a status update. For example, a door lock needs to send a notification each time it gets unlocked, or a washing machine can send a notification when the wash cycle is finished. These types of notifications can be achieved through Anedya Events.

Anedya Events provides a way to send events from devices, apply rules on them and carry out certain actions depending on the rule applied to those events. Sending events

The devices can submit the events to the Anedya cloud by both MQTT and HTTP APIs. Here's an example event payload submitted by the device:

{
"reqId":"your-unique-req-id",
"eventType":"event-name-you-specify",
"timestamp": 0,
"data": {
"key1": "value1",
"key2": {
"key3":"value3"
},
"anarray": ["i1", "i2", "i3"]
}
}

The event payload has three main fields:

  • eventType: Event type is a string that can be set by the device to identify a unique type of event. It can be set to any arbitrary string below 50 characters. This eventType is later used by the rule engine and your application to identify the type of event received. For example in a washing machine, one eventType can be cyclefinished and the other can be error.
  • timestamp: Time of the event, you can push historical events also but Anedya will not apply rules to events older than 30 minutes. The timestamp is in Unix millisecond epoch and just like all APIs is in UTC timezone.
  • data: With each event, device can also submit arbitary JSON object which can contain your application specific data. The data field size should not be larger than 1000 characters.

Rule Engine & Actions

You can create a rule that can apply to all or a subset of the events received by Anedya. Each rule has a match pattern that can filter out events based on specific patterns in the payload. Along with the match pattern, each rule can also have 5 actions attached to it. When an event is received, all rules are evaluated whether they apply to the event or not based on a specified match pattern. On a rule which matches an event, all the specified actions are carried out.

💡Execution order of Actions:

The actions are executed in random order

Currently following type of Actions are supported:

  • Webhook Action: Makes a webhook call as per specified configuration
  • More Actions are coming soon!

Limits

You can create maximum 100 rules per project and each rule can have maximum 5 actions

Pricing

Anedya Events are free for Beta period. Once in general availability, the Events will be charged per million events processed

⚠️Work in Progress!

This page is being modified continuously and will be updated frequently. We are continuously adding content to the documentation. Feel free to get in touch with Team Anedya for any assistance.