advanced
integrations
iot
omni

Omni IoT Integration

Configure and manage Omni IoT devices using the SCOR protocol - lock/unlock commands, status requests, error handling, and vehicle settings

Levy Fleets Team25 décembre 202510 min read

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

1

Navigate to IoT Devices

Go to Dashboard → Settings → IoT Devices.

2

Add New Device

Click Add Device.

3

Enter IMEI

Input the device IMEI from the device label.

4

Select Model

Choose Omni or Omni-SCOR as the device model.

5

Assign to Vehicle

Link the device to a vehicle in your fleet.

6

Save Configuration

Click Save to complete setup.

Device Information

FieldDescription
IMEI15-digit unique device identifier
ModelOmni / Omni-SCOR
FirmwareController firmware version
SIM ICCIDSIM card identifier
Signal StrengthCellular 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:

1

Request Operation Key (R0)

Server sends R0 command with operation type.

2

Device Returns Key

Device responds with a temporary operation key.

3

Execute Lock/Unlock

Server sends L0 (unlock) or L1 (lock) with the key.

4

Device Confirms

Device acknowledges the operation.

R0 Command Format:

*SCOS,OM,<IMEI>,R0,<OPERATION>,<KEY_VALIDITY>,<USER_ID>,<TIMESTAMP>#
ParameterDescription
OPERATION0=Unlock, 1=Lock, 2=RFID unlock, 3=RFID lock
KEY_VALIDITYSeconds the key remains valid (default: 60)
USER_IDCustomer identifier
TIMESTAMPUnix 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>#
ParameterDescriptionDefault
S6_UNLOCKEDEnable S6 during rides (2=On, 1=Off)1
HEARTBEAT_SECONDSHeartbeat interval240
S6_INTERVALS6 upload interval while unlocked10

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>#
ParameterValues
HEADLIGHT0=Unchanged, 1=Off, 2=On
SPEED_MODE0=Unchanged, 1-3=Speed levels
THROTTLE_MODE0=Unchanged, 1=0-start, 2=Kick-start
TAILLIGHT0=Unchanged, 1=Off, 2=On

Warning Tones

Trigger Warning (V0)

*SCOS,OM,<IMEI>,V0,<TONE_CODE>#
Tone CodeDescription
1Out-of-range alert
2Locate vehicle alert
3Low battery alert
80Stop alert sound
81Enable 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

LevelMeaningAction
NoneNo errorNormal operation
WarningMinor issueMonitor, continue service
ErrorSignificant issueInvestigate soon
CriticalMajor malfunctionRemove from service

Common Error Codes

CodeHexDescriptionSeverity
00x00No errorNone
10x01Controller issueCritical
40x04Motor hall issueCritical
60x06Battery undervoltageWarning
100x0AThrottle issueCritical
110x0BBrake issueCritical
130x0DMotor phase lossCritical
160x10IoT no heartbeatError
320x20Taillight issueWarning
330x21Headlight issueWarning
340x22Battery 1 malfunctionCritical
350x23Battery 2 malfunctionError

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:

  1. Immediately set to Maintenance - Remove from customer view
  2. Log the error - Record for maintenance tracking
  3. Alert operations - Notify field staff
  4. 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:

FieldDescription
battery_percentCurrent battery level (0-100)
lock_status0=Unlocked, 1=Locked
ignition_statusVehicle power state
speed_kphCurrent speed
odometer_kmTotal distance traveled
charging_statusWhether battery is charging

D0 Location Frame

The D0 frame provides GPS data:

FieldDescription
latitudeGPS latitude
longitudeGPS longitude
gps_accuracyFix accuracy
satellitesNumber of satellites
timestampFix timestamp

Data Update Frequency

StateS6 IntervalD0 Interval
Locked (idle)Heartbeat (240s default)On demand
Unlocked (riding)S6_INTERVAL (10s default)Per S6
MovingIncreased frequencyPer movement

Dashboard Operations

Sending Commands

From the vehicle detail page:

1

Open Vehicle Details

Click on a vehicle to open its detail page.

2

Navigate to IoT Tab

Click the IoT or Commands tab.

3

Select Command

Choose the command from available options.

4

Configure Parameters

Fill in any required parameters.

5

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:

  1. Go to Vehicle Details → IoT
  2. Click Command History
  3. Review sent commands and responses
  4. Check for any failed commands

Troubleshooting

Device Not Responding

IssueSolution
No telemetryCheck SIM card, signal strength
Commands timeoutVerify device is online
Lock failsCheck operation key exchange
GPS not updatingDevice may be indoors

Connection Issues

  1. Verify SIM activation - Ensure cellular plan is active
  2. Check signal - Device needs adequate coverage
  3. Power cycle - May resolve temporary issues
  4. Firmware update - Outdated firmware may have bugs

Command Failures

ErrorCauseSolution
Key expiredR0 key timeoutRequest new key
Invalid IMEIWrong device IDVerify IMEI in dashboard
No responseDevice offlineWait for reconnection
Operation deniedController busyRetry after delay

Error Code Alerts

When error codes are reported:

  1. Check severity - Critical errors need immediate attention
  2. Review history - Is this a recurring issue?
  3. Cross-reference - Check for related telemetry anomalies
  4. Schedule service - Dispatch technician if needed

Best Practices

Device Configuration

  1. Enable S6 during rides - Set S6_UNLOCKED=2 for odometer tracking
  2. Set appropriate heartbeat - Balance battery vs. data freshness
  3. Monitor error codes - Set up alerts for critical errors
  4. Track firmware versions - Keep devices updated

Operational Guidelines

  1. Test after installation - Verify lock/unlock works
  2. Monitor new devices - Watch for early issues
  3. Regular health checks - Review device connectivity
  4. Document issues - Track recurring problems

Security Considerations

  1. Secure IMEI handling - Don't expose device identifiers
  2. Monitor unusual commands - Watch for unauthorized access
  3. Audit command logs - Review who sends what commands
  4. 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.