• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Changing units from 'metric' to 'imperial' breaks currentweather module

Scheduled Pinned Locked Moved Troubleshooting
14 Posts 9 Posters 9.4k Views 9 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    sefeing @ninjabreadman
    last edited by sefeing Apr 7, 2018, 6:59 PM Apr 7, 2018, 6:22 PM

    @ninjabreadman maybe a silly question, but can I… download and manually replace the file? git cherry-pick failed with the reason:

    error: cherry-pick is not possible because you have unmerged files.
    hint: Fix them up in the work tree, and then use 'git add/rm ’
    hint: as appropriate to mark resolution and make a commit, or use
    hint: ‘git commit -a’.
    fatal: cherry-pick failed

    edit… scratch that, it just started working again…

    1 Reply Last reply Reply Quote 0
    • V Offline
      vaju0503
      last edited by vaju0503 Apr 7, 2018, 7:13 PM Apr 7, 2018, 7:11 PM

      Just look at the history of the change that was made in the other branch… it’s in modules/default/currentweather the script you need to update is currentweather.js

      I just used an SFTP connection to get into my pi, went to the directory and uploaded the new script. You have to change the following in the script lines 410 and 411. Take note in the case sensitive variable of windChillInF it was changed from windchillinF. You could do it from terminal too using nano or whatever your favorite editor is. That’s what I ended up doing until this gets merged up into the main pull.

      var windChillInF = Math.round(35.74+0.6215*tempInF35.75*Math.pow(windInMph,0.16)+0.4275*tempInF*Math.pow(windInMph,0.16));
      var windChillInC = (windChillInF - 32) * (5/9);
      

      Obviously after you fix it you’ll have to restart MM or just do a reboot and it should fix itself.

      1 Reply Last reply Reply Quote 0
      • D Offline
        dplawrance
        last edited by Apr 7, 2018, 8:44 PM

        Thank you!

        That was so simple, and it works! I tried (and failed) to switch over to the the develop branch, learned a lot more about git than I knew, but not enough.

        1 Reply Last reply Reply Quote 0
        • R Offline
          ryanvox
          last edited by ryanvox Apr 15, 2018, 4:41 AM Apr 15, 2018, 4:13 AM

          My current weather is still broke after update. Tried git checkout and it says my branch is up to date with origin/master. When I change back to metric from Imperial it kind of works. It only gives me temp and tells me its snowing or raining or whatever. Its missing sunset time, wind speed, etc. Also changed the script as stated above in modules/default/currentweather. rebooted and still no luck.

          EDIT
          Was able to get the Imperial system working but still missing wind speed, sunset/sunrise time

          1 Reply Last reply Reply Quote 0
          • D Offline
            dorfman2
            last edited by Apr 15, 2018, 3:38 PM

            Some days my current Weather module works, some days it doesn’t. My mirror is set to restart daily at 1am. It’s been working the past 2 days, but hadn’t worked the prior week. I haven’t had time to look into it, all I did was update it to 2.3.1 on a raspberry pi 3 B+.

            1 Reply Last reply Reply Quote 0
            • 1
            • 2
            • 2 / 2
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy