Forwarders

Redirect data to an endpoint

Forwarders in Pegasus allow real-time data redirection from the platform to external endpoints via HTTP POST requests. These forwarders help you integrate Pegasus with external systems by sending event-driven JSON payloads.

Here's an example of a forwarder (FWD):

// GET /forwarders/:id
{
    "__created": 1634760253.175798,
    "__updated": 1738800080.328601,
    "__version": "7.5.4",
    "dates_format": "ISOFORMAT",
    "extra_headers": {},
    "forward_conn_events": false,
    "forward_gps_events": true,
    "forward_other_eventtypes_csv": null,
    "general": {
      "stop_send": true,
      "stop_queue": true,
      "discard": true
    },
    "groups_filter": [456],
    "id": 123,
    "INBOX_DB_DUMP_AT": 1010000,
    "include_evname": null,
    "include_vinfo": true,
    "MAX_MESS_PER_CALL": 50,
    "port": null,
    "protocol": "FWD:json_fwd",
    "resource": "https://yourwebsite.com/pegasus-forwarder/",
    "time_zone": "UTC",
    "vehicle_count": 1010
}

There are two primary forwarder types or protocols in Pegasus:

  1. FWD:json_fwd - Sends vehicle events with telemetry data.
  2. FWD:devicepkg - Sends all device data from the vehicle-events subscription (except for the latest field, since json_fwd is intended for this).

Unlike Live Communications, forwarders ensure data persistence by using an active queue that requires message acknowledgments from the receiving endpoint.

FeatureFWD (json_fwd & devicepkg)Live Communications (WebSockets)
Data TypeJSON-based event payloadsJSON-based event messages
Delivery MethodHTTP POST requests to an endpointWebSocket messages
Use CaseStoring, processing, and integrating event data into databasesLive updates for applications requiring immediate reaction
ReliabilityEnsures delivery via queueing & acknowledgmentsNo retry mechanism; relies on WebSocket connection
LatencyHigher latency due to HTTP overheadLower latency with direct event push
Recommended forDatabase replication, historical storage, external system integration, real time data from very large fleetsLive dashboards, real-time monitoring, instant event handling, real time data from smaller fleets

⚠️ Important! Forwarders can only be created by DCT administrators on your Pegasus site. They come at an additional cost, so please contact the support team to set them up.

Once a forwarder is created, you can manage it using the Forwarders API

Procedure to Request a New FWD

The procedure for creating a forwarder in your Pegasus site is as follow:

  1. Follow the instructions on this page and implement the Forwarder data receiver endpoint (be sure to test with cURL or similar)
  2. Send the DCT support team ([email protected]) the protocol of forwarder to create (FWD:json_fwd or FWD:devicepkg).
  3. Optional - we also offer pre-configured integrations for external platforms. Check out the list here: Market Ready Integrated Solutions, if you are interested we can market your solution for you in front of other Pegasus gateway owners and you can receive an additional income stream with this.


FWD:json_fwd vs FWD:devicepkg

  1. FWD:json_fwd Forwarder (Vehicle Events)
    Sends only vehicle events with telemetry data.
    The event data includes:
    • Location (lat, lon)
    • Speed (mph)
    • Status (event_code)
    • ECU data (all engine data)
    • Accessory information (temperature and other sensors)
    • GPIO states (ignition, power, inputs, outputs, etc.)
    • Best for: Real-time tracking and monitoring vehicle activity.
  2. FWD:devicepkg Forwarder (Full Device Data)
    Sends all available device data except latest.
    Includes:
    • Pending commands
    • Configuration status
    • Trip state
    • Network status
    • Online/offline state
    • Best for: Deep analysis of device activity, diagnostics, and command tracking. For a detailed list of fields in devicepkg, see: Live Communications Device Data .

Receiving Forwarder Data

As mentioned previously we require an endpoint in order to send the Forwarder data in real-time. Thus on your servers you can implement a receiver of this data using any programming language. Here's a couple of examples in JS & Python.

# Example using Express server on NodeJS

const express = require('express');
const app = express();
app.use(express.json()); // Middleware to parse JSON

app.post('/pegasus-forwarder', (req, res) => {
    const events = req.body;
    console.log("Received events:", events);

    // Example: Logging event data
    events.forEach(event => {
        console.log(`Event ID: ${event.id}, Vehicle ID: ${event.vid}, Location: ${event.lat},${event.lon}`);
    });

    // Send acknowledgment
    res.json([]); 
});

app.listen(3000, () => console.log('Listening on port 3000'));


# Example with Flask server using Python

from flask import Flask, request, jsonify

app = Flask(__name__)

@app.route('/pegasus-forwarder', methods=['POST'])
def receive_forwarder():
    events = request.json
    print("Received events:", events)

    for event in events:
        print(f"Event ID: {event['id']}, Vehicle ID: {event['vid']}, Location: {event['lat']},{event['lon']}")

    # Send acknowledgment
    return jsonify([])

if __name__ == '__main__':
    app.run(port=3000)


Testing the Forwarder

Before requesting activation, you can test your endpoint using cURL:

curl -X POST "https://your-server.com/pegasus-forwarder" \
-H "Content-Type: application/json" \
-d '[{"lat": 25.23432, "lon": -80.24912, "id":10001, "vid": 1392},{"lat": 25.23433, "lon": -80.24913, "id":10002, "vid": 1393}]'

# Expected response
[]

# If an event fails, respond with its id to request a retry:
[10001]

const axios = require('axios');

