Com-Lum / MMM-RMV

MagicMirror - extension module - RMV departure monitor
MIT License
21 stars 7 forks source link

MMM-RMV.js:334 Uncaught TypeError: collector.hide is not a function #6

Closed jnmcfly closed 6 years ago

jnmcfly commented 6 years ago

MMM-RMV.js:334 Uncaught TypeError: collector.hide is not a function at Class.getDom (MMM-RMV.js:334) at updateDom (main.js:99) at Object.updateDom (main.js:468) at Class.updateDom (module.js:358) at Class.socketNotificationReceived (MMM-RMV.js:58) at module.js:246 at r. (socketclient.js:25) at r.emit (index.js:133) at r.onevent (socket.js:270) at r.MMSocket.self.socket.onevent (socketclient.js:19) at r.onpacket (socket.js:228) at r. (index.js:21) at r.emit (index.js:133) at r.ondecoded (manager.js:345) at s. (index.js:21) at s.r.emit (index.js:133) at s.add (index.js:241) at r.ondata (manager.js:335) at r. (index.js:21) at r.emit (index.js:133) at r.onPacket (socket.js:456) at r. (socket.js:273) at r.emit (index.js:133) at r.onPacket (transport.js:145) at r.onData (transport.js:137) at WebSocket.ws.onmessage (websocket.js:147)

Com-Lum commented 6 years ago

Hello, Is there something special in your config file?

jnmcfly commented 6 years ago

Oh sorry, didn't saved my edited post. Here is my config. I dont get any data with my configuration. When I try the defaults, my Raspi slows down and fires thousands api request until they ban me for 1h :( . What ist the right way to do this with my configuration?

        {
    module: 'MMM-RMV',
    position: 'bottom_right',
    config: {
        apiKey: 'xxx-yyy-zzz',
        stationId: '3011323',
        fDestination1: '3019904'}
}

I want the connection from "Marburg Südbahnhof" to "Marburg Gutenbergstraße"

On console it throws this

Whoops! There was an uncaught exception...
TypeError: Cannot read property 'hash' of null
    at /home/pi/MagicMirror/modules/default/updatenotification/node_helper.js:68:31
    at Git.<anonymous> (/home/pi/MagicMirror/node_modules/simple-git/src/git.js:1482:10)
    at done (/home/pi/MagicMirror/node_modules/simple-git/src/git.js:1354:21)
    at ChildProcess.<anonymous> (/home/pi/MagicMirror/node_modules/simple-git/src/git.js:1379:16)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

https://imgur.com/HvQep9D this is how it looks

Com-Lum commented 6 years ago

two things: 1)The readme is a bit missleading. The "fDestination" needs to be specified as name and not with the Id. The station ID is only required for the departure station. I have to fix that in the Readme. The correct description can be found in the config-options. 2) the thousand requests seems familiar to me. I had this during first release or so. The update Interval for the request should be checked here. In the latest build the interval should be 1min per default. Max is 600 per hour / 5000 per day.

jnmcfly commented 6 years ago

ok, tried it like this:

        {
    module: 'MMM-RMV',
    position: 'bottom_right',
    config: {
        apiKey: 'xxx-yyy-zzz',
        stationId: '3011323',
        fDestination1: 'Marburg Gutenbergstraße'}
}

but the same result, "loading data" and in the browser console the same error as in the picture postet above :(

// edit:

set up a docker container (fresh install, fresh pull) with your sample configuration and got this:

https://imgur.com/YyWa6pD

    modules: [
        {
    module: 'MMM-RMV',
    position: 'bottom_right',
    config: {
        apiKey: 'abc-def-geh',
        stationId: '30000001',
        fDestination1: 'Frankfurt (Main) Hauptbahnhof'}
}
    ]
Com-Lum commented 6 years ago

the fDestination has to be the "last" station of the train, not your destination. unfortunately rmv currently cannot provide data for a trip. try: Marburg Hauptbahnhof or "Marburg Universitätsklinikum"

jnmcfly commented 6 years ago

really RMV? (╯°□°)╯︵ ┻━┻ got it, thank you... wow :) :) :+1:

have a good night

Com-Lum commented 6 years ago

There is a possibility to get trip data but then you don't have the real time information. I'll give it a try for version 2...

is it working properly now?