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_sensorfor 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/devicesif denied.
List and search
- Open Sensors.
- Use the Search box (debounced ~600 ms, passed as
_searchtoSensors.getwithdeviceid and_limit50). - Sensors render as cards with:
- Name, Parameter code, Status badge.
- Tags for sensor type and parameter names.
- Updated at timestamp.
- Row menu:
- View details (always).
- Edit —
update_sensorandlist_sensor_typeandlist_device_parameter. - Delete —
delete_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
fuelandvoltage).
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_sensorand API health. - Add sensor disabled: Missing
create_sensoror supporting list permissions. - Parameter combobox empty:
deviceTypeIdmissing orDeviceParameters.getreturned no rows for that type.