Tanstack Start
Fleet & trackingDevices

Device sensors

Manage sensors on Teltonika devices — list, search, CRUD.

Path: /dashboard/fleet-management/devices/:deviceId/sensors

Purpose

List sensors attached to a device, search them, view details, and (with permission) add, edit, or remove sensors. Backed by Sensors.get and sensor mutations inside dialogs.

When the tab appears

  • Device type code must be Teltonika.
  • You need view_sensor for the tab link and route guard.

If the tab is hidden, you lack view_sensor or the device is not Teltonika.

Route guard

  • view_sensor; redirect to /dashboard/fleet-management/devices if denied.
  1. Open Sensors.
  2. Use the Search box (debounced ~600 ms, passed as _search to Sensors.get with device id and _limit 50).
  3. Sensors render as cards with:
    • Name, Parameter code, Status badge.
    • Tags for sensor type and parameter names.
    • Updated at timestamp.
  4. Row menu:
    • View details (always).
    • Editupdate_sensor and list_sensor_type and list_device_parameter.
    • Deletedelete_sensor.

Add sensor

Button: Add sensor when you have create_sensor and list_sensor_type and list_device_parameter.

The dialog is multi-step for fuel tank sensor types (sensor information → tank configuration → calibration points with optional CSV import). Other sensor types may use a single step. Fields include:

  • Name, Sensor type, Device parameter (filtered by device type), Status (object status lookup), Debounce window when required for specific types.
  • Fuel tank: volumes, timeouts, detect in motion, and calibration points (fuel/voltage pairs; CSV columns fuel and voltage).

Submit calls the create sensor API; list refreshes on success.

Edit / delete

  • Edit opens a dialog with the same permission requirements as the menu item.
  • Delete opens a confirmation dialog and removes the sensor on confirm.

Troubleshooting

  • “No sensors found”: None configured, or search too narrow.
  • Load error: Retry; verify view_sensor and API health.
  • Add sensor disabled: Missing create_sensor or supporting list permissions.
  • Parameter combobox empty: deviceTypeId missing or DeviceParameters.get returned no rows for that type.

On this page