Till senaste kommentaren

SL Transport API visar historiska avgångar

Hej

Det nya API:t SL Transport ger ibland en lista med avgångar som redan passerats med råge. Här är två slagningar från imorse som skedde 08:26:34, där de allra flesta avgångarna redan skett. Den äldsta är nästan 40 minuter gammal när anropet sker mot SL Transport:

20240321 08:26:34.657 | base | INFO: url: https://transport.integration.sl.se/v1/sites/1301/departures?forecast=60

20240321 08:26:34.659 | base | DEBUG: recv data: {"departures": [{"destination": "Frösundavik","direction_code": 2,"direction": "Frösundavik","state": "EXPECTED","display": "1 min","scheduled": "2024-03-21T07:51:00","expected": "2024-03-21T07:51:00","journey": {"id": 2024032107791,"state": "EXPECTED"},"stop_area": {"id": 10984,"name": "Tengdahlsgatan","type": "BUSTERM"},"stop_point": {"id": 10984,"name": "Tengdahlsgatan"},"line": {"id": 57,"designation": "57","transport_mode": "BUS"},"deviations": []},{"destination": "Reimersholme","direction_code": 2,"direction": "Reimersholme","state": "EXPECTED","display": "6 min","scheduled": "2024-03-21T07:56:00","expected": "2024-03-21T07:56:00","journey": {"id": 2024032109182,"state": "EXPECTED"},"stop_area": {"id": 10984,"name": "Tengdahlsgatan","type": "BUSTERM"},"stop_point": {"id": 10984,"name": "Tengdahlsgatan"},"line": {"id": 66,"designation": "66","transport_mode": "BUS"},"deviations": [{"importance_level": 5,"consequence": "INFORMATION","message": "Inställd hållplats på grund av framkomlighetsproblem"}]},{"destination": "Reimersholme","direction_code": 2,"direction": "Reimersholme","state": "EXPECTED","display": "22 min","scheduled": "2024-03-21T08:12:00","expected": "2024-03-21T08:12:00","journey": {"id": 2024032109183,"state": "EXPECTED"},"stop_area": {"id": 10984,"name": "Tengdahlsgatan","type": "BUSTERM"},"stop_point": {"id": 10984,"name": "Tengdahlsgatan"},"line": {"id": 66,"designation": "66","transport_mode": "BUS"},"deviations": [{"importance_level": 5,"consequence": "INFORMATION","message": "Inställd hållplats på grund av framkomlighetsproblem"}]},{"destination": "Frösundavik","direction_code": 2,"direction": "Frösundavik","state": "EXPECTED","display": "27 min","scheduled": "2024-03-21T08:07:00","expected": "2024-03-21T08:17:00","journey": {"id": 2024032107792,"state": "EXPECTED"},"stop_area": {"id": 10984,"name": "Tengdahlsgatan","type": "BUSTERM"},"stop_point": {"id": 10984,"name": "Tengdahlsgatan"},"line": {"id": 57,"designation": "57","transport_mode": "BUS"},"deviations": []},{"destination": "Frösundavik","direction_code": 2,"direction": "Frösundavik","state": "EXPECTED","display": "08:25","scheduled": "2024-03-21T08:25:00","expected": "2024-03-21T08:25:00","journey": {"id": 2024032107793,"state": "EXPECTED"},"stop_area": {"id": 10984,"name": "Tengdahlsgatan","type": "BUSTERM"},"stop_point": {"id": 10984,"name": "Tengdahlsgatan"},"line": {"id": 57,"designation": "57","transport_mode": "BUS"},"deviations": []},{"destination": "Reimersholme","direction_code": 2,"direction": "Reimersholme","state": "EXPECTED","display": "08:28","scheduled": "2024-03-21T08:28:00","expected": "2024-03-21T08:28:00","journey": {"id": 2024032109184,"state": "EXPECTED"},"stop_area": {"id": 10984,"name": "Tengdahlsgatan","type": "BUSTERM"},"stop_point": {"id": 10984,"name": "Tengdahlsgatan"},"line": {"id": 66,"designation": "66","transport_mode": "BUS"},"deviations": [{"importance_level": 5,"consequence": "INFORMATION","message": "Inställd hållplats på grund av framkomlighetsproblem"}]}],"stop_deviations": []}

20240321 08:26:34.861 | base | INFO: url: https://transport.integration.sl.se/v1/sites/1300/departures?forecast=60

