Setting a MQTT Integration
Last updated
Last updated
TilliT does not send information over MQTT by default, you need to configure that types of information you want to be sent. This is done by creating an MQTT integration which will send an MQTT message when a specific event occurs. For instance when an Order Started event occurs or Shift Started.
Navigate to Integrations and create a Channel
Fill in the form like so and hit Save and Open
Now we need to create a subscription which will cause an MQTT message to be sent, for this example we want this to happen on any Equipment Stopped Event. Click Actions -> Create and fill in the following form.
Now whenever an Equipment Stopped event is raised, we can receive this event as an MQTT message.
You can also filter the subscription so you only receive events that meet a certain condition. The fields you fill in above will define how specific or broad the subscription is:
Event Type - select the event trigger you wish to use (see Event Type).
Asset - defines a specific Asset to subscribe to.
Order - defines a specific Order to subscribe to.
Activity Key - defines a Activity asset to subscribe to.
Activities Included - does not apply to Webhooks (for email subscriptions only).
If you only select an event type, you will receive payloads every time that event triggers. Using the other fields allows you to make more specific subscriptions.
We have now configured TilliT to send an MQTT message on the Equipment Stopped event. In previous steps we also described how to connect to the TilliT Broker and what topic to subscribe to receive the event. You can use the code snippet provided here and adjust to the steps outlined here.
Subscribe to the tenant/#
topic
Manually raise an Equipment Stopped event in TilliT
See that you receive a similar payload body via MQTT as shown below