Skip to content
Gregory Sitnin edited this page Aug 20, 2013 · 2 revisions

AutomationController exports emit(eventName, [args]) method, which can be used to publish events to the general event bus.

Every single event message name in the system must comply “XXX.YYY” formast where XXX is a name of the event source (i.e.: “zway”) and YYY is a name of the event itself (i.e.: “structureUpdate”). Upon this, full name of the event message will be “zway.structureUpdate”.

Because of this different modules are able to emit messages with the same names and subscribers will not be mislead.

Every event message may be accompanied by any number of arguments (i.e. event “zway.structureUpdate” accompanied by the two arguments – changeType and deviceId).

Developers can introduce their custom event messages to the system. In such case it is very recommended to pay attention to the message name prefixes.

Clone this wiki locally