No predictions -- 313 bus route inbound

I’m getting no results from inbound stops on the 313 bus route. Noticed on Wednesday and whenever I’ve checked since then. It’s a 20 minute service, so there would usually be at least one prediction in a 30 minute period and the buses themselves appear to be running in both directions.

Example: https://api.tfl.gov.uk/StopPoint/490014555E/Arrivals?app_id=[deleted]

But in the opposite direction, https://api.tfl.gov.uk/StopPoint/490014555W/Arrivals?app_id=[deleted[ shows predictions.

Curiously, Live London bus map is showing buses in both directions, so must be getting predictions from somewhere else.

I managed to catch this, extracted from https://api.tfl.gov.uk/Vehicle/LTZ1179/Arrivals which possibly explains why I’m not seeing predictions for most of the stops

image

There are some inbound predictions, but there should be one for every stop.

Here’s an example of the response for that vehicle (though not taken at exactly the same time as the above:

[

  {
        "$type": "Tfl.Api.Presentation.Entities.Prediction, Tfl.Api.Presentation.Entities",
        "id": "209001210",
        "operationType": 1,
        "vehicleId": "LTZ1179",
        "naptanId": "490004172S",
        "stationName": "Botany Bay / the Robin Hood",
        "lineId": "313",
        "lineName": "313",
        "platformName": "null",
        "direction": "inbound",
        "bearing": "125",
        "destinationNaptanId": "",
        "destinationName": "Chingford Station",
        "timestamp": "2023-09-08T07:22:28.2241991Z",
        "timeToStation": 98,
        "currentLocation": "",
        "towards": "Enfield Town",
        "expectedArrival": "2023-09-08T07:24:06Z",
        "timeToLive": "2023-09-08T07:24:36Z",
        "modeName": "bus",
        "timing": {
              "$type": "Tfl.Api.Presentation.Entities.PredictionTiming, Tfl.Api.Presentation.Entities",
              "countdownServerAdjustment": "-00:00:05.9873940",
              "source": "2023-09-08T02:15:07.102Z",
              "insert": "2023-09-08T07:22:06.437Z",
              "read": "2023-09-08T07:22:00.435Z",
              "sent": "2023-09-08T07:22:28Z",
              "received": "0001-01-01T00:00:00Z"
        }
  },
  {
        "$type": "Tfl.Api.Presentation.Entities.Prediction, Tfl.Api.Presentation.Entities",
        "id": "-170886920",
        "operationType": 1,
        "vehicleId": "LTZ1179",
        "naptanId": "49003148B",
        "stationName": "Chase Farm Hospital / the Ridgeway",
        "lineId": "313",
        "lineName": "313",
        "platformName": "B",
        "direction": "inbound",
        "bearing": "147",
        "destinationNaptanId": "",
        "destinationName": "Chingford Station",
        "timestamp": "2023-09-08T07:22:28.2241991Z",
        "timeToStation": 468,
        "currentLocation": "",
        "towards": "Enfield Town",
        "expectedArrival": "2023-09-08T07:30:16Z",
        "timeToLive": "2023-09-08T07:30:46Z",
        "modeName": "bus",
        "timing": {
              "$type": "Tfl.Api.Presentation.Entities.PredictionTiming, Tfl.Api.Presentation.Entities",
              "countdownServerAdjustment": "-00:00:05.9873940",
              "source": "2023-09-08T02:15:07.102Z",
              "insert": "2023-09-08T07:22:16.461Z",
              "read": "2023-09-08T07:22:10.44Z",
              "sent": "2023-09-08T07:22:28Z",
              "received": "0001-01-01T00:00:00Z"
        }
  },
  {
        "$type": "Tfl.Api.Presentation.Entities.Prediction, Tfl.Api.Presentation.Entities",
        "id": "386714771",
        "operationType": 1,
        "vehicleId": "LTZ1179",
        "naptanId": "490006587E",
        "stationName": "Enfield Town / Church Street",
        "lineId": "313",
        "lineName": "313",
        "platformName": "E",
        "direction": "inbound",
        "bearing": "92",
        "destinationNaptanId": "",
        "destinationName": "Chingford Station",
        "timestamp": "2023-09-08T07:22:28.2241991Z",
        "timeToStation": 983,
        "currentLocation": "",
        "towards": "Ponders End",
        "expectedArrival": "2023-09-08T07:38:51Z",
        "timeToLive": "2023-09-08T07:39:21Z",
        "modeName": "bus",
        "timing": {
              "$type": "Tfl.Api.Presentation.Entities.PredictionTiming, Tfl.Api.Presentation.Entities",
              "countdownServerAdjustment": "-00:00:05.9807888",
              "source": "2023-09-08T02:15:07.102Z",
              "insert": "2023-09-08T07:22:06.437Z",
              "read": "2023-09-08T07:22:00.435Z",
              "sent": "2023-09-08T07:22:28Z",
              "received": "0001-01-01T00:00:00Z"
        }
  },
  {
        "$type": "Tfl.Api.Presentation.Entities.Prediction, Tfl.Api.Presentation.Entities",
        "id": "-587481917",
        "operationType": 1,
        "vehicleId": "LTZ1179",
        "naptanId": "490007258P",
        "stationName": "Glyn Road",
        "lineId": "313",
        "lineName": "313",
        "platformName": "P",
        "direction": "inbound",
        "bearing": "97",
        "destinationNaptanId": "",
        "destinationName": "Chingford Station",
        "timestamp": "2023-09-08T07:22:28.2241991Z",
        "timeToStation": 1710,
        "currentLocation": "",
        "towards": "Chingford, Bush Hill Park Or Edmonton",
        "expectedArrival": "2023-09-08T07:50:58Z",
        "timeToLive": "2023-09-08T07:51:28Z",
        "modeName": "bus",
        "timing": {
              "$type": "Tfl.Api.Presentation.Entities.PredictionTiming, Tfl.Api.Presentation.Entities",
              "countdownServerAdjustment": "-00:00:05.9873940",
              "source": "2023-09-08T02:15:07.102Z",
              "insert": "2023-09-08T07:22:16.461Z",
              "read": "2023-09-08T07:22:10.44Z",
              "sent": "2023-09-08T07:22:28Z",
              "received": "0001-01-01T00:00:00Z"
        }
  }

]

@jamesevans

Not sure if you saw this. I forgot to tag you. But it’s still exactly the same today, and a few other times I’ve checked since.

313 buses still get normal predictions in the outbound direction, but are apparently skipping most or all stops in the inbound direction.

As a further example, today for three vehicles at random that are on the route:

image

LTZ1224 is showing an outgoing 313 journey and there are predictions for all stops along it

image

LK61LKU is showing an incoming 313 journey. There are some predictions, but stops 4 to 8, 10 and 12 to 15 are missing.

image

A while later, here is LK61LKU again, and now nearing the end of its journey

There are 5 missing stops (2 to 6 which I identify with negative numbers to indicate that the bus is travelling in the opposite direction to the direction I am monitoring) but once it turns round at Chingford it starts predicting for all stops.

The interesting thing about that is it’s the same bus when it’s incoming and when it’s outgoing, so that suggests the equipment on the bus is probably working. It’s therefore fairly certain that an error in the prediction software is causing the problem.

I am seeing the same behaviour (I use the countdown API - https://countdown.api.tfl.gov.uk/interfaces/ura/instant_V1?LineName=313&ReturnList=RegistrationNumber,StopCode1,StopCode2,Latitude,Longitude,EstimatedTime,ExpireTime,StopPointName,StopPointIndicator,DirectionID,LineName,DestinationText,Towards,StopPointType,Bearing,MessageUUID,MessageType,MessagePriority,MessageText,StartTime,ExpireTime) - outbound buses are showing correctly for each stop, but inbound buses are only showing up at 7 out of the 37 stops.

Curiously, inbound 313 buses were being properly predicted when I checked over the weekend.

Today, it’s back to “normal” (recent normal, that is) with very few predictions inbound but proper predictions outbound.

I suspect it’s part of a very much larger problem. Remember Buses that disappear from predictions API ?

We never had a proper explanation for that problem. It seemed to have improved a while back (we were getting predictions, but I suspect it was “fixed” by merging in timetable data where predictions were missing).

If predictions are missing because there’s no 2G in the area, then

  • somebody needs to bash ofcom heavily on the head for failing to properly regulate the networks, and
  • find some way of upgrading iBus so that it uses 4G, anywhere sims, or whatever else is needed to get a proper grip on exactly where these buses are.

Currently, TFL is making a laughing stock of itself with this incompetence. I stand at the stop outside Chingford station and hear ordinary members of the public looking at the countdown screen and saying “take no notice of that, it’s always wrong”. And it is:

  • it says buses are due, but the buses actuelly went 2 minutes ago
  • it deletes buses from the display, but the buses still haven’t left the terminus

TFL needs to know where the buses are – it cannot deliver reliable information based on guesswork.

@jamesevans

Still broken this morning. example: https://api.tfl.gov.uk/Vehicle/LTZ1179/Arrivals is apparently arriving at only 1 of the 11 stops between Glyn Road and Chingford Station, but it will be outbound by the time you read this and you need to test for another 313 bus which is on an inbound journey at the time:

image

An example response:

[

  {
        "$type": "Tfl.Api.Presentation.Entities.Prediction, Tfl.Api.Presentation.Entities",
        "id": "-587481917",
        "operationType": 1,
        "vehicleId": "LTZ1179",
        "naptanId": "490007258P",
        "stationName": "Glyn Road",
        "lineId": "313",
        "lineName": "313",
        "platformName": "P",
        "direction": "inbound",
        "bearing": "97",
        "destinationNaptanId": "",
        "destinationName": "Chingford Station",
        "timestamp": "2023-09-20T06:43:15.990864Z",
        "timeToStation": 227,
        "currentLocation": "",
        "towards": "Chingford, Bush Hill Park Or Edmonton",
        "expectedArrival": "2023-09-20T06:47:02Z",
        "timeToLive": "2023-09-20T06:47:32Z",
        "modeName": "bus",
        "timing": {
              "$type": "Tfl.Api.Presentation.Entities.PredictionTiming, Tfl.Api.Presentation.Entities",
              "countdownServerAdjustment": "-00:00:01.5073659",
              "source": "2023-09-20T05:28:44.297Z",
              "insert": "2023-09-20T06:43:19.424Z",
              "read": "2023-09-20T06:43:17.946Z",
              "sent": "2023-09-20T06:43:15Z",
              "received": "0001-01-01T00:00:00Z"
        }
  },
  {
        "$type": "Tfl.Api.Presentation.Entities.Prediction, Tfl.Api.Presentation.Entities",
        "id": "619419639",
        "operationType": 1,
        "vehicleId": "LTZ1179",
        "naptanId": "490012009E",
        "stationName": "Kings Head Hill / Sewardstone Road",
        "lineId": "313",
        "lineName": "313",
        "platformName": "B",
        "direction": "inbound",
        "bearing": "116",
        "destinationNaptanId": "",
        "destinationName": "Chingford Station",
        "timestamp": "2023-09-20T06:43:15.990864Z",
        "timeToStation": 730,
        "currentLocation": "",
        "towards": "Chingford Station",
        "expectedArrival": "2023-09-20T06:55:25Z",
        "timeToLive": "2023-09-20T06:55:55Z",
        "modeName": "bus",
        "timing": {
              "$type": "Tfl.Api.Presentation.Entities.PredictionTiming, Tfl.Api.Presentation.Entities",
              "countdownServerAdjustment": "-00:00:01.4270470",
              "source": "2023-09-20T05:28:44.297Z",
              "insert": "2023-09-20T06:43:26.781Z",
              "read": "2023-09-20T06:43:25.274Z",
              "sent": "2023-09-20T06:43:15Z",
              "received": "0001-01-01T00:00:00Z"
        }
  },
  {
        "$type": "Tfl.Api.Presentation.Entities.Prediction, Tfl.Api.Presentation.Entities",
        "id": "2116130716",
        "operationType": 1,
        "vehicleId": "LTZ1179",
        "naptanId": "490001063D",
        "stationName": "Chingford Station",
        "lineId": "313",
        "lineName": "313",
        "platformName": "D",
        "direction": "outbound",
        "bearing": "314",
        "destinationNaptanId": "",
        "destinationName": "Potters Bar Station",
        "timestamp": "2023-09-20T06:43:15.990864Z",
        "timeToStation": 1795,
        "currentLocation": "",
        "towards": "Ponders End Or Yardley Lane Estate",
        "expectedArrival": "2023-09-20T07:13:10Z",
        "timeToLive": "2023-09-20T07:13:40Z",
        "modeName": "bus",
        "timing": {
              "$type": "Tfl.Api.Presentation.Entities.PredictionTiming, Tfl.Api.Presentation.Entities",
              "countdownServerAdjustment": "-00:00:01.5073659",
              "source": "2023-09-20T05:28:44.297Z",
              "insert": "2023-09-20T06:43:19.313Z",
              "read": "2023-09-20T06:43:17.946Z",
              "sent": "2023-09-20T06:43:15Z",
              "received": "0001-01-01T00:00:00Z"
        }
  },
  {
        "$type": "Tfl.Api.Presentation.Entities.Prediction, Tfl.Api.Presentation.Entities",
        "id": "339635907",
        "operationType": 1,
        "vehicleId": "LTZ1179",
        "naptanId": "490012617E",
        "stationName": "Station Road / Chingford Station",
        "lineId": "313",
        "lineName": "313",
        "platformName": "E",
        "direction": "outbound",
        "bearing": "236",
        "destinationNaptanId": "",
        "destinationName": "Potters Bar Station",
        "timestamp": "2023-09-20T06:43:15.990864Z",
        "timeToStation": 1805,
        "currentLocation": "",
        "towards": "Chingford Hospital, Chingford Mount Or Ponders End",
        "expectedArrival": "2023-09-20T07:13:20Z",
        "timeToLive": "2023-09-20T07:13:50Z",
        "modeName": "bus",
        "timing": {
              "$type": "Tfl.Api.Presentation.Entities.PredictionTiming, Tfl.Api.Presentation.Entities",
              "countdownServerAdjustment": "-00:00:01.5073659",
              "source": "2023-09-20T05:28:44.297Z",
              "insert": "2023-09-20T06:43:29.066Z",
              "read": "2023-09-20T06:43:27.613Z",
              "sent": "2023-09-20T06:43:15Z",
              "received": "0001-01-01T00:00:00Z"
        }
  }

]

@jamesevans

Another test you can do:

https://api.tfl.gov.uk/StopPoint/490005172M/Arrivals

This should always have at least one 313 predicted but usually shows only 379 at present:

image

hi @harry - I spoke to my colleagues who look after Countdown. It appears there was a data error with the monday-friday schedule submitted by the operator. This meant that only timing points were providing predictions in that direction.

A corrected schedule has now been submitted and this is due to hit the live iBus system on Friday morning.

Thanks,
James

@jamesevans

Glad to see the 313 problem is potentially sorted, though it’s rather worrying that data errors like this aren’t detected automatically. I’m sure they could be, with a bit of thought. I use only a few buses and am not systematically looking for problems, but I keep finding them nevertheless.

And I’m sure that the problem reported at Buses that disappear from predictions API hasn’t been properly fixed, only bodged by merging in timetable data when buses have not successfully transmitted their positions. The result of that, as I mentioned a couple of days ago, is that on countdown screens and API results (for stop E outside Chingford station):

  • it says buses are due, but the buses actually went 2 minutes ago
  • it deletes buses that have supposedly gone, but the buses still haven’t left the terminus

I’m sure somebody once famous once said “this is no way to run a railroad”. I think we need to track down that person and put them in charge of bus predictions :exclamation:

It seems even more broken today, unless there’s a bus strike that I don’t know about. No 313 predictions either inbound or outbound at the moment.

Oh, I think it’s not just 313 either. No predictions on other routes in the area either.

We’re having some issues with our API since the Countdown change. We should be able to resolve these in the next hour.

Thanks,
James

Probably not your department, but status updates - Transport for London is broken too:

Hi @harry - that is my dept too!

However, I don’t think that URL is valid.

The mode should be in the URL: eg: Tube, Overground, Elizabeth line, DLR & Tram status updates - Transport for London (which is working)

thanks,
James

Tube, Overground, Elizabeth line, DLR & Tram status updates - Transport for London is the correct “short” URL

this should now be resolved @harry - I’m hoping the 313 is behaving now too