// Define the endpoint and payload
const url = "https://your-server.com/pegasus-forwarder";
const payload=[{id:289,event_time:"2025-02-02T07:01:26.397",system_time:"2025-02-02T07:01:26.397",lat:25.167934,lon:-79.782812,mph:43,hdop:15,vdop:63,pdop:53,aid:443,vid:3398,device_id:60136,cf_cid:4561,cf_lac:1234,cf_mcc:925,cf_mnc:82,cf_rssi:-84,cf_type:"3G",ecu_speed:68,ecu_rpm:1738,ecu_fuel_level:3,ecu_battery:14,ecu_maf:15,ecu_throttle:40,ecu_brake_pedal:!1,ecu_transmission_gear:2,event_type:5,valid_position:!0},{id:657,event_time:"2025-02-02T07:01:26.397",system_time:"2025-02-02T07:01:26.397",lat:25.682332,lon:-79.925022,mph:62,hdop:38,vdop:99,pdop:3,aid:180,vid:6827,device_id:43835,cf_cid:3043,cf_lac:8508,cf_mcc:958,cf_mnc:45,cf_rssi:-81,cf_type:"4G",ecu_speed:10,ecu_rpm:3430,ecu_fuel_level:100,ecu_battery:10,ecu_maf:26,ecu_throttle:77,ecu_brake_pedal:!0,ecu_transmission_gear:6,event_type:4,valid_position:!0}];

// Set headers
const headers = { "Content-Type": "application/json" };

// Send the POST request
axios.post(url, payload, { headers })
    .then(response => {
        console.log("Response:", response.data);
    })
    .catch(error => {
        console.error("Error:", error.message);
    });

import requests
import json

# Define the endpoint and payload
url = "https://your-server.com/pegasus-forwarder"
payload = [{"id":289,"event_time":"2025-02-02T07:01:26","system_time":"2025-02-02T07:01:26.397","lat":25.167934,"lon":-79.782812,"mph":43,"hdop":15,"vdop":63,"pdop":53,"aid":443,"vid":3398,"device_id":60136,"cf_cid":4561,"cf_lac":1234,"cf_mcc":925,"cf_mnc":82,"cf_rssi":-84,"cf_type":"3G","ecu_speed":68,"ecu_rpm":1738,"ecu_fuel_level":3,"ecu_battery":14,"ecu_maf":15,"ecu_throttle":40,"ecu_brake_pedal":False,"ecu_transmission_gear":2,"event_type":5,"valid_position":True},{"id":657,"event_time":"2025-02-02T07:01:26","system_time":"2025-02-02T07:01:26.397","lat":25.682332,"lon":-79.925022,"mph":62,"hdop":38,"vdop":99,"pdop":3,"aid":180,"vid":6827,"device_id":43835,"cf_cid":3043,"cf_lac":8508,"cf_mcc":958,"cf_mnc":45,"cf_rssi":-81,"cf_type":"4G","ecu_speed":10,"ecu_rpm":3430,"ecu_fuel_level":100,"ecu_battery":10,"ecu_maf":26,"ecu_throttle":77,"ecu_brake_pedal":True,"ecu_transmission_gear":6,"event_type":4,"valid_position":True}]

# Set headers
headers = {"Content-Type": "application/json"}

# Send the POST request
response = requests.post(url, data=json.dumps(payload), headers=headers)

# Print the response
response.text


Sample Full payloads

Click here for a list of all json_fwd telemetry data

