Jump to content

Template:FTX Bluetooth

From Teltonika Telematics Wiki


{{#switch: {{{model}}} | FTC305 | FTM305 | FTC134 | FTC887 | FTM887 =

Eye-Sensor Temperature/Humidity monitoring scenario

Introduction

This scenario monitors Bluetooth Low Energy (BLE) temperature and humidity sensors, dynamically tracking detected devices and logging environmental changes.

Prerequisites

To ensure the scenario functions correctly, the following conditions must be met:

BLE Support – The device must support BLE scanning to detect temperature and humidity sensors.

Compatible BLE Sensors – The scenario works with BLE temperature and humidity sensors that broadcast their data.

BLE Event Handling – The device must process the following BLE events:

  • ble.device_detected – Triggered when a new BLE sensor is detected.
  • ble.device_expired – Triggered when a BLE sensor is no longer detected.

How It Works

  • The scenario automatically tracks BLE sensors in real time.
  • When a new sensor is detected, the scenario adds it to the monitored list and logs its data.
  • If a previously monitored sensor disappears, it is marked as expired, and the scenario updates its status.
  • The device updates IO elements to reflect temperature and humidity changes.

Scenario States

Device Detection:

  • When a BLE sensor is detected (ble.device_detected), the scenario adds it to the active monitoring list.
  • It differentiates between newly detected sensors and those that are already being tracked.

Data Monitoring & Logging:

  • The scenario continuously monitors temperature and humidity values.
  • If significant changes occur, an event is recorded to log the updated readings.
  • The scenario updates IO elements to reflect the latest environmental data.

Device Expiration:

  • If a BLE sensor is no longer detected for a configured time (ble.device_expired), the scenario marks it as expired.
  • The scenario removes it from the active monitoring list and updates IO elements accordingly.

Continuous Tracking:

  • As new BLE sensors appear and old ones expire, the scenario dynamically manages the list of monitored devices.
  • This ensures that only currently active sensors are logged and processed.

Expected Behavior

  • Real-time monitoring of BLE temperature and humidity sensors.
  • Automatic tracking of newly detected and expired sensors.
  • Logging of temperature and humidity changes for records and reports.
  • IO element updates to reflect the latest sensor readings.