Omni IoT Integration
Omni IoT devices provide vehicle connectivity through the SCOR TCP protocol. This guide covers device setup, available commands, error code interpretation, and configuration options.
Overview
Omni IoT devices communicate using the SCOR protocol, enabling:
- Lock/Unlock - Remote vehicle control
- Location Tracking - GPS position updates
- Status Monitoring - Battery, speed, odometer data
- Error Reporting - Controller malfunction alerts
- Vehicle Settings - Headlight, throttle, speed mode
Protocol Architecture
Levy Fleets Dashboard
↓
SCOR TCP Protocol
↓
Omni IoT Device
↓
UART Interface
↓
Vehicle Controller
The IoT device translates between SCOR (TCP) and UART (Controller), handling the communication protocol for both directions.
Device Setup
Adding an Omni Device
Navigate to IoT Devices
Go to Dashboard → Settings → IoT Devices.
Add New Device
Click Add Device.
Enter IMEI
Input the device IMEI from the device label.
Select Model
Choose Omni or Omni-SCOR as the device model.
Assign to Vehicle
Link the device to a vehicle in your fleet.
Save Configuration
Click Save to complete setup.
Device Information
| Field | Description |
|---|---|
| IMEI | 15-digit unique device identifier |
| Model | Omni / Omni-SCOR |
| Firmware | Controller firmware version |
| SIM ICCID | SIM card identifier |
| Signal Strength | Cellular connection quality |
SCOR Protocol Commands
Lock and Unlock
The primary commands for vehicle control:
Unlock Vehicle
*SCOS,OM,<IMEI>,S25,1,1,0#
Initiates the R0 → L0 handshake to unlock the scooter.
Lock Vehicle
*SCOS,OM,<IMEI>,S25,1,1,1#
Initiates the R0 → L1 handshake to lock the scooter.
Operation Key Handshake
For manual lock/unlock operations, the SCOR protocol uses a key exchange:
Request Operation Key (R0)
Server sends R0 command with operation type.
Device Returns Key
Device responds with a temporary operation key.
Execute Lock/Unlock
Server sends L0 (unlock) or L1 (lock) with the key.
Device Confirms
Device acknowledges the operation.
R0 Command Format:
*SCOS,OM,<IMEI>,R0,<OPERATION>,<KEY_VALIDITY>,<USER_ID>,<TIMESTAMP>#
| Parameter | Description |
|---|---|
| OPERATION | 0=Unlock, 1=Lock, 2=RFID unlock, 3=RFID lock |
| KEY_VALIDITY | Seconds the key remains valid (default: 60) |
| USER_ID | Customer identifier |
| TIMESTAMP | Unix timestamp for correlation |
Status and Location
Request Vehicle Status (S6)
*SCOS,OM,<IMEI>,S6#
Returns battery level, lock state, ignition status, speed, and odometer.
Request Location (D0)
*SCOS,OM,<IMEI>,D0#
Returns GPS coordinates with the latest fix.
Heartbeat Configuration
Set Heartbeat Settings (S5)
*SCOS,OM,<IMEI>,S5,0,<S6_UNLOCKED>,<HEARTBEAT_SECONDS>,<S6_INTERVAL>#
| Parameter | Description | Default |
|---|---|---|
| S6_UNLOCKED | Enable S6 during rides (2=On, 1=Off) | 1 |
| HEARTBEAT_SECONDS | Heartbeat interval | 240 |
| S6_INTERVAL | S6 upload interval while unlocked | 10 |
S6 During Rides
Enable S6_UNLOCKED=2 to receive odometer readings during active rides. This provides accurate distance tracking.
Vehicle Settings
Configure Vehicle Settings (S7)
*SCOS,OM,<IMEI>,S7,<HEADLIGHT>,<SPEED_MODE>,<THROTTLE_MODE>,<TAILLIGHT>#
| Parameter | Values |
|---|---|
| HEADLIGHT | 0=Unchanged, 1=Off, 2=On |
| SPEED_MODE | 0=Unchanged, 1-3=Speed levels |
| THROTTLE_MODE | 0=Unchanged, 1=0-start, 2=Kick-start |
| TAILLIGHT | 0=Unchanged, 1=Off, 2=On |
Warning Tones
Trigger Warning (V0)
*SCOS,OM,<IMEI>,V0,<TONE_CODE>#
| Tone Code | Description |
|---|---|
| 1 | Out-of-range alert |
| 2 | Locate vehicle alert |
| 3 | Low battery alert |
| 80 | Stop alert sound |
| 81 | Enable alert sound |
Firmware and Diagnostics
Get Firmware Version (G0)
*SCOS,OM,<IMEI>,G0#
Returns controller firmware version details.
Request Error Codes (E0)
*SCOS,OM,<IMEI>,E0#
Returns current controller error codes.
Error Codes
Error Severity Levels
| Level | Meaning | Action |
|---|---|---|
| None | No error | Normal operation |
| Warning | Minor issue | Monitor, continue service |
| Error | Significant issue | Investigate soon |
| Critical | Major malfunction | Remove from service |
Common Error Codes
| Code | Hex | Description | Severity |
|---|---|---|---|
| 0 | 0x00 | No error | None |
| 1 | 0x01 | Controller issue | Critical |
| 4 | 0x04 | Motor hall issue | Critical |
| 6 | 0x06 | Battery undervoltage | Warning |
| 10 | 0x0A | Throttle issue | Critical |
| 11 | 0x0B | Brake issue | Critical |
| 13 | 0x0D | Motor phase loss | Critical |
| 16 | 0x10 | IoT no heartbeat | Error |
| 32 | 0x20 | Taillight issue | Warning |
| 33 | 0x21 | Headlight issue | Warning |
| 34 | 0x22 | Battery 1 malfunction | Critical |
| 35 | 0x23 | Battery 2 malfunction | Error |
Error Code Response
When requesting error codes via E0, the response contains:
{
"code": "4",
"hex": "0x04",
"description": "Motor hall issue",
"severity": "critical",
"userFriendlyMessage": "Motor sensor malfunction - do not ride",
"technicalDetails": "Motor hall effect sensor failure detected"
}
Critical Error Actions
When a critical error is detected:
- Immediately set to Maintenance - Remove from customer view
- Log the error - Record for maintenance tracking
- Alert operations - Notify field staff
- Schedule inspection - Arrange physical check
Ride-Precluding Errors
Vehicles with critical errors should NOT be available for customer rides. The system can automatically flag these vehicles for maintenance.
Telemetry Data
S6 Status Frame
The S6 frame provides comprehensive vehicle status:
| Field | Description |
|---|---|
| battery_percent | Current battery level (0-100) |
| lock_status | 0=Unlocked, 1=Locked |
| ignition_status | Vehicle power state |
| speed_kph | Current speed |
| odometer_km | Total distance traveled |
| charging_status | Whether battery is charging |
D0 Location Frame
The D0 frame provides GPS data:
| Field | Description |
|---|---|
| latitude | GPS latitude |
| longitude | GPS longitude |
| gps_accuracy | Fix accuracy |
| satellites | Number of satellites |
| timestamp | Fix timestamp |
Data Update Frequency
| State | S6 Interval | D0 Interval |
|---|---|---|
| Locked (idle) | Heartbeat (240s default) | On demand |
| Unlocked (riding) | S6_INTERVAL (10s default) | Per S6 |
| Moving | Increased frequency | Per movement |
Dashboard Operations
Sending Commands
From the vehicle detail page:
Open Vehicle Details
Click on a vehicle to open its detail page.
Navigate to IoT Tab
Click the IoT or Commands tab.
Select Command
Choose the command from available options.
Configure Parameters
Fill in any required parameters.
Send Command
Click Send and monitor the response.
Viewing Telemetry
The dashboard displays real-time telemetry:
- Battery Level - Current charge percentage
- Lock Status - Locked/Unlocked indicator
- Last Location - GPS coordinates and timestamp
- Speed - Current or last reported speed
- Odometer - Total distance reading
- Error Status - Any active error codes
Command History
View recent commands sent to the device:
- Go to Vehicle Details → IoT
- Click Command History
- Review sent commands and responses
- Check for any failed commands
Troubleshooting
Device Not Responding
| Issue | Solution |
|---|---|
| No telemetry | Check SIM card, signal strength |
| Commands timeout | Verify device is online |
| Lock fails | Check operation key exchange |
| GPS not updating | Device may be indoors |
Connection Issues
- Verify SIM activation - Ensure cellular plan is active
- Check signal - Device needs adequate coverage
- Power cycle - May resolve temporary issues
- Firmware update - Outdated firmware may have bugs
Command Failures
| Error | Cause | Solution |
|---|---|---|
| Key expired | R0 key timeout | Request new key |
| Invalid IMEI | Wrong device ID | Verify IMEI in dashboard |
| No response | Device offline | Wait for reconnection |
| Operation denied | Controller busy | Retry after delay |
Error Code Alerts
When error codes are reported:
- Check severity - Critical errors need immediate attention
- Review history - Is this a recurring issue?
- Cross-reference - Check for related telemetry anomalies
- Schedule service - Dispatch technician if needed
Best Practices
Device Configuration
- Enable S6 during rides - Set S6_UNLOCKED=2 for odometer tracking
- Set appropriate heartbeat - Balance battery vs. data freshness
- Monitor error codes - Set up alerts for critical errors
- Track firmware versions - Keep devices updated
Operational Guidelines
- Test after installation - Verify lock/unlock works
- Monitor new devices - Watch for early issues
- Regular health checks - Review device connectivity
- Document issues - Track recurring problems
Security Considerations
- Secure IMEI handling - Don't expose device identifiers
- Monitor unusual commands - Watch for unauthorized access
- Audit command logs - Review who sends what commands
- Update credentials - Rotate any shared secrets
API Reference
Send Command
POST /api/iot/scor
{
"imei": "123456789012345",
"command": "*SCOS,OM,123456789012345,S6#"
}
Command Response
{
"success": true,
"command_id": "cmd_abc123",
"sent_at": "2025-01-15T10:30:00Z",
"response": {
"received": true,
"data": { /* telemetry */ }
}
}
Telemetry Webhook
Telemetry updates can trigger webhooks:
{
"event": "vehicle.location_updated",
"data": {
"vehicle_id": "uuid",
"latitude": 40.7128,
"longitude": -74.0060,
"battery_percent": 85,
"lock_status": 1
}
}
Reliable IoT Integration
Omni devices with the SCOR protocol provide robust vehicle control and monitoring. Configure heartbeat intervals appropriately, monitor error codes, and keep firmware updated for optimal performance.