Freedomotic and its plugins send events when anything relevant happens.
Any event is sent on a messaging channel. A channel address is a simple
string with a hierarchical structure like app.sensors.event.object.behavior.changed
.
You can subscribe an event channel from a trigger which is a filter of events.
For example if your event is an object changed state
you can filter it using a trigger if
a light in the kitchen changed its powered state
.
Freedomotic events have a set of standard properties plus a list of properties related to the specific event.
The following properties are common to all events and can be intercepted and filtered by any trigger:
PROPERTY | POSSIBLE VALUES | DESCRIPTION |
---|---|---|
date.dayname | eg: Sunday | English name of the day in which the event is throwed |
date.day | eg: 4 for Thursday | The day number in which the event is throwed |
date.month | eg: October | The month name in which the event is throwed |
date.year | eg: 2016 | The year number in which the event is throwed |
time.hour | eg: 0-23 | The hour number in 24h format in which the event is throwed |
time.minute | eg: 0-59 | The minute of the current hour in which the event is throwed |
time.second | eg: 0-59 | The second of the current minute in which the event is throwed |
sender | The name of the module that have generated the event |
Here a list of predefined events:
EVENT | CHANNEL | DESCRIPTION |
---|---|---|
AccountEvent | app.event.sensor.account.change | Account status changed |
GenericEvent | app.event.sensor | Generic event. Use ONLY if there is not a specific event |
LocationEvent | app.event.sensor.person.movement.detected | Person position detected |
LuminosityEvent | app.event.sensor.luminosity | Luminosity changed |
MessageEvent | app.event.sensor.messages.MESSAGE_TYPE | Message notified |
ObjectHasChangedBehavior | app.event.sensor.object.behavior.change | Object behavior changed |
ObjectReceiveClick | app.event.sensor.object.behavior.clicked | Object clicked |
PersonEntersZone | app.event.sensor.person.zone.enter | Person enters a zone |
PersonExitsZone | app.event.sensor.person.zone.exit | Person exits a zone |
PluginHasChanged | app.event.sensor.plugin.change | Plugin status changed |
ProtocolRead | app.event.sensor.protocol.read.PROTOCOL_NAME | Protocol read |
ScheduledEvent | app.event.sensor.calendar.event.schedule | Time related event |
TemperatureEvent | app.event.sensor.temperature | Temperature changed |
ZoneHasChanged | app.event.sensor.environment.zone.change | Zone changed |
For event specific data please refer to the Javadocs of the event classes https://freedomotic.github.io/javadoc/freedomotic-core/com/freedomotic/events/package-summary.html
For example this is the list of properties available to a trigger that listen to ObjectReceiveClick events