deg0nz / mmm-publictransportberlin Goto Github PK
View Code? Open in Web Editor NEWMagicMirror module to display public transport in Berlin and Brandenburg with BVG Hafas data.
License: MIT License
MagicMirror module to display public transport in Berlin and Brandenburg with BVG Hafas data.
License: MIT License
Line colors in SVG images here:
https://en.wikipedia.org/wiki/Trams_in_Berlin
Hi, I have some troubles with this module.
I installed it correctly with the given commands and I can also see the Folder.
Then I copied the example (alexander Platz) into the Magic mirror config where all the other modules are.
When I start MM nothing happens, all other modules load smoothly, but not the transportation module, not even an error message. It’s just like the code of this module isn’t there but I double checked everything.
Did I something wrong?
thank already for the replys!
Hey! This is the author of vbb-rest, deployed at transport.rest
. Nice to see that you (seem to) use my service!
I'm here to let you know that The API & format deployed at transport.rest
is deprecated. Please use the new API, deployed at vbb.transport.rest
. You can find docs for the new format in the vbb-rest
repo.
Maybe via hafas-client
directly on the mirror
Hey again, i don't really know if i am too stupid or if it don't really work.
so i am living on the edge of fisherinsel. Around the corner I've got "Märkisches Museum"
so i wanted to ignore the busses which drive in the direction "Märkisches Museum" / "Ostbahnhof"
name: "Fischerinsel",
stationId: 900000100526,
hidden: false,
is working fine!
But when i try ignoredStations i still see the busses which drive in direction Märkisches Museum / Ostbahnhof.
i tried
ignoredStations: [900000100014, 900000100516, 900000120005, 900000120010, 900000261491],
and also this format:
ignoredStations: ['900000100014', '900000100516', '900000120005', '900000120010', '900000261491'],
BUT: If i combine both:
ignoredStations: [900000100014, 900000100516, 900000120005, 900000120010, 900000261491, '900000100014', '900000100516', '900000120005', '900000120010', '900000261491'],
at least every bus in direction Märkisches Museum disappears!
Change the module Design to look like the VBBNow macOS widget.
(For the departure entries)
Maybe leave the current design as fallback option or so.. (for people who don't like the new design..)
Add automatic translation for table headings and other hardcoded strings
Add canceled trips function to mark canceled trips in the module with strikethrough or 'canceled'-label.
hafas-client
v1.3.0 supports this.
Hey there,
after I installed my MM-config completly new, the MMM-PublicTransportBerlin won't load anymore.
Before all was fine...can everybody help me or have the same problem?
thx
Kann die Abfahrtzeit wahlweise auch als 'in x Minuten' angezeigt werden?
Bei Zeiten => einer Stunde (Ja, auf dem Lande gibt es sowas...) dann als Uhrzeit.
Also so wie bei DAISY ...
Hi deng0nz,
great module, great work. I have updated to the new version and also your new entry for the config.js, but I always get the "config file error". Even when I take a blank config.js with just MMM-PublicTransportBerlin and your "Alexanderplatz" entry as a single module. Tried everything, like js-linter and so on, nothing worked out.
Any idea?
Thanks in advance
wominator
I found in the logs an error regarding a missing INBR:
[01.10.2021 15:58.44.520] [ERROR] Error: station ID must be a valid IBNR. at Object.formatStation (/home/pi/MagicMirror/modules/MMM-PublicTransportBerlin/node_modules/hafas-client/p/bvg/$ at Object.stop (/home/pi/MagicMirror/modules/MMM-PublicTransportBerlin/node_modules/hafas-client/index.js:285:53) at BvgFetcher.getDirectionDescriptor (/home/pi/MagicMirror/modules/MMM-PublicTransportBerlin/BvgFetcher.js:35:39) at Class.sendInit (/home/pi/MagicMirror/modules/MMM-PublicTransportBerlin/node_helper.js:47:47) at processTicksAndRejections (internal/process/task_queues.js:97:5)
I've got the right stationId by the BVG-API.
Hi, when I start the script by typing node ./convenience/query_stations.mjs, then I get the following:
import { createClient } from "hafas-client";
^^^^^^^^^^^^
SyntaxError: Named export 'createClient' not found. The requested module 'hafas-client' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'hafas-client';
const { createClient } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
at async loadESM (node:internal/process/esm_loader:91:5)
at async handleMainPromise (node:internal/modules/run_main:65:12)
Any ideas for help?
I keep seeing fetch failures (400), while the data from the previous fetch would still be current enough to display something ..
Maybe keeping the last result until the next successful fetch would make sense?
I get the following error Message display at the Mirror:
"Fehler bei Daten abrufen: {"isHafasError":true,"message":"Internal Server Error","statusCode":500}
Das könnte heißen, dass VBB-Daten gerade nicht verfügbar sind."
I used the sample config, and also reinstalled everything. But even after waiting a few days I get this message. So I think it is not a due to unavailability of the VBB Backend as the error message is intimating. Can you help me here?
When having two modules for the same stationID
but with different directionStationID
s, it shows the same result for both modules.
Each module uses its own config from the MM config file
Modules seem to be using a random(or the last occurrence) config from the MM config file based on the same StationID
First of all, thank you for your work on this module, the stuff that works is really great.
I'm trying to achieve to separate the departures of the different directions, into different modules on the screen (so you can see at a glance when your S-Bahnhof is leaving, without checking the Destination (e.g. direction North, on the right widget, direction South the left widget). (The given example does it a little differently, but its about the DirectionStationId)
So I have two modules, one named BornholmerSued
which should show all departures from Bonrholmer Str. going to Gesundbrunnen, and one module showing Departures from Bornholmer Str. going to Schoenhauser Allee.
But what I'm getting is that it shows departures to Schoenhauser Allee only on both widgets. I already tried to switch the order of the modules in the config, even inserted some other modules in between the configs for both modules, but still the same result. Most of the time it seems to be using the LAST config for the station for both modules, but sometimes I think it used the second config, but both modules always show the same data.
I tried the same thing with some Tram stations, and got the same result.
If I have 4 modules, 2 for StationA
and 2 for StationB
, both StationA
modules show the same data and both StationB
modules show the same data. SO I CAN. have multiple modules but only if they are about different Stations.
It feels like it only fetches the data ONCE per StationID
and then uses that data for all modules requesting the same StationID
, but without taking into account the different other parameters/filters
Version: 6cfcbea
Config:
{
module: "MMM-PublicTransportBerlin",
position: "right",
config: {
name: "BornholmerRing",
stationId: "900000110011",
hidden: false,
//Schoenhauser Allee
directionStationId: "900000110001",
ignoredLines: [],
excludedTransportationTypes: "bus, tram",
travelTimeToStation: 10,
interval: 120001,
departureMinutes: 25,
maxDepartures: 15,
marqueeLongDirections: true,
showColoredLineSymbols: true,
useColorForRealtimeInfo: true,
showTableHeaders: true,
showTableHeadersAsSymbols: true,
maxUnreachableDepartures: 3,
maxReachableDepartures: 6,
fadeUnreachableDepartures: true,
fadeReachableDepartures: true,
fadePointForReachableDepartures: 0.25,
excludeDelayFromTimeLabel: true
}
},
{
module: "MMM-PublicTransportBerlin",
position: "left",
config: {
name: "BornholmerSued",
stationId: "900000110011",
hidden: false,
//Gesundbrunnen
directionStationId: "900000007102",
ignoredLines: [],
excludedTransportationTypes: "bus, tram",
travelTimeToStation: 10,
interval: 120000,
departureMinutes: 25,
maxDepartures: 15,
marqueeLongDirections: true,
showColoredLineSymbols: true,
useColorForRealtimeInfo: true,
showTableHeaders: true,
showTableHeadersAsSymbols: true,
maxUnreachableDepartures: 3,
maxReachableDepartures: 6,
fadeUnreachableDepartures: true,
fadeReachableDepartures: true,
fadePointForReachableDepartures: 0.25,
excludeDelayFromTimeLabel: true
}
},
We are beginners in Raspberry and Magic Mirror.
How can we change the font on modules in general? Is something like this possible?
Thx for every help we get.
Vincent
Hello, I think the Option "excludeDelayFromTimeLabel" is not working
🚨 You need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial
branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.
First of all thank you again for your hard work in cooperation with @derhuerst and making this module usable again.
Unfortunately I can't get the directionStationId to work like it did with vbb-rest. The IDs are the same with bvg-rest, but it isn't working as I can still see the lines in the other direction.
Is this an issue in bvg-rest?
Sometimes the following error is shown in the user interface:
TypeError: depArray[(i + 1)] is undefined
I assume this appears when there is just 1 entry, in which case depArray[1], if i = 0, does not exist.
I have installed the module MMM-PublicTransportDB and adjusted the Config.
After a reboot this mirror appears at the module position only Loading …
What do I have to adjust to make the module work?
Here is my config
{
module: 'MMM-PublicTransportDB',
position: 'top_right',
config: {
name: "Bahnhof",
stationId: 8000139,
hidden: false,
ignoredStations: [],
excludedTransportationTypes: '',
delay: 10,
interval: 120000,
departureMinutes: 300,
maxDepartures: 15,
marqueeLongDirections: true,
showColoredLineSymbols: true,
useColorForRealtimeInfo: true,
showTableHeadersAsSymbols: true,
maxUnreachableDepartures: 3,
maxReachableDepartures: 7,
fadeUnreachableDepartures: true,
fadeReachableDepartures: true,
fadePointForReachableDepartures: 0.25
}
},`
`
Implement an optional function that shows relative times instead of absolute times for departures.
Idea:
2 update intervals:
Hi,
I've been getting this message on my MM for fairly busy station, so far the only one I could get to work is Alexanderplatz as in your example.
Any idea what I'm doing wrong?
This is my configured module:
{
module: "MMM-PublicTransportBerlin",
position: "top_center",
config: {
name: "U Mehringdamm",
stationId: "900000017101",
hidden: false,
ignoredStations:[] ,
ignoredLines:[] ,
excludedTransportationTypes: "bus,suburban,subway",
travelTimeToStation: 10,
interval: 120000,
departureMinutes: 10,
maxDepartures: 15,
marqueeLongDirections: true,
showColoredLineSymbols: true,
useColorForRealtimeInfo: true,
showTableHeaders: true,
showTableHeadersAsSymbols: true,
maxUnreachableDepartures: 3,
maxReachableDepartures: 7,
fadeUnreachableDepartures: true,
fadeReachableDepartures: true,
fadePointForReachableDepartures: 0.25,
excludeDelayFromTimeLabel: false
}
},
Thank you in advance, big fan of the idea of this module!
Currently, single qoutes and double qoutes are mixed in the whole code.
Convert the whole code to one variant of them and stick with it in the future
Change all the functions marked with //TODO: Make this function async
to work with async/await
to get rid of all the .then()
s (Edit: Currently in develop branch)
List to check:
VbbFetcher.js
node_helper.js
Hi there,
It would be great to add the information prognosisType
and occupancy
that are both provided from the v6.bvg api
on which the hafas-client is deployed on.
prognosisType
has different states, depending on whether real-time information is given or not. Most of the time trips that are cancelled are not officially cancelled in the systems, but you could still point them out because there is obviously no real-time data available, so prognosisType would be null
. If we could get that information, we could mark those departures as different from those that are fitted with real-time data.
It would be great to make that an option in the configuration.
E.g., the well-known navigator app for iOS makes use of that information and displays departures with prognosisType: "calculated"
(real-time information given) in italic and those without real-time information given (prognosisType: "null"
) in normal font.
occupancy
is of course self-explanatory and it would be great to have the possibility to get another column with the information for each departure, including how full the train is expected to be.
e.g. output from https://v6.bvg.transport.rest/stops/900140518/departures?duration=120:
{
"tripId": "1|42447|8|86|9022024",
"stop": {
"type": "stop",
"id": "900140518",
"name": "Sulzfelder Str. (Berlin)",
"location": {
"type": "location",
"id": "900140518",
"latitude": 52.553312,
"longitude": 13.475765
},
"products": {
"suburban": false,
"subway": false,
"tram": true,
"bus": true,
"ferry": false,
"express": false,
"regional": false
},
"stationDHID": "de:11000:900140518"
},
"when": "2024-02-09T23:36:00+01:00",
"plannedWhen": "2024-02-09T23:36:00+01:00",
"delay": 0,
"platform": null,
"plannedPlatform": null,
**"prognosisType": "calculated",**
"direction": "Krankenhaus Köpenick",
"provenance": null,
"line": {
"type": "line",
"id": "27",
"fahrtNr": "2100",
"name": "27",
"public": true,
"adminCode": "BVT---",
"productName": "Tram",
"mode": "train",
"product": "tram",
"operator": {
"type": "operator",
"id": "berliner-verkehrsbetriebe",
"name": "Berliner Verkehrsbetriebe"
}
},
"remarks": [
{
"type": "hint",
"code": "FK",
"text": "Bicycle conveyance"
}
],
"origin": null,
"destination": {
"type": "stop",
"id": "900180022",
"name": "Krankenhaus Köpenick/Südseite (Berlin)",
"location": {
"type": "location",
"id": "900180022",
"latitude": 52.438718,
"longitude": 13.592445
},
"products": {
"suburban": false,
"subway": false,
"tram": true,
"bus": true,
"ferry": false,
"express": false,
"regional": false
},
"stationDHID": "de:11000:900180022"
},
**"occupancy": "low"**
},
{
"tripId": "1|59904|6|86|9022024",
"stop": {
"type": "stop",
"id": "900140518",
"name": "Sulzfelder Str. (Berlin)",
"location": {
"type": "location",
"id": "900140518",
"latitude": 52.553312,
"longitude": 13.475765
},
"products": {
"suburban": false,
"subway": false,
"tram": true,
"bus": true,
"ferry": false,
"express": false,
"regional": false
},
"stationDHID": "de:11000:900140518"
},
"when": "2024-02-09T23:37:00+01:00",
"plannedWhen": "2024-02-09T23:37:00+01:00",
"delay": null,
"platform": null,
"plannedPlatform": null,
**"prognosisType": null,**
"direction": "Hohenschönhausen, Zingster Str.",
"provenance": null,
"line": {
"type": "line",
"id": "m4",
"fahrtNr": "5846",
"name": "M4",
"public": true,
"adminCode": "BVT---",
"productName": "Tram",
"mode": "train",
"product": "tram",
"operator": {
"type": "operator",
"id": "berliner-verkehrsbetriebe",
"name": "Berliner Verkehrsbetriebe"
}
},
"remarks": [
{
"type": "hint",
"code": "FK",
"text": "Bicycle conveyance"
}
],
"origin": null,
"destination": {
"type": "stop",
"id": "900151003",
"name": "Zingster Str. (Berlin)",
"location": {
"type": "location",
"id": "900151003",
"latitude": 52.57236,
"longitude": 13.495164
},
"products": {
"suburban": false,
"subway": false,
"tram": true,
"bus": false,
"ferry": false,
"express": false,
"regional": false
},
"stationDHID": "de:11000:900151003"
},
"occupancy": "medium"
},
{
"tripId": "1|44270|7|86|9022024",
"stop": {
"type": "stop",
"id": "900140518",
"name": "Sulzfelder Str. (Berlin)",
"location": {
"type": "location",
"id": "900140518",
"latitude": 52.553312,
"longitude": 13.475765
},
"products": {
"suburban": false,
"subway": false,
"tram": true,
"bus": true,
"ferry": false,
"express": false,
"regional": false
},
"stationDHID": "de:11000:900140518"
},
"when": "2024-02-09T23:41:00+01:00",
"plannedWhen": "2024-02-09T23:41:00+01:00",
"delay": 0,
"platform": null,
"plannedPlatform": null,
"prognosisType": "calculated",
"direction": "S Hackescher Markt",
"provenance": null,
"line": {
"type": "line",
"id": "m4",
"fahrtNr": "5242",
"name": "M4",
"public": true,
"adminCode": "BVT---",
"productName": "Tram",
"mode": "train",
"product": "tram",
"operator": {
"type": "operator",
"id": "berliner-verkehrsbetriebe",
"name": "Berliner Verkehrsbetriebe"
}
},
"remarks": [
{
"type": "hint",
"code": "FK",
"text": "Bicycle conveyance"
}
],
"origin": null,
"destination": {
"type": "stop",
"id": "900100002",
"name": "S Hackescher Markt (Berlin)",
"location": {
"type": "location",
"id": "900100002",
"latitude": 52.522605,
"longitude": 13.402359
},
"products": {
"suburban": true,
"subway": false,
"tram": true,
"bus": true,
"ferry": false,
"express": false,
"regional": false
},
"stationDHID": "de:11000:900100002"
},
"occupancy": "low"
},
{
"tripId": "1|44377|5|86|9022024",
"stop": {
"type": "stop",
"id": "900140518",
"name": "Sulzfelder Str. (Berlin)",
"location": {
"type": "location",
"id": "900140518",
"latitude": 52.553312,
"longitude": 13.475765
},
"products": {
"suburban": false,
"subway": false,
"tram": true,
"bus": true,
"ferry": false,
"express": false,
"regional": false
},
"stationDHID": "de:11000:900140518"
},
"when": "2024-02-09T23:43:00+01:00",
"plannedWhen": "2024-02-09T23:43:00+01:00",
"delay": 0,
"platform": null,
"plannedPlatform": null,
"prognosisType": "calculated",
"direction": "Falkenberg",
"provenance": null,
"line": {
"type": "line",
"id": "m4",
"fahrtNr": "5438",
"name": "M4",
"public": true,
"adminCode": "BVT---",
"productName": "Tram",
"mode": "train",
"product": "tram",
"operator": {
"type": "operator",
"id": "berliner-verkehrsbetriebe",
"name": "Berliner Verkehrsbetriebe"
}
},
"remarks": [
{
"type": "hint",
"code": "FK",
"text": "Bicycle conveyance"
}
],
"origin": null,
"destination": {
"type": "stop",
"id": "900152007",
"name": "Falkenberg (Berlin)",
"location": {
"type": "location",
"id": "900152007",
"latitude": 52.570212,
"longitude": 13.526815
},
"products": {
"suburban": false,
"subway": false,
"tram": true,
"bus": true,
"ferry": false,
"express": false,
"regional": false
},
"stationDHID": "de:11000:900152007"
},
"occupancy": "medium"
},
Is it possible to edit the font and size? How can you change the color and brightness of the symbols (depature, label, direction).
I am glad about every answer :)
With kind regards
Vincent
After pulling the December changes, I'm seeing the following error multiple times right after MM2 startup:
[ERROR] Error initializing fetcher: TypeError: Cannot read property 'getStationName' of undefined
When the UI is loaded, the following errors appear:
[ERROR] FetchError: invalid json response body at https://bvg-apps-ext.hafas.de/bin/mgate.exe? reason: Unexpected end of JSON input
at /home/magicmirror/MagicMirror/modules/MMM-PublicTransportBerlin/node_modules/node-fetch/lib/index.js:273:32
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async BvgFetcher.getStationName (/home/magicmirror/MagicMirror/modules/MMM-PublicTransportBerlin/BvgFetcher.js:27:19)
at async Class.createFetcher (/home/magicmirror/MagicMirror/modules/MMM-PublicTransportBerlin/node_helper.js:22:27) {
type: 'invalid-json'
}
Hey! This is the author of vbb-rest, deployed at vbb.transport.rest
. Nice to see that you (seem to) use my service!
I'm here to let you know that The API & format deployed at vbb.transport.rest
is deprecated. Please use the new API, deployed at 2.vbb.transport.rest
. You can find docs for the new format in the vbb-rest
repo.
I have a fresh installed raspi running raspbian buster on it and a fresh installation of MagicMirror.
I tried to add the MMM-PublicTransportBerlin - module but it doesn't appear on the screen. The example config isn't running as well.
Running the former installation of my MagicMirror the module worked without any problems but it wasn't up to date anymore.
Hello,
First off, allow me to say I love the app, it really looks great on my mirror :)
With all the strikes lately, I have been noticing that the app prioritizes showing cancelled departures first before anything else.
As a result of this, in joint S/bus stations, I am not able to see the bus departures because cancellations (even later ones) are shown before regular departures (I limit to showing 10 lines)
Is there a way to limit the number of cancellations shown? I have played with the options to no avail, so I don’t think the functionality exists but I figured I would ask if this could possibly be a future enhancement because I don’t see the strikes lessening any time soon :)
Hey, thank you for the great module!
However I just setup a new instance and have some problems with the order of the departures shown (picture was taken at 12:10):
As you can see the U5 at 12:20 is shown as unreachable, although I set 5 minutes as travelTimeToStation
and then there is the U5 at 12:10 shown as reachable, which would require running at the speed of light.
Last but not least one departure at 12:10 managed to get down between the departures at 12:15 and 12:20.
It's a bit hard to describe in words, but should be clear once you see the picture. Any idea what I can do to debug? Or give you more information?
$ node -v
v8.11.4
$ cat config/config.js
...
{
module: "MMM-PublicTransportBerlin",
position: "top_right",
config: {
name: "Strausberger Platz",
stationId: "900000120006",
hidden: false,
travelTimeToStation: 5,
//interval: 120000,
departureMinutes: 20,
//maxDepartures: 15,
marqueeLongDirections: false,
//showColoredLineSymbols: true,
//useColorForRealtimeInfo: true,
showTableHeaders: false,
//showTableHeadersAsSymbols: true,
maxUnreachableDepartures: 1,
maxReachableDepartures: 12,
fadeUnreachableDepartures: false,
fadeReachableDepartures: false,
excludeDelayFromTimeLabel: false
}
},
...
Use https://github.com/derhuerst/vbb-short-station-name to trim station names when marqee for the station names is turned off
Sometimes, the reachable departures are not calculated correctly. Especially around 00:00.
This needs investigation.
Widget crashes, even with the default configuration.
node_modules were installed.
Transportation fetcher created. (Station ID: 9160003)
Whoops! There was an uncaught exception...
TypeError: dbClient.departures is not a function
at DbFetcher.fetchDepartures (/home/pi/MagicMirror/modules/MMM-PublicTransportDB/DbFetcher.js:56:21)
at Class.getDepartures (/home/pi/MagicMirror/modules/MMM-PublicTransportDB/node_helper.js:39:44)
at Class.createFetcher (/home/pi/MagicMirror/modules/MMM-PublicTransportDB/node_helper.js:28:14)
at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-PublicTransportDB/node_helper.js:117:18)
at Socket. (/home/pi/MagicMirror/modules/node_modules/node_helper/index.js:113:11)
at Socket.emit (events.js:182:13)
at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
at process._tickCallback (internal/process/next_tick.js:61:11)
It would be cool if you can hide special lines on a station instead of the whole station. It could be useful when you only need one line of e.g. four lines on this station.
{
module: 'MMM-PublicTransportBerlin',
position: 'top_left',
config: {
name: "U Pankstrasse",
stationId: "900000009203",
travelTimeToStation: 5,
interval: 120000,
departureMinutes: 30,
maxDepartures: 15,
marqueeLongDirections: true,
showColoredLineSymbols: true,
useColorForRealtimeInfo: true,
showTableHeadersAsSymbols: true,
maxUnreachableDepartures: 2,
maxReachableDepartures: 4,
fadeUnreachableDepartures: true,
fadeReachableDepartures: false,
fadePointForReachableDepartures: 0.25
},
classes: 'default'
},
{
module: 'MMM-PublicTransportBerlin',
position: 'top_left',
config: {
name: "S+U Gesundbrunnen",
stationId: "900000007102",
travelTimeToStation: 12,
interval: 120000,
departureMinutes: 30,
maxDepartures: 15,
marqueeLongDirections: true,
showColoredLineSymbols: true,
useColorForRealtimeInfo: true,
showTableHeadersAsSymbols: true,
maxUnreachableDepartures: 2,
maxReachableDepartures: 8,
fadeUnreachableDepartures: true,
fadeReachableDepartures: false,
fadePointForReachableDepartures: 0.25
},
classes: 'default'
},
gets me Error while fetching departures (for module Instance S+U Gesundbrunnen): TypeError: Cannot use 'in' operator to search for 'bg' in undefined
, preventing rendering of this instance. The other one works.
Right now there only 502 errors incoming, that is not really a module problem right?
Currently, the times in the module are shown with the delay included, becausevbb-rest
provides them like this.
Provide a config switch to show the delay times like they are shown in the BVG app.
(The originally scheduled time without the delay time)
If a station is close to the original station, the module displays lines which stop at both stations multiple times. Is it possible with the underlying vbb-hafas
to ignore nearby stations and show departures from the original station only? I.e. if I want to show Departures from Potsdam Hauptbahnhof, ignore departures from Lange Brücke, since many trams stop at both stations, but showing it once is enough.
Hi,
I just tried out the MagicMirror² (current master 8010e6220d4cc68e9f9e3c1029998cc47df0f193) and your this module (current master, too). Run the npm install
, but sadly it does not load the departure times, and got stuck at Loading ...
OS: Debian 8
Node: v5.12.0
my config:
{
module: 'MMM-PublicTransportBerlin',
position: 'top_right',
config: {
name: 'Kniprodestr./Danziger',
stationId: 900000110021,
hidden: false,
delay: 10,
interval: 120000,
departureMinutes: 10,
maxDepartures: 15,
marqueeLongDirections: true,
showColoredLineSymbols: true,
useColorForRealtimeInfo: true,
showTableHeadersAsSymbols: true,
maxUnreachableDepartures: 3,
maxReachableDepartures: 7,
fadeUnreachableDepartures: true,
fadeReachableDepartures: true,
fadePointForReachableDepartures: 0.25
}
},
node serveronly
output after loading the page:
Starting MagicMirror: v2.1.0
Loading config ...
Loading module helpers ...
Initializing new module helper ...
No helper found for module: clock.
Initializing new module helper ...
Initializing new module helper ...
Initializing new module helper ...
No helper found for module: compliments.
No helper found for module: currentweather.
No helper found for module: weatherforecast.
Initializing new module helper ...
All module helpers loaded.
Starting server op port 8080 ...
Server started ...
Connecting socket for: updatenotification
Connecting socket for: MMM-FRITZ-Box-Callmonitor
Starting module: MMM-FRITZ-Box-Callmonitor
Connecting socket for: calendar
Starting node helper for: calendar
Connecting socket for: MMM-PublicTransportBerlin
Connecting socket for: newsfeed
Starting module: newsfeed
Sockets connected & modules started ...
Ready to go! Please point your browser to: http://localhost:8080
Received config for MMM-FRITZ-Box-Callmonitor
MMM-FRITZ-Box-Callmonitor is waiting for incoming calls.
Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/*******/basic.ics - Interval: 300000
Create new news fetcher for url: https://www.heise.de/newsticker/heise-top-atom.xml - Interval: 300000
Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
Transportation fetcher for station Kniprodestr./Danziger Str. created. (Station ID: 900000110021)
I have tried different stations and the one from your example, same result. Is there a way to get more debug output?
Kind regards,
André
The timezone of my host system is configured as UTC (Europe/Reykjavík comes close) without daylight saving, and while I can configure the display TZ for the clock (via it's timezone
configuration option), I can't for MMM-PublicTransportBerlin, resulting in always wrong times :-/
After @juliuste 's selfless help regarding the server problem of the last days, I'm encountering the following problem now:
I use the module to see when certain busses and a certain train are departuring. Bus and train have a separate entry in my config. The logo for the U-Bahn is shown as usual but the busses just show a purple background with "undefined" written on it. I still can see the departure time and the destination.
Does anybody else have the same problem with our new host?
Hi I am running this great module on my magic mirror but recently it stopped working spamming this error in the logs
Error while fetching departures (for module Instance MY_STATION): TypeError: Cannot read properties of undefined (reading 'fetchDepartures')
where I replaced my station name with MY_STATION
.
Is this a known error? Otherwise please let me know how I can provide additional info if needed
Hi, i just installed your module on my Raspberry Pi 1 (Model B) with Midori Browser.
unfortunately whenever i put your example in my config.js i can't run Magic Mirror anymore , i just get an error that the server can't be loaded.
When i remove your example everything works like normal. Any way i can provide more info, so you can see why it doesn't work? (Or Tips what i should do?)
Hi,
it seems that the S-Bahn departures in REgion Hannover are loaded by the backend but not displayed ín the list on MagicMirror.
I've checked this for Barsinghausen (station ID 8000812) and Egestorf(Deister) (station ID 8001675). Bus departures are correcly displayed (both stations handle bus and S-Bahn; not more)
After enabling lines 69+70 in DbFetcher.js the console shows this
Parsing: Bus 501 nach Sporthotel um Wed Mar 22 2017 16:31:00 GMT+0100 (CET)
Parsing: Bus 502 nach Worthstraße um Wed Mar 22 2017 16:31:00 GMT+0100 (CET)
Parsing: S 2 nach Haste um Wed Mar 22 2017 16:42:00 GMT+0100 (CET)
(node:2333) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot read property 'type' of undefined
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.