MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. jamielola
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    J
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 11
    • Groups 0

    jamielola

    @jamielola

    2
    Reputation
    859
    Profile views
    11
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    jamielola Unfollow Follow

    Best posts made by jamielola

    • Python to Javascript?

      Hi

      I noticed all the modules seem to be built using JS, however I have an Python program running on my Raspberry PI that does exactly what I need it to do (it uses some python libraries). Would it be possible to build a module using Python, or convert it to JS somehow so I could have it up on a Magic Mirror. Sorry if this has been answered or glaringly obvious, so much information to take in atm. ps my JavaScript skills are 2/10 but I am learning so please go easy. Thank you

      posted in General Discussion
      J
      jamielola
    • Train status tracker

      Getting the train in the morning is a big thing in my life (can’t be late for work!) and I’d love to check the departures from my station like this example, it would be so useful. I would only need to see the destination, status and platform - http://ojp.nationalrail.co.uk/service/ldbboard/dep/KGX

      I have not got the skill to start this but do understand basic JS and can see that the National Rail (UK) has developer section - http://www.nationalrail.co.uk/46391.aspx

      Can any help and get me started on this module

      posted in Requests
      J
      jamielola

    Latest posts made by jamielola

    • RE: MMM-Wunderground - 2 locations gives duplicate data from the first location

      So I got home and was determined to get this resolved, this is the last part of the mirror and i’ll be dammed if I fail here.

      1. Switched Raspberry PI on
      2. waited for MM to load
      3. Looked on in astonishment that the module that I renamed to MMM-WunderGround2 was working and not stuck in ‘Loading’

      As I had made all them changes above to MMM-WunderGround2 including the socket name changes I Pulled MMM-WunderGround from github into the modules folder so I would have a fresh orginal copy for the 2nd instance.

      I wrote the new instance into the config file and refreshed the MM, low and behold…‘Loading’ for that new instance. However I knew what I needed to do…the oldest trick in the IT book, switch the Raspberry PI off and switch it back on again, hey presto - they both loaded fine showing separate data.

      I’d like to thank @RedNax and @Francopacks

      TLDR: make sure you carry out a restart when you change the names in the main.js and nodehelper file if they are stuck in loading.

      posted in Troubleshooting
      J
      jamielola
    • RE: MMM-Wunderground - 2 locations gives duplicate data from the first location

      Thanks @Francopacks now I know it is achievable I will have another crack at it tonight, if you have any tips that you think would be helpful I would love to hear them.

      posted in Troubleshooting
      J
      jamielola
    • RE: MMM-Wunderground - 2 locations gives duplicate data from the first location

      @RedNax Thank you for the quick response.

      I understand now.

      This may be a gap in my knowledge but if you only have one instance of wunderground in the config, and only one instance of MMM-WunderGround2 in the modules folder and rename that to MMM-WunderGround2 and point it to the correct references as I did above, it should work as the notifications are only using GET_WUNDERGROUND and WUNDERGROUND once.

      I am just getting a constant ‘Loading’ (I have checked the console from the dev tools and it all looks like it has loaded correctly with no errors) I don’t understand why would that module not work with the rename and being the only module in the modules folder and specified in the config? (my aim was to rename it, get it working, then rename the notifications, then bring the original wunderground back in to the MM)

      Sorry if this is going too far astray, you have created a great module and I am essentially trying to hack it a bit here.

      posted in Troubleshooting
      J
      jamielola
    • RE: MMM-Wunderground - 2 locations gives duplicate data from the first location

      @Francopacks Hello, did you ever manage to get this resolved. I checked the link that @RedNax sent however after much fiddling I cannot seem to get it to load.

      I made sure the API key and location worked with just one instance of the module loaded and for my testing I have cleared my config.js apart from

      modules: [
      
      
      
      {
          			module: 'MMM-WunderGround2',
          			position: 'top_left',
          			config: 
      	{
              		apikey: 'MYAPIKEY', // private; don't share!
              		pws: 'pws:KAKCANTW6', // alsaka Weather station
      			currentweather: 0,
              		coloricon: true,
              		hourly: '1',
              		fctext: '1',
              		fcdaycount: "6",
              		fcdaystart: "1",
              		hourlyinterval: "2",
              		hourlycount: "1",
      			animationSpeed: 5000,
              		alerttime: 10000,
              		alerttruncatestring: "english:",
          			roundTmpDecs: 0,
          			UseCardinals: 1,
          			layout: "vertical",
      			windunits: "mph",
          			sysstat: "0"
      			}
      		},
      
      

      I then

      • Copied and pasted MMM-WunderGround as MMM-WunderGround2 in the modules folder

      • Changed name of MMM-WunderGround.JS to MMM-WunderGround2.JS

      • Changed name of MMM-WunderGround.css to MMM-WunderGround2.css

      made some changes to the MMM-WunderGround2.JS file to accommodate the change of filename -

      Module.register("MMM-WunderGround2"
      
      getStyles: function() {
              return ["weather-icons.css", "weather-icons-wind.css",
                  "MMM-WunderGround2.css"
      

      I am stumped at 'ipc message name ’ in the main JS and Nodehelper

      Any further help would be really appreciated

      Thanks

      posted in Troubleshooting
      J
      jamielola
    • RE: Cannot display 2 sets of weather using MMM-WunderGround

      Thank you for the link, i’ll post on there so the information is relativity kept in one place

      posted in Troubleshooting
      J
      jamielola
    • Cannot display 2 sets of weather using MMM-WunderGround

      Hi

      I am trying to use MMM-WunderGround, it is a great module but I would like to display the module twice on my magic mirror (one showing my home location, one showing my work location - many miles apart)

      It seems to only pick up the last modules PWS code in the config file and display that in both modules that load on the magic mirror. I have created seperate API keys from weather underground but it still only shows data for one weather station. Please take a look at this example -

      modules: [
      {
          			module: 'MMM-WunderGround',
          			position: 'top_right',
          			config: 
      		{
              		apikey: 'FIRSTAPIKEY', // private; don't share!
              		pws: 'pws:ILONDON885', // UK Weather station sample
      			currentweather: 0,
              		coloricon: true,
              		hourly: '1',
              		fctext: '1',
              		fcdaycount: "6",
              		fcdaystart: "1",
              		hourlyinterval: "2",
              		hourlycount: "1",
      			animationSpeed: 5000,
              		alerttime: 10000,
              		alerttruncatestring: "english:",
          			roundTmpDecs: 0,
          			UseCardinals: 1,
          			layout: "vertical",
      			windunits: "mph",
          			sysstat: "0"
      			}
      		},
      
      
      
      {
          			module: 'MMM-WunderGround',
          			position: 'top_left',
          			config: 
      		{
              		apikey: 'SECONDAPIKEY', // private; don't share!
              		pws: 'pws:KAKCANTW6', // ALASKA Weather station sample
      			currentweather: 0,
              		coloricon: true,
              		hourly: '1',
              		fctext: '1',
              		fcdaycount: "6",
              		fcdaystart: "1",
              		hourlyinterval: "2",
              		hourlycount: "1",
      			animationSpeed: 5000,
              		alerttime: 10000,
              		alerttruncatestring: "english:",
          			roundTmpDecs: 0,
          			UseCardinals: 1,
          			layout: "vertical",
      			windunits: "mph",
          			sysstat: "0"
      			}
      		},
      
      ]
      

      is there anything I am missing?

      i’ll try to upload a picture to help explain better asap, I do not have enough privilege to attach

      posted in Troubleshooting
      J
      jamielola
    • RE: Train status tracker

      Thanks @nwootton from that explanation what you are saying makes sense.

      I imported the module and it looks great! I thought the platform would be good (in my case anyway) so added it in

      first row of table in JS script-

      			var trainplatCell = document.createElement("td");
      			trainplatCell.innerHTML = trains.platform;
      			trainplatCell.className = "align-left bright platform";
      			row.appendChild(trainplatCell);
      
      

      added this in the getprams function

      params += "&platform=" + this.config.platform;
      
      

      and this to the css

      .platform {
      
      color:Green;
      padding:5px;
      }
      

      https://imgur.com/a/nHDhs

      With Platform

      I have ambitions to try and calculate how many minutes late it is from its planned departure to its estimated departure, so its say “x minutes late”.I will let you know how I progress if I manage to figure JS out properly, think I have to create a function somewhere then do the calcualtion and save it in a var

      posted in Requests
      J
      jamielola
    • RE: Train status tracker

      @nwootton sorry for the lack of response I have been away. Wow it looks great! I am going to install the updated module on my mirror tonight. Also thanks for the above ^^ explaining the late and early issue, this has been a good learning experience. @Reggiejagger it looks like @nwootton has set the columns in the same order as my screenshot so I wont post that old code.

      posted in Requests
      J
      jamielola
    • RE: Train status tracker

      @nwootton Wow thank you so much, this is nearly perfect. I had been in the slow lane trying to build this and you have just hit the nail on the head.

      I have loaded the module in and does exactly what it is meant to however the status (late and early times) are a bit strange

      I changed the code slightly so I could get a better idea what was going on (just added late and early free text to relevant text fields and swapped columns around)

      The Status doesn’t seem to marry up with what is actually happening when I go to national rail. Also sometimes it is saying the trains are early, however, as the train gets closer to the station they get less early, it’s like their expected arrival time or something. Did you experience this?

      0_1489958746319_2017-03-19-212241_1824x984_scrot.png

      posted in Requests
      J
      jamielola
    • Python to Javascript?

      Hi

      I noticed all the modules seem to be built using JS, however I have an Python program running on my Raspberry PI that does exactly what I need it to do (it uses some python libraries). Would it be possible to build a module using Python, or convert it to JS somehow so I could have it up on a Magic Mirror. Sorry if this has been answered or glaringly obvious, so much information to take in atm. ps my JavaScript skills are 2/10 but I am learning so please go easy. Thank you

      posted in General Discussion
      J
      jamielola