boghammar / MMM-SL-PublicTransport

Magic Mirror module - Display public transport in Stockholm/Sweden.
MIT License
12 stars 6 forks source link

highUpdateInterval used for lowIntervals // availability of Flygbussarna // hideTime featureRequest #34

Open kitpaddle opened 5 years ago

kitpaddle commented 5 years ago

Hejsan,

First of, really neat and customisable module you've made! I love it so thanks!

Firstly, is it ok to use highUpdateInterval to define periods of lowUpdates (I've set my default to 2mins and the highUpdateInterval is set to 20mins as it was easier for me with my shift work to define times during which I sleep (and therefor dont need highUpdates).

Second, I've been looking to get time info on the "Flygbussarna" in sthlm. I've found in the findlocation.js the ID number for the stop (torsplan) which is IDnr: 1065, but I can't get it to list any Flygbuss. When I tested a different module (MMM-ResRobot) that uses a different TrafikLab API (ResRobot) the times for Flygbussarna are shown for the same stop. Do you know if this API has them? (can't find any info on TrafikLab). Or is there a parameter I'm missing explaining why I can't see them? (are they a different TransportType than bus?)

While I'm writing, here is a small "featureRequest" I might add. Not sure if others may find this useful but I think it'd be neat.

I know from my apartment, even at my fastest run I can't reach my closest station in less than 4 mins. I was wondering if there could be a parameter that therefore hides any trains/buses that have a time less than 4 mins as they are not relevant for my planning if you understand what I mean. So maybe a time parameter (minutes or seconds) that if other than 0 hides items with a time to departure less than itself?

Not sure if I'm going blind but I'm unable to find the "MMM-SL-PublicTransport.css" to configure the look of the table and its content. Is the style somewhere else or does it follow a MM default?

Thanks for your time! And again, great module you've made! Cheers /kitpaddle

samtrafiken-admin commented 5 years ago

Hi kitpaddle, Trafiklab here!

We noticed your question regarding the data. This project uses data provided by SL (SL Realtidsinformation 4). This is why you can't see Flygbussarna, as they are another transport company. If you want to include other operators as well, you need the Resrobot Stolptidtabeller API. An example of such a module would be Alvinger/MMM-ResRobot.

You can absolutely tweak the update intervals however you want. However, keep in mind that your API key has limits. You can calculate yourself how many calls your settings will generate. For example, calling the API every 2 minutes for 16 hours a day, and every 20 for 8 hours a day, will result in

([30 calls per hour] * 16 hours + [3 calls per hour] * 8 hours) * 30 days = 15120 requests per month This would not exceed the limit of 30 requests per minute, but you would go over the 10.000 requests per month. In this example case you would either need to reduce the update frequency, or reduce the time during which a high frequency is used.

Your other questions are specific to Magic Mirror platform or this repository, we'll leave it up to one of the contributors to answer those.

boghammar commented 5 years ago

Hej

I'm glad that you appreciate it and sorry for the (very) late reply. I have been traveling for a couple of months and haven't had the possibility to respond. Really appreciated that @Samtrafiken took an active part and replied to parts of your questions.

I have to look over your other suggestions and questions and get back to you. One thing that I can answer immediately is the css one. You are not blind, there is no css for this module yet. I just put it in just in case :)

So as I see it there's 2 questions left:

  1. Usage of the highUpdateIntervall parameter
  2. The "Dont show if less then x minutes left" parameter (see issue #36)

I'll get back to you on those

Cheers