Giter Site home page Giter Site logo

mmm-pid's Introduction

MMM-PID

Magic Mirror Module for Prague Integrated Transport (PID)

  • shows departures and time left from departure from selected stops or nodes and their end station
  • departures time are calculated by position of the vehicle by PID, this is not time table but live data
  • stop is single stop
  • node is two or more stops that share same name and location

This module is using Public Transport | Golemio API.

Screenshot of PID module

Magic Mirror Repository : https://github.com/MagicMirrorOrg/MagicMirror

Installation

cd ~/MagicMirror/modules/
git clone https://github.com/Zippycz3ch/MMM-PID
cd ~/MagicMirror/modules/MMM-PID
npm install

Sample configs

Basic config

Basic config with one node, which is two stops.

{
    module: "MMM-PID",
    position: "top_left",
    config: {
        accessToken: "accessToken",
        feeds: [
            {
                aswIds: 522,
                title: "Ostrčilovo náměstí"
            }
        ],
    }
}, 

Showcase of more options

{
    module: "MMM-PID",
    position: "top_left",
    config: {
        accessToken: "accessToken",
        coloredSameRoute: false, // set true as defailt, turn off by false
        updateInterval: 5000,    // 5000 ms as default. Each API key has a rate limit of 20 requests per 8 seconds.
        feeds: [
            {
                aswIds: 522,
                title: "Ostrčilovo náměstí" // If no title is set, aswIds or ids is used
            },
            { 
                ids: "U522Z1P",
                limit: 2
            },
            {
                ids: "U522Z2P"
            }
        ],
    }
}, 

Configurable option

Option Description Default
ids id of singular stop null
aswIds id of node null
title Title of the feed ids or aswIds of the stop/node
limit How many entries should be loaded 7
updateInterval How often should the module fetch new information 5000ms
coloredSameRoute Departures of the same number/line with same ending station, have their numbers color matched true
accessToken access token to golemio API null

ApiKey and Stop IDs

Register here for API key.

Find your stop ids or node aswIds.

StopID U754Z1P = aswIds 754

mmm-pid's People

Contributors

zippycz3ch avatar zdenekmyq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.