Skip to main content

How can I interface Pysae with KUBA ticketing via a WIFI router?

Written by Patrick

Contents

Pysae can control the on-board ticketing system of your vehicles through a wireless connection based on a WIFI/4G router.

The driver's sign-on made in Pysae is shared with the ticketing system. The driver has fewer actions to perform on the on-board systems and saves valuable time.

💡Principle

Sharing the driver's sign-on means that it is sent directly from Pysae to the Kuba ticketing system.

The connector between Pysae and Kuba automatically sends the sign-on made by the driver on the Pysae console to the Kuba ticketing console, so that it only has to be entered once.

The connector supports the Legacy and v1 versions. The ref_ext_course, ref_ext_ligne, ref_ext_arret and societe_agent fields described below apply to version v1; in Legacy, the trip code comes from the selected GTFS field.

✅ Technical requirements

You need the following equipment:

  • Kuba ticketing console

  • Smartphone or tablet

  • Mounting bracket

  • Data connection

  • 4G Wifi router (acting as a gateway between the various on-board devices)

📝Transport plan and required fields

Make sure your transport plans (GTFS format) are identical in Pysae and Kuba. You can download the GTFS published in Pysae with the transport plan API.

GTFS fields required for communication between Pysae and KUBA

Kuba field

Source / GTFS field

Note

societe_ligne

Value entered in the configuration, otherwise the GTFS agency_id

A non-empty value in the configuration takes priority

societe_agent

Manual entry (fixed value)

To be set in Pysae Op (Team number)

num_cond

staffNumber

Driver staff number

numParc

fleetNumber

Vehicle number

ref_ext_course

trip_id

In version v1: trip_id without its prefixes

ref_ext_ligne

routeShortName

Route short name

ref_ext_arret

stop_code if set, otherwise stop_id without its prefixes

Stop identifier in version v1

service

blockId

Block identifier of the trip (block_id)

sens

directionId + 1

Trip direction

Trip identifier: in version v1, ref_ext_course uses the trip_id without prefix, not the trip_short_name. In Legacy, the connector uses the GTFS field selected in its configuration.

đŸ’»Configuration in Pysae

1/ Settings

Go to the "Integrations" tab at the bottom left of your operations interface (Op). Click the "Activate" button in the Kuba box.

2/ Society agent code

To set the "societe_agent" code, you need to assign a team number to an existing or new team.

To do so, hover over "Resources" in the left-hand menu, then click "Subcontracting". The number is entered in the "Team number" column: if it is not displayed, show it with the "Columns" button of the table, then click the pencil on the team's row to enter its number and save.

In version v1, the societe_agent field is filled with the number of the device's first team, so this team must have a number.

3/ Society line code

The "Society line" field (societe_ligne) is available in the connector configuration. Enter the society line code expected by the ticketing system; if it is left empty, the connector uses the GTFS agency_id.

  • The value entered in "Society line" takes priority; if it is empty, the connector uses the GTFS agency_id.

4/ Connection IP address and port

The "IP Address" and "Port" are those of the KUBA equipment (ask KUBA for them).

5/ Local port

This port receives the responses from the KUBA equipment (ask KUBA for it).

6/ Trip identification field

In the "Version" field, select the protocol version that matches your equipment: v1 uses the cleaned trip_id, while Legacy uses the GTFS field selected in "GTFS Field". The default setting of a new configuration in Op is Legacy.

Don't forget to click the "Save" button after any change.

Did this answer your question?