I’m actually looking to do the reverse, take some MM2 modules and add them into my current MM1 (more for learning purposes). Any idea if this is possible?
Read the statement by Michael Teeuw here.
Posts
-
RE: Old Modules from MM1 transfer to MM2
-
RE: Run JavaScript if a file is created
@KirAsh4 I’m actually not storing any data into the file, it’s more like an “OK” file. What I’m trying to do is output a file to the Pi via Tasker when I hit a specific location in my commute home (I have this part working). From there I want to call a function that I have already written in JavaScript which looks up the train status from the MTA (NYC’s transit system). The idea is to run this function only when the file is output so that my wife can see which train I’m on and what the ETA will be. Currently I have the function running whenever there are delays but the problem is that it lists every train and not the specific one I am on. I’d like to have it so it just appears once the text file is output. Thanks again for your help!
-
RE: Run JavaScript if a file is created
Thanks for your reply, I’m more of a database developer so I’m really not sure how to do certain things using PHP or JavaScript. So I have a PHP page which I load and in that page it calls references some JS files. Would I add the file_exists check in the php page directly, then if it does exist, call the new JS file which will contain the info I want displayed if the file exists? Again sorry for these questions, I’m trying to learn as I go.
-
Integrate MM2 modules in legacy MM1?
Hi everyone, I have a working MM1 currently and wanted to know if it’s possible to integrate some of the new MM2 modules into the old MM1. I’m assuming I’d have to save the JS file from the module to the /js folder in MM1 and update the old config.js file? What I would update these files with is where I’m stuck. I also would need to edit the css file too. For reference I’m thinking of integrating the MMM-Nest module to the old mirror. Any help or guidance is appreciated.
FYI, I’d am doing this more to learn JavaScript as I’m a rookie - gotta start somewhere!
-
Run JavaScript if a file is created
Hi all, this is unrelated to the existing Mirror project but I am hoping someone can help.
I have a text file which I am outputting to my Pi from my phone using Tasker. For arguments sake lets say this file is test.txt. I would like to find a way to run a filewatcher to check to see if this file is available and then run some JavaScript code which will update values on my PHP page once the file is found.
I am very new with JavaScript and am not sure of the best approach to do this.Any help is appreciated!