Working with Event

Event are another main part in ThingScale. All the processing(notification or HTTP_POST) happens based on streams.

Here,Event need to be define as ThingScale Event definition.All the created events are mapping to the channel of the ThingScale.

On this page:


Creating event definitions

  1. Start the ThingScale, log in to its management console,select Event -> Event Management and click Create New Event.
  2. Enter details in the form that appears and click the Create New Event button at the end of the form.For example,

    Here, fill the necessary fields according to the event definition that you want to create.
  3. Finally, Click the Create New Event button to add the event definition to theThingScale. Then Event Management page will open. To delete event stream, check the Delete checkbox and Apply. 

Notify types and operators

event types are currently available as follows:

Notify_typeDescription
email

push email if stream matched the operator.

httppush HTTP_POST to another systems if stream matched the operator.

"email" option is TEST PURPOSE only.Not use for production.For production,you can use "http" webhook option. 


operators are currently available as follows:

=Equal
<Less than
>Greater than
<=Less than equal
>=Greater than equal
!=Not equal

NOTE

If event fired and notify_type = http,then event status send to post_url as JSON as follows:

POSTed payload
{
  "event_id":26,
  "description":"EMAIL & POST",
  "mapped_ch":1,
  "channel_name":"NEW_CH1_HOGEHOGE",
  "status":"value1 was consistent with the threshold. Current:13 = Threshold:13"}
}