# json_fwd
curl -X POST "https://your-server.com/pegasus-forwarder" \
-H "Content-Type: application/json" \
-d '[{"id":1,"event_time":"2021-04-12T18:00:00","system_time":"2021-04-12T18:00:01.123456","ac":2,"ad":3,"adas_distance_from_front_vehicle":1,"adas_headway_measurement":2,"adas_headway_warning_level":3,"adas_relative_speed_from_front_vehicle":4,"adas_speed_limit_recognition_sensitivity":5,"adas_speed_limit_recognition_state":6,"adas_speed_limit_recognition":7,"adas_speed":8,"adas_traffic_signs_recognition_warning_level":9,"adas_vision_only_sign_type":10,"age":4,"aid":5,"al":6,"an_diff_in1_in2":7,"an_diff_in3_in4":8,"an_diff_in5_in6":9,"an_diff_in7_in8":10,"an_fdiff_in1_in2":11,"an_fdiff_in3_in4":12,"an_fdiff_in5_in6":13,"an_fdiff_in7_in8":14,"an_in1":15,"an_in2":16,"an_in3":17,"an_in4":18,"an_in5":19,"an_in6":20,"an_in7":21,"an_in8":22,"ap_cur_deg_x":23,"ap_cur_deg_y":24,"ap_cur_deg_z":25,"ap_cur_mag":26,"ap_mov":true,"ap_ref_deg_x":27,"ap_ref_deg_y":28,"ap_ref_deg_z":29,"axl_weight_trailer":30,"axl_weight_trailer_total":31,"axl_weight_truck":32,"axl_weight_truck_total":33,"axl_weights":"111,222,333,444,555,666,777,888,999,123,124,127","axl_weights_01":34,"axl_weights_02":35,"axl_weights_03":36,"axl_weights_04":37,"axl_weights_05":38,"axl_weights_06":39,"axl_weights_07":40,"axl_weights_08":41,"bl":42,"btt_battery":43,"btt_button":true,"btt_driver":"aa:bb:cc:dd:ee:ff","btt_driver_set":true,"btt_freefall":true,"btt_humidity":44,"btt_impact":true,"btt_light":45,"btt_mac":"11:22:33:44:55:66","btt_motion":true,"btt_presence":true,"btt_reed":true,"btt_temp":46,"btt_wreason":"X","ce":47,"cf_cid":48,"cf_lac":49,"cf_mcc":50,"cf_mnc":51,"cf_rssi":52,"cf_type":"3G","checkpoint":53,"cl":54,"climb_detection":true,"code":55,"comdelay":56,"counter_ack_duration":57,"counter_bytes_mo":58,"counter_bytes_mt":59,"counter_io_tamper":1,"counter_io_in1":2,"counter_io_in2":3,"counter_io_in3":4,"counter_io_out2":5,"counter_io_out1":6,"counter_io_exp_in1":7,"counter_io_exp_in2":8,"counter_io_exp_in3":9,"counter_io_exp_in4":10,"counter_io_exp_out1":11,"counter_io_exp_out2":12,"counter_io_exp_out3":13,"counter_io_exp_out4":14,"counter_io_exp_out1_short":15,"counter_io_exp_out2_short":16,"counter_io_exp_out3_short":17,"counter_io_exp_out4_short":18,"counter_reset_gprs":60,"counter_reset_gprs_bearer":61,"counter_reset_gsm":62,"counter_retransmissions":63,"counter_transmissions":64,"cr":65,"cs":66,"cv00":67,"cv01":68,"cv02":69,"cv03":70,"cv04":71,"cv05":72,"cv06":73,"cv07":74,"cv08":75,"cv09":76,"cv10":77,"cv11":78,"cv12":79,"cv13":80,"cv14":81,"cv15":82,"cv16":83,"cv17":84,"cv18":85,"cv19":86,"cv20":87,"cv21":88,"cv22":89,"cv23":90,"cv24":91,"cv25":92,"cv26":93,"cv27":94,"cv28":95,"cv29":96,"cv30":97,"cv31":98,"cv32":99,"cv33":100,"cv34":101,"cv35":102,"cv36":103,"cv37":104,"cv38":105,"cv39":106,"cv40":107,"cv41":108,"cv42":109,"cv43":110,"cv44":111,"cv45":112,"cv46":113,"cv47":114,"cv48":115,"cv49":116,"dev_dist":117,"dev_idle":118,"dev_ign":119,"dev_orpm":120,"dev_ospeed":121,"device_id":122,"dphoto_ptr":123,"ea_a":124,"ea_b":125,"ea_c":126,"ecu_ac_high_pressure_fan_flag":"T","ecu_ac_high_pressure_fan":127,"ecu_ac_state_flag":"T","ecu_ac_state":1,"ecu_accumulated_charge_flag":"T","ecu_accumulated_charge":1,"ecu_accumulated_discharge_flag":"T","ecu_accumulated_discharge":3,"ecu_aftmt_doc_intk_tmp_flag":"T","ecu_aftmt_doc_intk_tmp":128,"ecu_aftmt_dpf_diff_psi_flag":"T","ecu_aftmt_dpf_diff_psi":129,"ecu_aftmt_dpf_intake_tmp_flag":"T","ecu_aftmt_dpf_intake_tmp":130,"ecu_aftmt_dpf_outlet_tmp_flag":"T","ecu_aftmt_dpf_outlet_tmp":131,"ecu_aftmt_dpf_soot_load_flag":"T","ecu_aftmt_dpf_soot_load":132,"ecu_aftmt_intake_nox_flag":"T","ecu_aftmt_intake_nox":133,"ecu_aftmt_outlet_nox_flag":"T","ecu_aftmt_outlet_nox":134,"ecu_aftmt_purge_air_act_flag":"T","ecu_aftmt_purge_air_act":135,"ecu_aftmt_scr_intake_tmp_flag":"T","ecu_aftmt_scr_intake_tmp":136,"ecu_aftmt_scr_outlet_tmp_flag":"T","ecu_aftmt_scr_outlet_tmp":137,"ecu_air_flow_state_flag":"T","ecu_air_flow_state":2,"ecu_aload_flag":"T","ecu_aload":138,"ecu_ambient_air_tmp_flag":"T","ecu_ambient_air_tmp":139,"ecu_b2v_pack_current_flag":"T","ecu_b2v_pack_current":5,"ecu_b2v_pack_in_high_voltage_flag":"T","ecu_b2v_pack_in_high_voltage":7,"ecu_battery_flag":"T","ecu_battery":140,"ecu_bms1_high_voltage_alarm_flag":"T","ecu_bms1_high_voltage_alarm":1,"ecu_bms1_highest_temp_batt_pack_flag":"T","ecu_bms1_highest_temp_batt_pack":2,"ecu_bms1_low_voltage_alarm_flag":"T","ecu_bms1_low_voltage_alarm":3,"ecu_bms1_lowest_temp_batt_pack_flag":"T","ecu_bms1_lowest_temp_batt_pack":4,"ecu_bms1_negative_insulation_resistance_flag":"T","ecu_bms1_negative_insulation_resistance":9,"ecu_bms1_positive_insulation_resistance_flag":"T","ecu_bms1_positive_insulation_resistance":7,"ecu_bms1_soc_flag":"T","ecu_bms1_soc":5,"ecu_bms1_total_amps_flag":"T","ecu_bms1_total_amps":3,"ecu_bms1_total_voltage_flag":"T","ecu_bms1_total_voltage":1,"ecu_bms2_batt_max_temp_flag":"T","ecu_bms2_batt_max_temp":5,"ecu_bms2_batt_min_temp_flag":"T","ecu_bms2_batt_min_temp":6,"ecu_bms2_higher_voltage_cell_flag":"T","ecu_bms2_higher_voltage_cell":7,"ecu_bms2_lower_voltage_cell_flag":"T","ecu_bms2_lower_voltage_cell":8,"ecu_bms3_fullbatt_threshold_fail_flag":"T","ecu_bms3_fullbatt_threshold_fail":9,"ecu_bms3_lowbatt_threshold_fail_flag":"T","ecu_bms3_lowbatt_threshold_fail":10,"ecu_bms3_max_charge_current_allowed_flag":"T","ecu_bms3_max_charge_current_allowed":11,"ecu_bms3_max_charge_voltage_allowed_flag":"T","ecu_bms3_max_charge_voltage_allowed":12,"ecu_bms3_max_cont_charge_current_allowed_flag":"T","ecu_bms3_max_cont_charge_current_allowed":13,"ecu_bms3_max_discharge_current_allowed_flag":"T","ecu_bms3_max_discharge_current_allowed":14,"ecu_bms4_batt_nominal_voltage_flag":"T","ecu_bms4_batt_nominal_voltage":15,"ecu_bms4_total_batt_case_flag":"T","ecu_bms4_total_batt_case":16,"ecu_bms4_total_batt_temp_nodes_flag":"T","ecu_bms4_total_batt_temp_nodes":17,"ecu_bms4_total_cell_chain_flag":"T","ecu_bms4_total_cell_chain":18,"ecu_bms5_charger_connected_flag":"T","ecu_bms5_charger_connected":19,"ecu_bms6_batt_cooling_request_flag":"T","ecu_bms6_batt_cooling_request":20,"ecu_bms7_batt_current_sensor_fail_flag":"T","ecu_bms7_batt_current_sensor_fail":21,"ecu_bms7_batt_temp_sensor_fail_flag":"T","ecu_bms7_batt_temp_sensor_fail":22,"ecu_bms7_batt_terminal_temp_sensor_fail_flag":"T","ecu_bms7_batt_terminal_temp_sensor_fail":23,"ecu_bms7_charge_alarm_comm_flag":"T","ecu_bms7_charge_alarm_comm":24,"ecu_bms7_charge_overcurrent_alarm_flag":"T","ecu_bms7_charge_overcurrent_alarm":25,"ecu_bms7_comm_slave_alarm_flag":"T","ecu_bms7_comm_slave_alarm":26,"ecu_bms7_discharge_overcurrent_alarm_flag":"T","ecu_bms7_discharge_overcurrent_alarm":27,"ecu_bms7_low_total_voltage_alarm_flag":"T","ecu_bms7_low_total_voltage_alarm":28,"ecu_bms7_total_overvoltage_alarm_flag":"T","ecu_bms7_total_overvoltage_alarm":29,"ecu_bms9_nominal_current_capacity_flag":"T","ecu_bms9_nominal_current_capacity":30,"ecu_bms9_nominal_power_flag":"T","ecu_bms9_nominal_power":31,"ecu_bms9_remaining_power_flag":"T","ecu_bms9_remaining_power":32,"ecu_bpressure_flag":"T","ecu_bpressure":141,"ecu_brake_pedal_flag":"T","ecu_brake_pedal":142,"ecu_ccontrol_flag":"T","ecu_ccontrol_set_speed_flag":"T","ecu_ccontrol_set_speed":144,"ecu_ccontrol":143,"ecu_clutch_pedal_flag":"T","ecu_clutch_pedal":145,"ecu_cool_lvl_flag":"T","ecu_cool_lvl":146,"ecu_cool_psi_flag":"T","ecu_cool_psi":147,"ecu_cool_tmp_flag":"T","ecu_cool_tmp":148,"ecu_ddemand_flag":"T","ecu_ddemand":149,"ecu_def_consumed_flag":"T","ecu_def_consumed":150,"ecu_def_level_flag":"T","ecu_def_level":151,"ecu_def_tmp_flag":"T","ecu_def_tmp":152,"ecu_dist":153,"ecu_distance_flag":"T","ecu_distance":154,"ecu_door_closed_flag":"T","ecu_door_closed":3,"ecu_dpf_intake_psi_flag":"T","ecu_dpf_intake_psi":155,"ecu_dpf_soot_load_flag":"T","ecu_dpf_soot_load":156,"ecu_dpf_status_flag":"T","ecu_dpf_status":157,"ecu_drive_state_flag":"T","ecu_drive_state":4,"ecu_dtc_cleared_flag":"T","ecu_dtc_cleared":158,"ecu_eidle":159,"ecu_eload_flag":"T","ecu_eload":160,"ecu_eng_crank_psi_flag":"T","ecu_eng_crank_psi":161,"ecu_eng_egr_diff_psi_flag":"T","ecu_eng_egr_diff_psi":162,"ecu_eng_egr_maf_flag":"T","ecu_eng_egr_maf":163,"ecu_eng_egr_tmp_flag":"T","ecu_eng_egr_tmp":164,"ecu_eng_egr_valve_control_flag":"T","ecu_eng_egr_valve_control":165,"ecu_eng_egr_valve_pos_flag":"T","ecu_eng_egr_valve_pos":166,"ecu_eng_exhaust_psi_flag":"T","ecu_eng_exhaust_psi":167,"ecu_eng_exhaust_tmp_flag":"T","ecu_eng_exhaust_tmp":168,"ecu_eng_intake_manif_psi_flag":"T","ecu_eng_intake_manif_psi":169,"ecu_eng_load_flag":"T","ecu_eng_load":170,"ecu_eng_maf_flag":"T","ecu_eng_maf":171,"ecu_eng_oil_lvl_flag":"T","ecu_eng_oil_lvl":172,"ecu_eng_oil_psi_flag":"T","ecu_eng_oil_psi":173,"ecu_eng_oil_tmp_flag":"T","ecu_eng_oil_tmp":174,"ecu_eng_pto_governor_enable_flag":"T","ecu_eng_pto_governor_enable":175,"ecu_eng_pto_pprog_speed_control_flag":"T","ecu_eng_pto_pprog_speed_control":176,"ecu_eng_ref_torque_flag":"T","ecu_eng_ref_torque":177,"ecu_eng_turbo_intake_psi_flag":"T","ecu_eng_turbo_intake_psi":178,"ecu_eng_turbo_intake_tmp_flag":"T","ecu_eng_turbo_intake_tmp":179,"ecu_eng_turbo_rpm_flag":"T","ecu_eng_turbo_rpm":180,"ecu_eng_vgt_act_flag":"T","ecu_eng_vgt_act":181,"ecu_eng_vgt_control_mode_flag":"T","ecu_eng_vgt_control_mode":182,"ecu_eng_vgt_position_flag":"T","ecu_eng_vgt_position":183,"ecu_eon_flag":"T","ecu_eon":184,"ecu_error_flag":"T","ecu_error1":185,"ecu_error2":186,"ecu_error3":187,"ecu_error4":188,"ecu_error5":189,"ecu_error6":190,"ecu_error7":191,"ecu_eusage":192,"ecu_ev_battery_vol_status_df_flag":"T","ecu_ev_battery_vol_status_df":1,"ecu_ev_charger_door_status_flag":"T","ecu_ev_charger_door_status":3,"ecu_ev_charging_current_flag":"T","ecu_ev_charging_current":2,"ecu_ev_charging_end_hours_flag":"T","ecu_ev_charging_end_hours":3,"ecu_ev_charging_end_minutes_flag":"T","ecu_ev_charging_end_minutes":4,"ecu_ev_charging_end_secs_flag":"T","ecu_ev_charging_end_secs":5,"ecu_ev_charging_start_hours_flag":"T","ecu_ev_charging_start_hours":6,"ecu_ev_charging_start_minutes_flag":"T","ecu_ev_charging_start_minutes":7,"ecu_ev_charging_start_secs_flag":"T","ecu_ev_charging_start_secs":8,"ecu_ev_charging_voltage_flag":"T","ecu_ev_charging_voltage":9,"ecu_ev_first_level_fault_code_flag":"T","ecu_ev_first_level_fault_code":10,"ecu_ev_fourth_level_fault_code_flag":"T","ecu_ev_fourth_level_fault_code":11,"ecu_ev_front_air_pressure_flag":"T","ecu_ev_front_air_pressure":7,"ecu_ev_front_door_status_flag":"T","ecu_ev_front_door_status":5,"ecu_ev_insulation_alarm_df_flag":"T","ecu_ev_insulation_alarm_df":12,"ecu_ev_insulation_status_df_flag":"T","ecu_ev_insulation_status_df":13,"ecu_ev_mid_door_status_flag":"T","ecu_ev_mid_door_status":4,"ecu_ev_motor_current_flag":"T","ecu_ev_motor_current":1,"ecu_ev_motor_voltage_flag":"T","ecu_ev_motor_voltage":2,"ecu_ev_rear_air_pressure_flag":"T","ecu_ev_rear_air_pressure":6,"ecu_ev_s1_anode_temp_flag":"T","ecu_ev_s1_anode_temp":14,"ecu_ev_s1_cathode_temp_flag":"T","ecu_ev_s1_cathode_temp":15,"ecu_ev_s2_anode_temp_flag":"T","ecu_ev_s2_anode_temp":16,"ecu_ev_s2_cathode_temp_flag":"T","ecu_ev_s2_cathode_temp":17,"ecu_ev_second_level_fault_code_flag":"T","ecu_ev_second_level_fault_code":18,"ecu_ev_third_level_fault_code_flag":"T","ecu_ev_third_level_fault_code":19,"ecu_fan_state_flag":"T","ecu_fan_state":193,"ecu_fault_level_of_insulation_detection_flag":"T","ecu_fault_level_of_insulation_detection":11,"ecu_fpressure_flag":"T","ecu_fpressure":194,"ecu_fuel_iconsumption_flag":"T","ecu_fuel_iconsumption":195,"ecu_fuel_level_flag":"T","ecu_fuel_level_real_flag":"T","ecu_fuel_level_real":197,"ecu_fuel_level":196,"ecu_fuel_tmp_flag":"T","ecu_fuel_tmp":198,"ecu_handbrake_flag":"T","ecu_handbrake":5,"ecu_heater_state_flag":"T","ecu_heater_state":6,"ecu_hours_flag":"T","ecu_hours_idle_flag":"T","ecu_hours_idle":200,"ecu_hours":199,"ecu_hydr_oil_lvl_flag":"T","ecu_hydr_oil_lvl":201,"ecu_hydr_oil_psi_flag":"T","ecu_hydr_oil_psi":202,"ecu_hydr_oil_tmp_flag":"T","ecu_hydr_oil_tmp":203,"ecu_idle_fuel_flag":"T","ecu_idle_fuel":204,"ecu_ifuel":205,"ecu_ignition_state_flag":"T","ecu_ignition_state":7,"ecu_ins_efficiency_flag":"T","ecu_ins_efficiency":206,"ecu_insulation_detection_status_flag":"T","ecu_insulation_detection_status":13,"ecu_intake_air_tmp_flag":"T","ecu_intake_air_tmp":207,"ecu_intake_manif_tmp_flag":"T","ecu_intake_manif_tmp":208,"ecu_maf_flag":"T","ecu_maf":209,"ecu_main_pos_relay_flt_flag":"T","ecu_main_pos_relay_flt":15,"ecu_max_available_temp_batt_flag":"T","ecu_max_available_temp_batt":17,"ecu_max_available_voltage_batt_flag":"T","ecu_max_available_voltage_batt":19,"ecu_mil_error_code":210,"ecu_mil_error_count":211,"ecu_mil_state_flag":"T","ecu_mil_state":true,"ecu_min_available_temp_batt_flag":"T","ecu_min_available_temp_batt":21,"ecu_min_available_voltage_batt_flag":"T","ecu_min_available_voltage_batt":23,"ecu_negative_insulation_value_flag":"T","ecu_negative_insulation_value":25,"ecu_neutral_state_flag":"T","ecu_neutral_state":8,"ecu_nominal_friction_torque_flag":"T","ecu_nominal_friction_torque":212,"ecu_obd_auxios_flag":"T","ecu_obd_auxios":213,"ecu_obd_ftype_flag":"T","ecu_obd_ftype":214,"ecu_oxygen_flag":"T","ecu_oxygen":215,"ecu_pg0":"1FF001D370000FB0000AA","ecu_pg1":"1FF001D370000FB0000BB","ecu_pg2":"1FF001D370000FB0000CC","ecu_pg3":"1FF001D370000FB0000DD","ecu_pg4":"1FF001D370000FB0000EE","ecu_positive_insulation_value_flag":"T","ecu_positive_insulation_value":27,"ecu_pto_flag":"T","ecu_pto":216,"ecu_rated_capacity_battery_flag":"T","ecu_rated_capacity_battery":29,"ecu_rated_total_energy_battery_flag":"T","ecu_rated_total_energy_battery":31,"ecu_rated_voltage_battery_flag":"T","ecu_rated_voltage_battery":33,"ecu_rbatt_flag":"T","ecu_rbatt":217,"ecu_ready_state_flag":"T","ecu_ready_state":9,"ecu_regenerative_brake_level_flag":"T","ecu_regenerative_brake_level":10,"ecu_remote_accel_enable_flag":"T","ecu_remote_accel_enable":218,"ecu_remote_accel_pedal_flag":"T","ecu_remote_accel_pedal":219,"ecu_retarder_brake_assist_flag":"T","ecu_retarder_brake_assist":220,"ecu_reverse_state_flag":"T","ecu_reverse_state":11,"ecu_rpm_flag":"T","ecu_rpm":221,"ecu_serv_distance_flag":"T","ecu_serv_distance":222,"ecu_single_charge_electric_flag":"T","ecu_single_charge_electric":35,"ecu_speed_flag":"T","ecu_speed":223,"ecu_stability_control_flag":"T","ecu_stability_control_level_flag":"T","ecu_stability_control_level":13,"ecu_stability_control":12,"ecu_state_of_charge_flag":"T","ecu_state_of_charge":37,"ecu_state_of_health_flag":"T","ecu_state_of_health":39,"ecu_tfuel":224,"ecu_throttle_flag":"T","ecu_throttle":225,"ecu_tires_psi_flag":"T","ecu_tires_psi":"019107,018107,017109,016106,035109,034107,033109,032109,001110,000111","ecu_tires_tmp_flag":"T","ecu_tires_tmp":"01923,01820,01720,01623,03527,03424,03324,03227,00129,00028","ecu_torque_flag":"T","ecu_torque":226,"ecu_total_fuel_flag":"T","ecu_total_fuel":227,"ecu_total_run_time_flag":"T","ecu_total_run_time":228,"ecu_tpms_provision_flag":"T","ecu_tpms_provision":"010310,0191825501010,0181835292341,0171834981980,0161834979294,0351831256396,0341831255008,0331835297967,0321835293060,0011834981950,0001835292410","ecu_tpms_warnings_flag":"T","ecu_tpms_warnings":"0320030,0330030,0340030,0350030,0000030,0160030,0170030,0180030,0190030","ecu_trans_lvl_flag":"T","ecu_trans_lvl":229,"ecu_trans_psi_flag":"T","ecu_trans_psi":230,"ecu_trans_tmp_flag":"T","ecu_trans_tmp":231,"ecu_transmission_gear_flag":"T","ecu_transmission_gear":1,"ecu_trip_distance_flag":"T","ecu_trip_distance":232,"ecu_vin_flag":"T","ecu_vin":"2HNYD18661H524556","ecu_water_in_fuel_flag":"T","ecu_water_in_fuel":234,"ecu_weights_flag":"T","ecu_weights":"0165900,020,068620","ecu_with_mil_distance_flag":"T","ecu_with_mil_distance":235,"ecu_with_mil_time_flag":"T","ecu_with_mil_time":236,"event_epoch":237,"event_type":238,"fpr_code":"123","fpr_conn":true,"fpr_id":239,"hdop":240,"head":241,"ib":"91000014A0707F01","ib_set":true,"ii":242,"io_exp_in1":true,"io_exp_in2":true,"io_exp_in3":true,"io_exp_in4":true,"io_exp_out1":true,"io_exp_out1_short":true,"io_exp_out2":true,"io_exp_out2_short":true,"io_exp_out3":true,"io_exp_out3_short":true,"io_exp_out4":true,"io_exp_out4_short":true,"io_exp_state":true,"io_ign":true,"io_in1":true,"io_in2":true,"io_in3":true,"io_out1":true,"io_out1_short":true,"io_out2":true,"io_out2_short":true,"io_pwr":true,"io_tamper":true,"ip":"10.23.24.48","jamm_detected":true,"ky":"p123","label":"ignon","lat":25.243,"light_sensor":true,"lon":-80.16543,"moving":true,"mph":244,"pc":245,"pdop":246,"pid":247,"port":248,"primary_name":"Vehicle ABC","re_index":249,"re_sense":true,"re_type":"K","rfi_fac":250,"rfi_full_id":"25000251","rfi_id":251,"source":252,"sv":253,"tc00":254,"tc01":255,"tc02":256,"tc03":257,"tc04":258,"tc05":259,"tc06":260,"tc07":261,"tc08":262,"tc09":263,"tc10":264,"tc11":265,"tc12":266,"tc13":267,"tc14":268,"tc15":269,"tc16":270,"tc17":271,"tc18":272,"tc19":273,"tec_ff":274,"tec_fn":275,"tec_ft":276,"tec_st":true,"tec_1_ff":277,"tec_1_fn":278,"tec_1_ft":279,"tec_1_st":true,"tec_2_ff":280,"tec_2_fn":281,"tec_2_ft":282,"tec_2_st":true,"tec_3_ff":283,"tec_3_fn":284,"tec_3_ft":285,"tec_3_st":true,"temp":286,"temp1":1,"temp2":2,"temp3":3,"temp4":4,"temp5":5,"temp6":6,"temp7":7,"temp8":8,"temp9":9,"temp10":10,"ti_sense":true,"ti_signal":"S00","ti_thr":287,"ti_val":288,"trip_id":289,"tx":"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789","type":290,"usense_filtered_value":291,"usense_hardware_code":292,"usense_hour":293,"usense_median_value":294,"usense_minute":295,"usense_raw_value":296,"usense_signal_strength":297,"usense_software_code":298,"usense_tilt_angle":299,"usense_valid_signal":300,"valid_position":true,"vdop":301,"vehicle_dev_dist":302,"vehicle_dev_dist__km":303,"vehicle_dev_dist__mi":304,"vehicle_dev_idle":305,"vehicle_dev_ign":306,"vehicle_dev_orpm":307,"vehicle_dev_ospeed":308,"vehicle_ecu_dist":309,"vehicle_ecu_dist__km":310,"vehicle_ecu_dist__mi":311,"vehicle_ecu_eidle":312,"vehicle_ecu_eusage":313,"vehicle_ecu_ifuel":314,"vehicle_ecu_tfuel":315,"vid":316,"vo":317}]'


