<commit_before># MMM-SL-PublicTransport
[Magic Mirror](https://magicmirror.builders/) Module - Display public transport in Stockholm/Sweden. This module use the API's provided by [Trafiklab](https://www.trafiklab.se/api).

## Get API key
You need to obtain your own API key's from TrafikLab for the following API's

* [SL Realtidinformation 4](https://www.trafiklab.se/api/sl-realtidsinformation-4)
* [SL Platsuppslag](https://www.trafiklab.se/api/sl-platsuppslag)

## Install
1. Clone repository into ``../modules/`` inside your MagicMirror folder.
2. Run ``npm install`` inside ``../modules/MMM-SL-PublicTransport/`` folder
3. Run ``node findStation.js apiKey stationName`` to find out your Station ID.
4. Add the module to the MagicMirror config

## Update
1. Run ``git pull`` inside ``../modules/MMM-SL-PublicTransport/`` folder.
2. Run ``npm install`` inside ``../modules/MMM-SL-PublicTransport/`` folder

## Configuration
```
modules: [
    ...
    {
        module: 'MMM-SL-PublicTransport',
        position: 'top_right',
        header: 'Busses',
        config: {
            apikey: 'your-api-key',         // REQUIRED.
            stationid: 'your-station-id',   // REQUIRED. You need to run the utility findStation to get this
            stationname: 'name',            // This is the name of the station. 
                                            // It's shown in the header if you have set a header on the module
            direction: 1,                   // Optional, if set only show departures in that direction.
                                            // Direction is either 1 or 2, test to see which one you need.
            displaycount: 10,               // Optional, show this number of departures for each direction.
            lines: [],                      // Optional, only show the lines listed in the array. <commit_msg>Added a notice on the issue with TrafikLab<commit_after># MMM-SL-PublicTransport
[Magic Mirror](https://magicmirror.builders/) Module - Display public transport in Stockholm/Sweden. This module use the API's provided by [Trafiklab](https://www.trafiklab.se/api).

## Get API key
You need to obtain your own API key's from TrafikLab for the following API's

* [SL Realtidinformation 4](https://www.trafiklab.se/api/sl-realtidsinformation-4)
* [SL Platsuppslag](https://www.trafiklab.se/api/sl-platsuppslag)

**Please note**: There's currently some issues at TrafikLab that causes this module to fail sometimes. I have reported the issue and they are working on it. Please follow the thread at [TrafikLab's supportsite]( https://kundo.se/org/trafiklabse/d/problem-med-realtidsinformation-4-och-https/#c2726378)

## Install
1. Clone repository into ``../modules/`` inside your MagicMirror folder.
2. Run ``npm install`` inside ``../modules/MMM-SL-PublicTransport/`` folder
3. Run ``node findStation.js apiKey stationName`` to find out your Station ID.
4. Add the module to the MagicMirror config

## Update
1. Run ``git pull`` inside ``../modules/MMM-SL-PublicTransport/`` folder.
2. Run ``npm install`` inside ``../modules/MMM-SL-PublicTransport/`` folder

## Configuration
```
modules: [
    ...
    {
        module: 'MMM-SL-PublicTransport',
        position: 'top_right',
        header: 'Busses',
        config: {
            apikey: 'your-api-key',         // REQUIRED.
            stationid: 'your-station-id',   // REQUIRED. You need to run the utility findStation to get this
            stationname: 'name',            // This is the name of the station. 
                                            // It's shown in the header if you have set a header on the module
            direction: 1,                   // Optional, if set only show departures in that direction.
                                            // Direction is either 1 or 2, test to see which one you need.
            displaycount: 10,               // Optional, show this number of departures for each direction.
            lines: [],                      // Optional, only show the lines listed in the array. 
{'fraction_non_alphanumeric': 0.1110014800197336, 'fraction_numerical': 0.008386778490379871, 'mean_word_length': 2.3129084967320264, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 9, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2782925', 'n_tokens_mistral': 1153, 'n_tokens_neox': 1094, 'n_words': 411}