20240321 08:26:34.863 | base | DEBUG: recv data: {"departures": [{"destination": "Norrtull","direction_code": 2,"direction": "Norrtull","state": "EXPECTED","display": "Nu","scheduled": "2024-03-21T07:50:00","expected": "2024-03-21T07:50:00","journey": {"id": 2024032101263,"state": "EXPECTED"},"stop_area": {"id": 10881,"name": "Barnängen","type": "BUSTERM"},"stop_point": {"id": 10884,"name": "Barnängen"},"line": {"id": 2,"designation": "2","transport_mode": "BUS","group_of_lines": "Blåbuss"},"deviations": []},{"destination": "Frösundavik","direction_code": 2,"direction": "Frösundavik","state": "EXPECTED","display": "2 min","scheduled": "2024-03-21T07:52:10","expected": "2024-03-21T07:52:10","journey": {"id": 2024032107791,"state": "EXPECTED"},"stop_area": {"id": 10881,"name": "Barnängen","type": "BUSTERM"},"stop_point": {"id": 10880,"name": "Barnängen"},"line": {"id": 57,"designation": "57","transport_mode": "BUS"},"deviations": []},{"destination": "Norrtull","direction_code": 2,"direction": "Norrtull","state": "EXPECTED","display": "6 min","scheduled": "2024-03-21T07:56:00","expected": "2024-03-21T07:56:00","journey": {"id": 2024032101264,"state": "EXPECTED"},"stop_area": {"id": 10881,"name": "Barnängen","type": "BUSTERM"},"stop_point": {"id": 10884,"name": "Barnängen"},"line": {"id": 2,"designation": "2","transport_mode": "BUS","group_of_lines": "Blåbuss"},"deviations": []},{"destination": "Norrtull","direction_code": 2,"direction": "Norrtull","state": "EXPECTED","display": "13 min","scheduled": "2024-03-21T08:03:00","expected": "2024-03-21T08:03:00","journey": {"id": 2024032101265,"state": "EXPECTED"},"stop_area": {"id": 10881,"name": "Barnängen","type": "BUSTERM"},"stop_point": {"id": 10884,"name": "Barnängen"},"line": {"id": 2,"designation": "2","transport_mode": "BUS","group_of_lines": "Blåbuss"},"deviations": []},{"destination": "Sofia","direction_code": 1,"direction": "Sofia","state": "EXPECTED","display": "21 min","scheduled": "2024-03-21T08:01:29","expected": "2024-03-21T08:11:48","journey": {"id": 2024032107731,"state": "NORMALPROGRESS","prediction_state": "NORMAL"},"stop_area": {"id": 10881,"name": "Barnängen","type": "BUSTERM"},"stop_point": {"id": 10881,"name": "Barnängen"},"line": {"id": 57,"designation": "57","transport_mode": "BUS"},"deviations": []},{"destination": "Sofia","direction_code": 1,"direction": "Sofia","state": "EXPECTED","display": "26 min","scheduled": "2024-03-21T08:19:18","expected": "2024-03-21T08:16:43","journey": {"id": 2024032107732,"state": "NORMALPROGRESS","prediction_state": "NORMAL"},"stop_area": {"id": 10881,"name": "Barnängen","type": "BUSTERM"},"stop_point": {"id": 10881,"name": "Barnängen"},"line": {"id": 57,"designation": "57","transport_mode": "BUS"},"deviations": []},{"destination": "Frösundavik","direction_code": 2,"direction": "Frösundavik","state": "EXPECTED","display": "28 min","scheduled": "2024-03-21T08:08:10","expected": "2024-03-21T08:18:10","journey": {"id": 2024032107792,"state": "EXPECTED"},"stop_area": {"id": 10881,"name": "Barnängen","type": "BUSTERM"},"stop_point": {"id": 10880,"name": "Barnängen"},"line": {"id": 57,"designation": "57","transport_mode": "BUS"},"deviations": []},{"destination": "Frösundavik","direction_code": 2,"direction": "Frösundavik","state": "EXPECTED","display": "08:26","scheduled": "2024-03-21T08:26:10","expected": "2024-03-21T08:26:10","journey": {"id": 2024032107793,"state": "EXPECTED"},"stop_area": {"id": 10881,"name": "Barnängen","type": "BUSTERM"},"stop_point": {"id": 10880,"name": "Barnängen"},"line": {"id": 57,"designation": "57","transport_mode": "BUS"},"deviations": []},{"destination": "Sofia","direction_code": 1,"direction": "Sofia","state": "EXPECTED","display": "08:38","scheduled": "2024-03-21T08:38:06","expected": "2024-03-21T08:40:03","journey": {"id": 2024032107733,"state": "NORMALPROGRESS","prediction_state": "NORMAL"},"stop_area": {"id": 10881,"name": "Barnängen","type": "BUSTERM"},"stop_point": {"id": 10881,"name": "Barnängen"},"line": {"id": 57,"designation": "57","transport_mode": "BUS"},"deviations": []}],"stop_deviations": []}

Idag på förmiddagen var det frekvent. Detta kan väl knappast vara avsikten?



Johan Larsson

Kommentarer

  • Hej,

    Detta beror på fel i det bakomliggande dataflödet. Säg gärna till om det händer igen, så fortsätter vi felrapportera detta och kan det förhoppningsvis åtgärdas inom kort.

    Hälsningar,
    Bert
    Bert på Trafiklab
  • Hej
    Har också noterat att "display" texter som är ett klockslag ibland verkar frysa och i sällsynta fall finns kvar även då klockslaget passerats. Tror mig ha noterat samma effekt på SL:s hållplatser när en buss inte dyker upp (inställd?). Händer sällan, men tillräckligt ofta för att märkas.
    Antar man måste fråga SL om hur departures.display ska tolkas. Kanske trafiklab kan göra det?

    Karl-Johan
  • Hej,

    Departure.display är den tiden som visas i appen eller på skärmar. Att den i sällsynta fall frysas eller finns kvar kan bero på förseningar eller att en avgång inte har registrerats korrekt (än). Den kan även räkna upp i fall fordonet blir mer försenad.

    Hälsningar,
    Bert

    Bert på Trafiklab

Kommentera eller skriv ett nytt inlägg

Ditt namn och inlägg kan ses av alla. Din e-post visas aldrig publikt.