Jump to content


Rules, Listeners and Alarms

listener rule alarm

  • Please log in to reply
1 reply to this topic

#1 javier



  • Members
  • Pip
  • 4 posts

Posted 19 February 2013 - 11:19 PM

Can somebody explain in detail what is the difference between the three concepts (rule, listerner, alarm) and when/how they should be used?

#2 alvaro


    Carriots CTO

  • Administrators
  • 72 posts

Posted 20 February 2013 - 07:21 AM

Hello Javier.


Thanks for asking and letting the community learn about that specific topic. I'll explain you the main ideas behind those entities:


  • A listener is watching events that may occur related to an entity. It will be executed when the specific event is fired for the entity bounded. For example, a listener may be fired for the event data_received of the entity Parking4@Smartcity (a device), or a listener may be fired for the event data_persisted of the entity Environment@Smartcity (a service). It can be linked at any level of the hierarchy.


  • A rule is some custom Groovy code, a script, stored in Carriots that can be used in any listener. It’s useful for reusing code in different listeners. For example, you can write a script that takes some data from the context (see SDK documentation), queries Carriots DB for the last 10 measures, calculate the average and then send it by email or tweets it.


  • An alarm is a message that needs attention, like an alert. Users can raise alarms manually from REST API or SDK. For example when some values are not in a certain range. Carriots platform raise alarms when something goes wrong with a listener or a trigger. For example an execution error.


Hope it helps!

Alvaro Everlet

Carriots CTO

Also tagged with one or more of these keywords: listener, rule, alarm

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users