Skip to content

Event Data DTO Reference

The ThingsTelemetry\Traccar\Dto\EventData represents a Traccar event entity. Events describe state changes or notable conditions detected by the server (e.g., geofence enter/exit, ignition on/off, overspeed, etc.).

php
use ThingsTelemetry\Traccar\Facades\Event;

$event = Event::get(1234); // EventData

idinteger

Unique event identifier in Traccar.

php
$event->id; // 1234

typestring

Traccar event type string (e.g., "geofenceEnter", "ignitionOn", "deviceOnline").

php
$event->type; // "geofenceEnter"

eventTimeCarbonImmutable

Time the event occurred, parsed from ISO 8601.

php
$event->eventTime->toIso8601String(); // "2019-08-24T14:15:22Z"

deviceIdinteger

The device associated with this event.

php
$event->deviceId; // 42

positionIdinteger|null

Associated position record ID, if applicable for the event type.

php
$event->positionId; // 98765 or null

geofenceIdinteger|null

Associated geofence ID for geofence-related events.

php
$event->geofenceId; // 3 or null

maintenanceIdinteger|null

Associated maintenance record ID, if applicable.

php
$event->maintenanceId; // 10 or null

attributesarray<string, mixed>

Event-specific attributes payload returned by Traccar.

php
$event->attributes; // [ 'alarm' => 'powerCut', 'speed' => 32.1, ... ]

Released under the MIT License.