• 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.

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

Scheduled Pinned Locked Moved Troubleshooting
13 Posts 6 Posters 7.2k Views 4 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
    Shockwave
    last edited by Shockwave Nov 16, 2016, 5:24 AM Nov 16, 2016, 5:23 AM

    @RedNax
    Mr. Wizard, help please. :)
    I updated the MMM-Wunderground module tonight which pulled a new version. However, now I have Yuma, Arizona weather showing up for both Yuma, and Des Moines, Iowa. I know it’s unseasonably warm, but it wasn’t 90. :)
    Config, that has been working properly.

    	{
    		module: 'MMM-WunderGround',
    		position: 'top_right',
    		header: 'Yuma Weather',
    		config: {
    			apikey: 'removed',
    			pws: 'AZ/Yuma',
    			hourly: '0',
    			fcdaycount: '7',
    			fade: 'false',
    			fadePoint: '1',
    			alerttime: 10000,
    			UseCardinals: 1,
    			roundTmpDecs: 1,
    			}
    	},
    	{
    		module: 'MMM-WunderGround',
    		position: 'top_right',
    		header: 'Ankeny Weather',
    		config: {
    			apikey: 'removed',
    			pws: 'KIKV',
    			hourly: '0',
    			fcdaycount: '7',
    			fade: 'false',
    			fadePoint: '1',
    			alerttime: 10000,
    			UseCardinals: 1,
    			roundTmpDecs: 1,
    			}
    	},
    

    And the results:
    0_1479273600820_forecase.jpg

    1 Reply Last reply Reply Quote 0
    • F Offline
      Francopacks
      last edited by Francopacks Mar 8, 2017, 12:54 AM Mar 8, 2017, 12:53 AM

      I have this same problem. Did you ever get this resolved?

      M 1 Reply Last reply Mar 8, 2017, 1:06 AM Reply Quote 0
      • M Offline
        Mykle1 Project Sponsor Module Developer @Francopacks
        last edited by Mykle1 Mar 8, 2017, 1:07 AM Mar 8, 2017, 1:06 AM

        @Francopacks said in MMM-Wunderground - 2 locations gives duplicate data from the first location:

        I have this same problem. Did you ever get this resolved?

        It looks to me as if his pws entries are not correct. You have to get the pws from WunderGround and enter it in your config as shown below. That is my entry in the config for my pws.

        pws: 'pws:KNYNEWYO103',

        And you would need one for each location if you want multiple locations

        Create a working config
        How to add modules

        1 Reply Last reply Reply Quote 0
        • S Offline
          Shockwave
          last edited by Shockwave Mar 8, 2017, 1:29 AM Mar 8, 2017, 1:28 AM

          I fixed it by reverting to a 9/17/2016 release. Not the most elegant and I may try to move forward again so my wind isn’t in Beaufort Scale. :)

          The pws keys I showed work and can be verified by going through a regular web browser to Wunderground. Having 2 locations report the same weather is what got me to try different codes, and I was happy to learn that the city and airport identifiers work.

          1 Reply Last reply Reply Quote 0
          • R Offline
            RedNax Module Developer
            last edited by Mar 8, 2017, 5:54 AM

            Hi,

            This is because of offloading scheduling to the node_helper.js. Have a look here: https://github.com/RedNax67/MMM-WunderGround/issues/20

            1 Reply Last reply Reply Quote 0
            • F Offline
              Francopacks
              last edited by Mar 8, 2017, 8:31 PM

              Thanks much for the replies. Ill try duplicating the module with different names. That link will be helpful.

              1 Reply Last reply Reply Quote 0
              • J Offline
                jamielola
                last edited by Apr 18, 2017, 5:26 PM

                @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

                R 1 Reply Last reply Apr 18, 2017, 5:36 PM Reply Quote 0
                • R Offline
                  RedNax Module Developer @jamielola
                  last edited by Apr 18, 2017, 5:36 PM

                  @jamielola Hi!

                  You’ll also have to change the notifications (GET_WUNDERGROUND (request) and WUNDERGROUND (the reply sent by node_helper). Those notifications go systemwide so when 2 modules send the same one, the first one wins… The trick is to make them unique to the instance.

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    jamielola
                    last edited by Apr 18, 2017, 8:19 PM

                    @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.

                    1 Reply Last reply Reply Quote 0
                    • F Offline
                      Francopacks
                      last edited by Apr 20, 2017, 4:32 AM

                      I did after spending awhile looking through the code. Mostly it was trial and error. RedNax lays it out well.

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 1 / 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