# devicepkg
curl -X POST "https://your-server.com/pegasus-forwarder" \
-H "Content-Type: application/json" \
-d '[{"set_out_state":{"_epoch":1660482636.353785,"io_out2":{"instruction":false,"uid":54,"set_at":1660482636.28482,"cid":926}},"lrates":{"rx_m_accepted-evt-198":0,"rx_m_accepted-evt-193":0,"rx_m_accepted-evt-191":0,"rx_m_ignored-evt-120":0.0026561338632875115,"tx_outbs":0,"_epoch":1531766439.298131,"rx_m_accepted-evt-155":0,"rx_m_ignored-dup_gps":0,"conn_dn-8":0,"rx_m_accepted-evt-150":0,"conn_dn-3":0,"tx_b":0.13280669316437557,"rx_m_accepted-evt-166":0,"tx_acks-t":0,"ttrips":0,"rx_b":1.8734597515721247,"gps_no-location":0,"rx_m_accepted-evt-10":0.006197645681004193,"tx_lqueries":0,"gps-comm-delay":-0.001445490972240289,"tx_acks-imei":0.008853779544291705,"rx_m_accepted-evt-100":0.001770755908858341,"conn_up-102":0,"conn_up-100":0},"lastrx":{"_epoch":1738451399.322071,"msg_type":10,"value":1738451399.3215},"safeimmo_state":{"instruction":false,"_epoch":1660482636.244328,"uid":54,"set_at":1660482636.238515,"cid":925},"creation":{"_epoch":1527543447.764975},"primary":{"info":{"range_unit":"km","description":null,"tank_volume":null,"color":"Black","make":null,"vin":null,"license_plate":null,"alias":null,"range":null,"year":null,"model":null,"tank_unit":"gallon"},"associations":[{"device":357330050017466,"time":1408629722,"id":831,"association":true,"vehicle":700},{"device":357330050017466,"time":1528889918,"id":4515,"association":false,"vehicle":700}],"__updated":1737619201.224607,"associated_at":1408629722,"name":"SPS380","primary":null,"__created":1594146121.049799,"images":{"photo":false,"on_icon":false,"idle_icon":false,"off_icon":false,"icon":false},"token":null,"properties":{"marker":{"type":"transportation","icon":"entity_icons_transportation-truck-ac"},"$sensor_ecu":[{"units_abbrev":"l","units":"liter","name":"Combustible","tank_volume":100,"decimals":1,"priority":false,"source":"ecu_fuel_level_real","sensor_type":"fuel","version":"r","device":"syrus","type":"float"}],"Eli_test":{"property1":1,"property2":2},"test_":{},"new":"test"},"groups":[427,458,479,482,500,576,582,712,1091,4588,11782],"__version":"7.5.4","device":357042067347865,"associations_count":3,"configuration":"s218","type":"vehicle","id":700},"imei":357042067347865,"trip":{"vid":700,"prev_id":70023018507093,"start_time__epoch":1738371655,"id":70023020332334,"dev_msgs":["TI:274,ST:1,CS:0,GT:2351603655,CT:2351603662,LAT:449942,LON:-7392184,TL:1$0$1878$1878$1169$0$372014092$0$0$0$0.0"],"src_id":274,"src_type":"device","_epoch":1738371667.338322,"prev_start_time":null,"prev":"{\"duration\": 1878, \"end_lon\": -73.92184, \"start_time__epoch\": 1738369777.0, \"count_dev_dist\": 4121, \"end_lat\": 4.49942, \"end_evdistance\": 0, \"count_dev_ign\": 1878, \"id\": 70023018507093, \"end_time__epoch\": 1738371655.0}","method":"tracker","start_time":null,"start_evdistance":null,"moving":false,"groups":[427,458,479,482,500,576,582,712,1091,4588,11782],"start_lat":4.49942,"system_time__epoch":1738371667,"aid":null,"system_time":null,"start_lon":-73.92184,"signal":"start","prev_start_time__epoch":1738369777,"ky":"s218"},"network":{"_epoch":1707782484.864535,"imsi":732101605823322,"iccid":"89571016020068233224","op":"Claro","sim":"89571016020068233224","_deprecated":true},"outbox_size":0,"trip_setup":{"state":"0102700050","_epoch":1581954142.876542,"method":"tracker"},"net_reg":{"cf_cid":62257,"cf_rssi":13,"cf_type":"3G","cf_lac":13694,"_epoch":1738451275.864502,"cf_mcc":732,"cf_mnc":101},"version":{"device":"syrus","vkey_interface":"1.9.1.5C","extras":"EHS6.C","number":"3.4.81","vkey_i_ctr":"6849"},"asset":{"name":null,"aid_source":"link","_epoch":1738451399.322071,"$linked":false,"groups":null,"device":null,"aid":null,"type":null},"vehicle":{"name":"SPS380","$linked":false,"_epoch":1737619204.557109,"groups":[427,458,479,482,500,576,582,712,1091,4588,11782],"type":"vehicle","id":700},"config":{"kydef":{"lumeway":false,"secugen":false,"garminmode":false,"safeimmo":true,"satcom":false,"photocam":false,"_read_at":null,"ios_names":{"io_pwr":"pwr","io_exp_in1":"IO Exp input #1","io_exp_in2":"IO Exp input #2","io_exp_in3":"IO Exp input #3","io_exp_in4":"IO Exp input #4","ad":"Main Battery","temp3":"Temp 3","temp2":"Temp 2","temp1":"Temp 1","temp7":"Temp 7","temp6":"Temp 6","temp5":"Temp 5","temp4":"Temp 4","temp9":"Temp 9","temp8":"Temp 8","io_ign":"ign","io_exp_out1":"IO Exp output #1","io_exp_out2":"IO Exp output #2","io_exp_out3":"IO Exp output #3","io_exp_out4":"IO Exp output #4","temp10":"Temp 10","temp":"General Temp","io_out1":"Engine Cut","io_out2":"Output #2","ea_c":"Sensor C","ea_b":"Sensor B","ea_a":"Sensor A","io_in1":"Panic button","io_in2":"Puerta Chofer","io_in3":"Puerta Pasajero"}},"kymod":{"_epoch":1571258232.89501},"_config_state":1,"_epoch":1732710432.920423,"safeimmo_support":true,"values":{"values_rpmlimit_secs":null,"values_rpmlimit_rpm":null,"values_speedlimit_secs":10,"values_speedlimit_mph":50},"ky":"s218"},"sim":{"iccid":"89571016020068233224","_epoch":1707782484.864535,"imsi":732101605823322,"op":"Claro"},"ios_state":{"io_pwr":true,"io_out2_short":false,"_epoch":1738451399.322071,"io_in1":false,"io_exp_state":false,"io_out1_short":false,"io_out1":false,"io_out2":false,"io_ign":false,"io_in2":false,"io_in3":false},"vcounters":{"dev_dist":{"_epoch":1738371654.36182,"value":519344026},"dev_ign":{"_epoch":1738451399.321145,"value":46890572},"dev_idle":{"_epoch":1738370757.721822,"value":4687673},"counter_io_out1":{"_v":1,"state":false,"_epoch":1738451396,"value":0},"dev_ospeed":{"_epoch":1735404976.587158,"value":13615},"_epoch":1738451399.322071,"counter_io_out2":{"_v":1,"state":false,"_epoch":1738451396,"value":0},"evtime":1738451396,"dev_orpm":{"_epoch":1527696328.231283,"value":0},"_vid":700,"counter_io_in3":{"_v":1,"state":false,"_epoch":1738451396,"value":0},"counter_io_in2":{"_v":1,"state":false,"_epoch":1738451396,"value":0},"counter_io_in1":{"_v":1,"state":false,"_epoch":1738451396,"value":0}},"outbox":[],"garmin":{"status":0,"product_id":0,"_epoch":1696813042.479805,"esn":0,"protocols":0,"software":0},"gpsknit":{"prev_ack_id":null,"prev_lat":449945,"no_location_fepoch":null,"prev_ev_code":2,"ev_label":"ignoff","prev_ev_label":"ignon","_epoch":1738451399.322071,"lon":-7392187,"event_time__epoch":1738451396,"ev_code":3,"prev_lon":-7392187,"lat":449945,"comm_delay":3.3209340572357178,"ack_id":null,"no_location_count":0,"no_gps_time_count":0,"prev_event_time__epoch":1738451273},"dcounters":{"dev_dist":{"value":372018213,"epoch":1738451396,"offset":-182500,"offset-":5,"change_epoch":1738371651,"offset+":1},"ecu_dist":{},"dev_ign":{"offset-":1,"epoch":1738451396,"value":36957107,"change_epoch":1738451396,"offset":1},"dev_idle":{"epoch":1738451396,"value":4011618,"change_epoch":1738370755,"offset":0},"dev_ospeed":{"epoch":1738451396,"value":12067,"change_epoch":1735404974,"offset":0},"_epoch":1738451399.322071,"ecu_ifuel":{},"ecu_eidle":{},"event_epoch":1738451396,"ecu_eusage":{},"dev_orpm":{"epoch":1738451396,"value":0,"offset":0},"ecu_tfuel":{}},"virtual_distance":{"vo_reported_at":1738451396,"_epoch":1738451399.322071,"lon":-73.92187,"value":372018213,"evtime_epoch":1738451396,"delta":0,"lat":4.49945,"replaces_dev_dist":false},"position_response":{"head":73,"code":0,"_epoch":1738451340.410414,"age":2,"lon":-73.92187,"mph":0,"gpsweek":2351,"source":3,"weekday":6,"lat":4.49946,"event_time__epoch":1738451339,"dayseconds":83339},"connection":{"last":{"lid":0,"src":"pegcore","code":100,"prev_lid":6,"epoch":1738449167.569741,"prev_epoch":1738449166.880363,"state":"up","prev_state":"down","fno":137,"transport":"tcp"},"seq":108073,"_epoch":1738449167.570078,"on_codes":{"code_103":126,"code_102":29517,"code_101":69,"code_100":78361},"online":true,"off_codes":{"code_8":6572,"code_2":4,"code_3":64840,"code_6":48,"code_10":65,"code_11":1}}}]'

