Read the statement by Michael Teeuw here.
Converting an old JS file into a module
-
@ooom416354
Do you have a link to the old module? -
@yawns Sure, the code was added as part of jangellx’s mirror project.
the actual JS file is located here
https://github.com/jangellx/MagicMirror/blob/master/js/mm-mta.js
-
Okay, looks rather simple. Do you want to develop it yourself and just need a push into the right direction? Or do you want one of us to do the conversion?
-
@yawns I think maybe if you guys are able to do the conversion I can then dive in and figure out how to go from one to the other. If I try to do it I think I’d get stuck too many times as I am pretty poor in JS. I really appreciate it!
-
Looks like it just needs a vehicle to display the info in the MM…
-
@cowboysdude for the old MM we ended up using the other function that the developer wrote to refresh and display it on the page. I’m just not sure how I can display it on the MM2 or what I’d need to rewrite to get it to work.
-
@ooom416354
ok. Do you have an api key you could provide to me via chat/pm? Then I don’t need to request an own one just for testing purposesNevermind, I got one :)
-
@ooom416354 If you know js it’s easy…
https://github.com/MichMich/MagicMirror/tree/develop/modules
-
@cowboysdude problem is I am so new to it and I don’t really know the best way to test without actually uploading everything to the Pi. I was using notepad++ to write but for testing I had used xampp for the MM1. That doesn’t work with node I don’t think right? I am a programmer but work mostly as a SQL developer so I never had a need for learning JavaScript. Is there any particular class, site, etc. I can start out with to learn and actually develop myself? Thanks.
-
@ooom416354
Could you please tell me your sStation code? I just did some testing with the JSON and noticed I don’t get up-to-date data.
When I run this I always get data from this morning: https://traintime.lirr.org/api/Departure?loc=CLP&api_key=XXXXXXXXXXXXXXXXXI need to take a closer look into this later.