Table of Contents

KVV plugin

ledmatrix-kvv.jpg

This plugin gives you access to the realtime train schedule of the Karlsruher Verkehrsverbund.


Functions:

kvv::line(n)line of the n'th train to depart (max n == 7)
kvv::station(n)station the n'th train will depart to
kvv::time(n)time the n'th train will depart
kvv::time_str(n)textual representation of departure time (— if none)

Examples

Widget KVV0 {
    class 'Text'
    expression kvv::line(0).' '.kvv::station(0)
    width 11

    align 'L'
    update tick
    Foreground 'ffff00'
    style 'bold'
}

Widget KVV0TIME {
    class 'Text'
    expression kvv::time_str(0)
    width 2

    align 'R'
    update tick
    foreground kvv::time(0) < 2 ? 'FF0000' : ( kvv::time(0) < 5 ? 'FFFF00' : '00FF00' )
    style 'bold'
}

Layout Default {
    Row1 {
	Col1  'KVV0'
	Col12 'KVV0TIME'
    }

Configuration

Configuration is quite simple. The most difficult part will be to obtain the correct station id. To get it go to the realtime train schedule, select your favorite station and have a look at the resulting page source code. It will contain a line like stopId = “1898”. This is the id you are searching for.

The refresh rate is the time in seconds between two requests to the server. The lower the value, the more likely the KVV will notice what we are doing here (and will eventually shut down the service) the higher it is, the greater the risk that the displayed schedule isn't up to date.

If the abbreviate option is set to 1, some simple translation mechanism is enabled. This is used to replace certain long text elements (e.g. Hauptbahnhof) with its abbreviation (e.g. Hbf.). This is useful for displays with short lines like the LEDMatrix.

Finally, if you live behind a proxy you can tell the system so.

Plugin KVV {
    StationID '12_701'
    Refresh 30
    Abbreviate 1

    Proxy 'igate'
    Port 8080;
}