Skip to content

This is a module for the MagicMirror project showing departure times from the public transport service in Trøndelag, Norway - AtB

License

Notifications You must be signed in to change notification settings

Springvar/MMM-AtbSanntid

Repository files navigation

MagicMirror² Module: MMM-AtbSanntid

This is an unofficial module for the MagicMirror project showing departure times from the public transport service in Trøndelag, Norway - AtB

Screenshot of module

How to install

Remote into your Magic Mirror box using a terminal software and go to the modules folder:

cd ~/MagicMirror/modules

Clone the repository:

git clone https://github.com/Springvar/MMM-AtbSanntid.git

Add the module to the modules array in the config/config.js file by adding the following section. You can change this configuration later when you see this works:

{
	module: 'MMM-AtbSanntid',
	position: 'top_right'
},

Find your location using the configuration form at this atb.no page.

Configuration options

Option Comment Default
stops List of stops to list departures from. Line setting is options. Leave empty or remove to include all lines. [{id: 16010011, name: "Nidarosdomen", line: '1'}]
updateInterval How often to get new data. Defaults to 1 minute. 60000
initialLoadDelay Defaults to 1 sec. 1000
rows Number of departures to show. 10
lang Language of output returned from atb. Supported (no | en) no
tableClass The css class setting to be used for the table element
headerClass The css class setting to be used for the table header element small align-left
bodyClass The css class setting to be used for the table body element small light align-left
cellPadding Style setting for cell padding 0px 7px
showIcon Show a little bus icon next to the bus line true
topPercentileClass The css class setting to be used for table rows above the topPercentileCutoff bright
topPercentileCutoff The percentage cutoff point of rows to be given the topPercentileClass 0.3
bottomPercentileClass The css class setting to be used for table rows below the bottomPercentileCutoff dimmed
bottomPercentileCutoff The percentage cutoff point of rows to be given the bottomPercentileClass 0.8
opacityFadeout Gradually fade departures in the list true
opacityLow Gradually fade from 1 down to this opacity value 0.5
showHeaders Show column headers true
lineHeader Text for the line column header. (The value will be translated if a translation exists) Line
departureHeader Text for the departure column header. (The value will be translated if a translation exists) Departure
destinationHeader Text for the destination column header. (The value will be translated if a translation exists) Destination
stopHeader Text for the stop name column header. (The value will be translated if a translation exists) Stop
truncateDestination If set to a numeric value, destination names will be truncated to this length false

About

This is a module for the MagicMirror project showing departure times from the public transport service in Trøndelag, Norway - AtB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published