UK National Buses Display Settings Generator Tool (Python 3)

Required Details

API Key:

API ID:

Stop ID (Naptan Code):

Use Next Bus API (Is Bus Stop in London?):

Display Rotation

Defines which way up the screen is rendered.

Time Format

Do you wish to use 24hr or 12hr time format; default is 24hr.

24 Hour Format:

12 Hour Format:

Via Message Mode

The API does not provide a Via message (the message saying where the bus is stopping at next), the program instead needs to generate this message and there are 5 ways of doing this listed below:

fixed - show only N number of regions the bus will stop at, where N is a fixed value (by default 3):

The value of N, for how many regions to show.


reduced - show every C number of regions the bus will stop at, where C is a fixed value (by default 2, ie every other region):

The value of C, for the number between each region to show.


shorten - contains every suburb/region visted, not recommend for long bus routes:


full - The longest message contains both the county and suburb for each location. This is VERY long and not recommend:


operator - Does not show the route at all, only show which operator runs each route.:

Operator

Do you wish to prefix every Via message with the operator of the service.

No, just show normal via message:

Yes, show the operator and then via message:

Energy Saving Mode

To save screen from burn in and prolong it's life it is recommend to have energy saving mode enabled. 'off' is default, between the hours set the screen will turn off. 'dim' will turn the screen brightness down, but not completely off. 'none' will do nothing and leave the screen on; this is not recommend, you can change your active hours instead.

off

dim

none

Inactive Hours

The peroid of time for which the display will go into 'Energy Saving Mode' if turned on; default is '23:00-07:00'.

Start Time:

End Time:

Animation Speed

What speed do you want the text to scroll at on the display; default is 3, must be greater than 0.

Normal (3) Speed Example
10 Speed Example

Animation Delay

How long the display will pause before starting the next animation; default is 30, must be greater than 0.

Normal (30) Delay Example
1 Delay Example

Pin Next To Arrive

Keep the bus next to arrive at the very top of the display pinned until it has left; by default true. Examples speed up to speed 10 to show pinning clearly.

Pin Next To Arrive

Unpin Next To Arrive

Reduce Animations

If you wish to stop the Via animation and cycle faster through the services use this tag to turn the animation off.

Normal Animations

Reduced Animations

Show Index

Do you wish to see index position for each service due to arrive.

Hide Index

Show Index

Extra Large Line Names

Most regions do not have service names longer than 3 characters (for example 702 or 53a), however some regions such as Nottingham have long names such as 'indigo'. If the name of the service will not fit you can expand the room. Please note, with this option turned on you can not also have show index turned on (the previous option.)

Normal Spacing :

Extra Spacing For Long Name Services:

Update Frequency

The number of days for which the Pi will wait before rebooting and checking for a new update again during your energy saving period; default 1 day (every day check).

Services To Exclude

List any services you do not wish to view. Make sure to capitalise correctly and use a single space between each service; default is nothing, ie show every service.

Normal, do not exclude anything.
Exclude all but 22; so input '23 24 25 27 29'

Destintion Mode

Some regions will incorrectly report the terminating destination for a service, for example in Nottingham all buses will just say traveling to 'Nottingham'. If this happens you can try an alternative destination message. First try the default setting and change it if needed.

Default Destination Mode :

Alternative Destintion Mode:

This is an advanced setting, if you are unsure click Next accepting the default values.

Maximum Number of Cards

The maximum number of cards you will see before forcing a new data retrieval, a limit is recommend to prevent cycling through data which may become out of data or going too far into scheduled buses; default is 9, must be greater than 0.

This is an advanced setting, if you are unsure click Next accepting the default values.

Request Limit

Defines the minium amount of time the display must wait before making a new data request, if you make this too small you risk spamming the API Server and getting rejected for overuse; default is 55(seconds)

This is an advanced setting, if you are unsure click Next accepting the default values.

Static Update Limit

Defines the amount of time the display will wait before updating the expected arrival time (based upon it's last known predicted arrival time); default is 15(seconds), this should be lower than your 'RequestLimit'

This is an advanced setting, if you are unsure click Next accepting the default values.

Recovery Time

How long the display will wait before attempting to get new data again after previously failing; default is 100, must be greater than 0.

This is an advanced setting, if you are unsure click Next accepting the default values.

Results

Below is the line of code you will need to start the program based upon the parameters you've just provided. When the answers matched the default values they have been omitted. Simply run this command in the console window where the python file is located to run the program.