Next Steps

Once a forwarder is created by DCT staff, you are able to modify it's behavior, to do so head to the Forwarders API section for more information.


Tips & Recommendations

  1. Handling Multiple Forwarders

    • If using multiple forwarders, separate them based on PID (Pegasus Site ID) to avoid data mix-ups.
    • Consider creating separate database tables per forwarder.
  2. Managing Large Data Sets

    • Partition data by vehicle or time period (weekly, monthly).
      Index your database to optimize query performance.
    • Ensure a fast response then manage a queue on your end for post-processing (remember the more vehicles are pointed to your endpoint the more data per second is reported and a fast response is required in order to keep up)
    • Adjust the forwarder MAX_MESS_PER_CALL option (in increments of 25, up to 500) to add more events on the payload
  3. Layer of Security

    • You can add custom Headers to any forwarders for an extra layer of security
    • By default there is a floating IP that manages forwarder communication from Pegasus, but you can enable a proxy with a fixed IP for firewall policies.
  4. Ensuring Endpoint Availability

    • Your server must be publicly accessible (no firewall restrictions).
    • Use logging to monitor incoming requests.
    • Implement rate limiting to prevent overload.
  5. Debugging & Troubleshooting

    • Use Postman or cURL to simulate incoming data.
    • Log event IDs to track received messages.
    • Check response times – Pegasus expects a reply within 1 second
  6. Filter Data for FWD:devicepkg

    • You can filter what data to include in the FWD:devicepkg forwarder using the filter_fields array in the general field, it accepts any of the fields defined in the device pkg (the ones with a >, except > latest) :
    {
        "forward_gps_events": true,
        "include_evname": null,
        "__updated": 1738454930.661925,
        "dates_format": "ISOFORMAT",
        "protocol": "FWD:devicepkg",
        "MAX_MESS_PER_CALL": 50,
        "forward_other_eventtypes_csv": null,
        "groups_filter": [],
        "resource": "https://your-server.com/pegasus-forwarder",
        "include_vinfo": false,
        "time_zone": "UTC",
        "INBOX_DB_DUMP_AT": 3760000,
        "__created": 1611464662.445227,
        "vehicle_count": 3760,
        "__version": "7.5.4",
        "id": 41,
        "extra_headers": {},
        "general": {
            "discard": true,
            "stop_queue": true,
            "stop_send": false,
            "filter_fields": [
                "connection",
                "config",
                "outbox",
                "trip"
            ]
        },
        "forward_conn_events": true,
        "port": null
    }
    
  7. We recommend managing the options for the json_fwd using the Pegasus UI, you'll be able to add headers, filter by codes or labels, filter by groups, filter by fields, include vehicle info, send some fields as floats, and manage the queue and sending of data. If you don't have access to this section ask the gateway administrator to enable the Web Services feature on your user.