Integrating IoT Sensors to FacilityBot (Door Contact Sensor)

Integrating IoT Sensors to FacilityBot is quick and easy.

For this article, we will use a LoRaWan Door Contact sensor connected to a Lora Gateway. However, FacilityBot can be integrated with any type of IoT sensors. 

The Lora Gateway will send data to FacilityBot using MQTT. FacilityBot can then show the sensor data in a chart on a dashboard or automatically trigger a request ticket if the sensor data exceeds a specified threshold.

Creating the Sensor in FacilityBot

  • Log in to FacilityBot and create a new Sensor in Integrations -> Sensors. Let’s call this a Door Contact Sensor. 
  • The data that the sensor will send is called `state.` 
  • Set the sensor to trigger a request when the state is `open.` 
  • To capture the sensor data in a chart, link the sensor to a meter which has already been created called `Door Contact Sensor.`

Automating Creation of Request When the Sensor is Triggered

A workflow automation can be set to allow the creation of request when the sensor is triggered.

  • In Features -> Workflows, create a workflow to create a new request when the sensor is triggered

Configuring MQTT Connection

The Lora Gateway also acts as a Network Server. 

  • Log in to the network server interface to configure the MQTT connection information from FacilityBot into the network server. 
  • Copy and paste the Host, Port, Username, Password and Sensor Topic from FacilityBot into the network server interface.

Testing the Integration

Once the  Lora Gateway and the Lora Gateway is connected to FacilityBot, we can test the integration. 

  • When the magnetic contact is separated, FacilityBot receives a payload indicating that the door is open. 
  • When magnet is brought back in contact with the sensor, FacilityBot receives the state as closed.
  • The meter will record when the sensor was opened and closed. A meter chart can be automatically generated showing when the sensor was opened and closed. This chart can be added to dashboards to be displayed in operations rooms.