Sensors
Sensors represent individual data points that a device collects. Each sensor has a unique identifier (slug) that's used when devices send telemetry data.
Understanding Sensors
A Sensor is a specific measurement channel on a device:
- GPS Tracker: Might have sensors for "latitude", "longitude", "speed", "battery"
- Weather Station: Might have sensors for "temperature", "humidity", "pressure", "rainfall"
Each sensor is associated with a Sensor Type, which defines the unit of measurement and how the data should be visualized.
Sensor Types
Sensor Types are global templates that define how sensor data should be interpreted and displayed.
Creating a Sensor Type
- Navigate to Management > Sensors (or Management > All Sensors >> Sensor Types)
- Click + Create Sensor Type
- Fill in:
- Name: Descriptive name (e.g., "Temperature (Celsius)")
- Slug: Short identifier (e.g.,
temperature_c) - Unit: Measurement unit (e.g.,
°C,%,V,km/h) - Icon: (Optional) Select an icon for visual representation
- Data Type:
numeric,string,boolean,json
- Click Save
Default Sensor Types
The platform comes with commonly used sensor types:
- Temperature (Celsius/Fahrenheit)
- Humidity (%)
- Battery Voltage (V)
- GPS Latitude/Longitude
- Pressure (hPa, PSI)
- Speed (km/h, mph)
Adding Sensors to Devices
Sensors are configured per-device:
- Go to Device Details for the target device
- Navigate to the Sensors tab
- Click + Add Sensor
- Fill in:
- Sensor Name: Display name (e.g., "Engine Temperature")
- Sensor Slug: Identifier used in payloads (e.g.,
temp_engine)- Important: This slug must match the key in your device's JSON payload
- Sensor Type: Select from existing types
- Description: (Optional) Additional details
- Click Save
How Sensor Slugs Work
When a device sends data, the sensor slug maps the payload to the correct sensor.
Example:
Your device has these sensors configured:
- Slug:
temp→ Sensor Type: "Temperature (Celsius)" - Slug:
hum→ Sensor Type: "Humidity (%)"
Your device sends:
{
"temp": 24.5,
"hum": 60.2
}
The platform automatically:
- Stores
24.5as a temperature reading in °C - Stores
60.2as a humidity reading in % - Displays them on the appropriate charts with correct units
Sensor Profiles
Each sensor can have a Profile with additional metadata:
- Go to Device Details > Sensors
- Click on a sensor name
- Navigate to Profile tab
- Add key-value pairs:
min_range: Minimum expected valuemax_range: Maximum expected valuecalibration_offset: Adjustment factor- Custom attributes specific to your use case
This metadata can be used in Rule Chains for advanced processing.
Multi-Device Standardization
The separation of Sensor Slug (device-specific) and Sensor Type (global) allows flexibility:
Scenario: You have multiple brands of temperature sensors:
- Device A uses slug
tin its payload - Device B uses slug
tempin its payload - Device C uses slug
temperaturein its payload
All three can be mapped to the same Sensor Type ("Temperature (Celsius)"), allowing you to:
- View all temperatures on a unified dashboard
- Apply the same Rule Chains
- Generate cross-device reports
Best Practices
1. Use Descriptive Sensor Names
Good: "Engine Coolant Temperature" Bad: "Sensor 1"
2. Keep Slugs Short
Slugs are used in every telemetry message, so shorter = less bandwidth.
Good: temp_engine
Bad: engine_coolant_temperature_celsius
3. Standardize Sensor Types
Create reusable Sensor Types rather than custom types for every device.
4. Document Custom Attributes
If using custom sensor profile attributes, document their meaning for future reference.
Related Documentation
- Devices - Learn how to create and configure devices
- Rule Chains - Use sensor data to trigger automated actions
- MQTT API - Send sensor data via MQTT
- HTTP API - Send sensor data via HTTP