Open manshurtigh opened 1 year ago
I had similar issues with this module, what I noticed is that it relies on v2 of Västtrafik's API, I made a fork to update it to v4 and merge some other forks to support multi-filtering. Feel free to check the other forks https://github.com/bureus/MMM-Vasttrafik-PublicTransport/network/members
Yeah, I saw that this one relies on v2 as well and I thought it had something to do with that as well.
Thank you for creating a fork and updating it to v4. I actually started to use MMM-ResRobot instead in the mean time. I will try your fork.
Your fork worked perfectly! Thank you so much @Xkhi.
I suggest that you actually put this up as a separate "version 2" or something similar on the 3rd module pages here on Github so more people can find this.
I leave this comment open so more people may find it since the authentication is a crucial part of the module to work. Again, thank you so much @Xkhi.
I thought of doing that, but it felt wrong... but now that you suggest it, I'll do it. Thanks for the encouragement.
Do it! I don't think @bureus supports this module anymore.
@Xkhi Could you add me on Discord? My name is snåm#8165. I have some more ideas for this module, if you are interested.
I don't use discord that much, but sure, we can discuss in private
Hi, I just thought I'd check with you. The only thing that shows up on my MagicMirror is the Västtrafik logo. What could be wrong? I setup a mirror in 2018 or something and that has worked until now when the SD-card in the Pi died, and I can't find the backup. So now I have a Linux Mint based Mirror. I got the API to the weather module to work but not this one.
this library is super outdated, I would recommend to use one of the forks that stem from it
Oh, I am. I was just a bit tired and commented here. I'm using your fork.
I also only get the Västtrafik Logo and i have updated to your fork? @Bagronk did you get it to work?
I got it working, and it is working. But I can't remember what I did. It does however give me errors in the terminal when running the mirror.
Are you using xkhi's fork?
Actually! Check the brackets one by one. I have a vague memory of something being off with the brackets.
Yes i am using xkhi's fork. Then i have alot of work to do, i am not a programmer either so i don't understand the brackets very well
[23.01.2024 00:03.58.287] [LOG] 00:03:58 MMM-Vasttrafik-PublicTransport: generateAccessToken failed =StatusCodeError: 401 - "{\"error_description\":\"Client Authentication failed.\",\"error\":\"invalid_client\"}" [23.01.2024 00:03.58.304] [WARN] Unhandled rejection ReferenceError: reject is not defined at /home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_helper.js:78:11 at tryCatcher (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/promise.js:725:18) at _drainQueueStep (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/async.js:93:12) at _drainQueue (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/async.js:15:14) at processImmediate (internal/timers.js:461:21)
I'm not that good at this either but it seems like the token and client doesn't work.
Have you gone to the developer site, created account and created application?
Den tis 23 jan. 2024 00:06kallby86 @.***> skrev:
[23.01.2024 00:03.58.287] [LOG] 00:03:58 MMM-Vasttrafik-PublicTransport: generateAccessToken failed =StatusCodeError: 401 - "{"error_description":"Client Authentication failed.","error":"invalid_client"}" [23.01.2024 00:03.58.304] [WARN] Unhandled rejection ReferenceError: reject is not defined at /home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_helper.js:78:11 at tryCatcher (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/promise.js:725:18) at _drainQueueStep (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/async.js:93:12) at _drainQueue (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (/home/pi/MagicMirror/modules/MMM-Vasttrafik-PublicTransport/node_modules/bluebird/js/release/async.js:15:14) at processImmediate (internal/timers.js:461:21)
— Reply to this email directly, view it on GitHub https://github.com/bureus/MMM-Vasttrafik-PublicTransport/issues/25#issuecomment-1904986817, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQT3AVOFEJUT22HTWAU5DGDYP3WFTAVCNFSM6AAAAAA22J7BVKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBUHE4DMOBRG4 . You are receiving this because you were mentioned.Message ID: @.***>
Hi guys, I have enabled issues in my fork, you can go ahead and move the conversation there
Hi!
It seems to me that I cannot connect to Västtrafik. I was wondering if anyone has seen this problem before? See logs belows.
401 indicates that I have an authorization issue, but I can't figure out what's wrong. I've checked the APIs that the application is subscribed to. See below image.
I am using ClientID as "appKey" and Secret as "appSecret".
Am I doing something wrong?