MMM-KVV - Local Karlsruhe transport (KVV) departure times
First of all, a big shout out to @ronny3050 for his impressive helpfulness in getting me started. I came across a really weird problem when I started developing this module and his willingness to help a newbie right away, made me feel very welcome here :).
Secondly, I want to thank @MichMich for his willingness to share his work and ideas. Trying to find a nice bathroom mirror and quite unhappy with the mirrors that are available on the market, I came across your project by chance and immediately fell in love with your invention. You could have easily used your idea to make a lot of money with your mirror, but instead you chose to share the fruits of your labor with the world. I hope that many, many others will follow your lead in the years to come :).
Anyway, here’s my first module:
MMM-KVV shows departures times for any given stop of the Karlruhe local transport network on your mirror.
It is pretty customizable and I have tried to explain its installation and configuration on the Github page. Even though there may not be that many users here from the Karlsruhe area (if any), I look forward to hearing from you, should you come across any bugs or problems or should you find this module useful.
two weeks ago i was in karlsruhe, could have need your module back then :D
ps there are leftovers of your inspirational modules like this
Does this mean you carry your MagicMirror with you, wherever you go? :D
Thanks for your pointing it out :). Yeah, in the beginning I wildly added and deleted code lines from existing modules to try and understand how the whole thing worked, in the end you end up with a nice compilation of code lines.
As a Karlsruher I have to say, the MMM-KVV Script runs like a charm, big thanks to @yo-less !
One or two annotations and suggestions:
For me, it seems like that the
maxConn(maximum amount of displayed connections) is limited to 10 even if a value higher than 10 is stated. So in practice, if you have to walk 7-8 minutes to the station, every of the 10 trains already departed. As a workaround, I determined a specific
directionto get more possible choices, but only the amount of the 10 trains which head to the specified direction appear (mostly 4-6 connections).
Is there any way to exclude departure times (like exclude: now to departure in 5 minutes) or to extend the displayed connections further than 10?
@yo-less Nice module you have here, it would be a shame if someone … would steal it. :)
I am currently working on a departure time module for Berlin/Brandenburg, I like the layout of your module and would like to use a similar layout, and I guess the MIT license says yes, but I would still like to ask.
Also I have a few suggestions, which I either implemented already, or are going to implement for my module. Maybe you want some of these options, too.
You could allow users to use a custom header, maybe they want a custom name instead of the station name? E.g. check if
this.data.headeris set, and if yes, do not create your own one.
Also when version
2.1.0of the MagicMirror is released, you can use the
And no matter which of these methods you use in the future, it might be nice to have an optional small appendix (last updated: 12:30) to the header with the time the data was last updated at, e.g. something like a font awesome refresh symbol + the time in case of connection issues.
@Jay Thanks for your kind words, I’m happy to hear somebody else is running the module on their mirror, I’ve been wondering whether someone else from our our region might eventually turn up here :). Should you run into any issues, feel free to report them here or over on the Github page.
Unfortunately, there is very little I can do to help you with your request. The data is pulled from the same dataset as the results you can see listed on http://live.kvv.de - try it for your stop and you will see that the maximum number of connections is 10 in your web browser as well. This is the way the service is designed, so if the KVV people decide to change their API at some stage to allow for more connections, the module should automatically pick that up and offer you more connections as well. If your stop is in the inner-city area, you are bound to end up with trams and trains that depart within the next few minutes. If your stop is only serviced by one line, you can normally see pretty well into the future :).
It would be possible to add a config option to only show trams that depart in, say, 5 minutes or later, but this would only shorten your list to the few of the 10 given trams that depart in 5 minutes or later. There is no way for me to add an option to extend the list of trams into the future by cutting the first few connections. This is something the API people would have to do.
I thought I had added this information to the readme, but I’ve just notice that I hadn’t, so thanks for that, will add this piece of information.
@Jopyth Thanks for your interest in my module. As it says in the license, all you have to do is include the copyright notice, should you decide to base your module on mine. Good luck with your module development :).
Also, feel free to play around with it and submit a pull request, should you add additional features.
Thanks as well for your ideas on improving the module. I had originally toyed with the idea of allowing custom module headers but then decided against it as the way it works right now, you automatically notice should you have entered the wrong stop id, which is something that happened to me from time to time when I was still developing the module. If some people feel the need to change the header, I could see myself revisiting the idea.
The update timestamp might be interesting for some people as well, so I’ll consider implementing it. I wanted to have the module as uncluttered as possible and the more info you show, the easier it is to lose sight of what’s relevant.
Thanks again for your thoughts :). It’s always nice to have some fresh ideas to include in further development stages.
@yo-less Thanks! And the cluttering is an important aspect, indeed. Should definitely be optional and that is why I would think a symbol is nice, for less space usage.