====MQTT Event Notifications====
This type of [[start|distribution]] sends incoming data to your MQTT server, with one topic per property.
However, rather than being a live stream of updates, these topics are only sent updates when a //significant change// happens.
For **discrete** values (on/off signals, statuses, text values etc.), messages will be sent with any change. This reflects machines turning on/off, doors closing etc.
For **analogue** values (measurements), these messages will only be sent if the value exceeds the //standard deviation// by more than a given amount - which defaluts to 3x.
As an alternative that pushes **all** data via MQTT with one message per point of data, see [[mqtt|mqtt]].
===Type Name===
The type name to use in your configuration is **mqttev** (MQTT EVent based).
===Configuration===
The following configuration options are accepted...
^Name^Notes^Purpose^
|hostname|Required|The DNS name or IP of your MQTT server|
|port|Default 1883|The port number used to communicate to the MQTT server|
|topic|Required|The base topic to publish to|
|username||The username to connect to the MQTT server|
|password||The password to connect to the MQTT server|
|bufferlen|5|The number of samples to record when calculating Standard Deviation|
|threshold|3|The number of times greater than the standard deviation the difference has to be/|
The //threshold// parameter allows you to adjust the sensitivity of the tests. The larger the number, the less sensitive the tests will be and the fewer events will be sent.
===Suggestions===
We usually suggest using the **fullpath** option in your [[configuring_live_data_distribution|configuration]] to replicate your ARDI asset hierarchy in your MQTT system. But this is not a requirement.
===Example Payload===
increased:22.5
or
changed:5