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.

    New Module MMM-PWSWeather

    Scheduled Pinned Locked Moved Showcase
    moduleweathernew
    8 Posts 2 Posters 98 Views 2 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.
    • msimon360M Offline
      msimon360
      last edited by

      I have published a new module to GitHub MMM-PWSWeather](https://github.com/msimon360/MMM-PWSWeather) to display Weather Data from WeatherUnderground. You can use this to display your own personal weather station or with a subscription any available station. This is my first module, I don’t know how to get it added to the 3rd-Party-Modules page.

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @msimon360
        last edited by

        @msimon360 said:

        I don’t know how to get it added to the 3rd-Party-Modules page.

        you edit the wiki at https://github.com/MagicMirrorOrg/MagicMirror
        and add your month entry to the appropriate section.

        overnight the 3rd party processor will add it to the searchable list

        any reason you made a complete module, vs another provider in the default weather module?

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        msimon360M 1 Reply Last reply Reply Quote 0
        • msimon360M Offline
          msimon360 @sdetweil
          last edited by

          @sdetweil I didn’t know about themes for weather. I will separate my module into a provider and a theme. I use pages with my mirror and want to display both weather from the default provider and from my personal weather station. How best to go about this?

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @msimon360
            last edited by sdetweil

            @msimon360 here is the link for the new weather provider
            https://docs.magicmirror.builders/module-development/weather-provider.html
            this doc is new, so any feedback is welcomed,

            and the doc for the themes
            https://docs.magicmirror.builders/modules/weather.html#themes

            basically the provider does the data acquisition (fetch) of the data , now in the server side, so multiple module instances can use the same last fetched data to keep the fetch count down

            and the optional theme does the custom display (if you don’t want to use the default theme)

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            msimon360M 1 Reply Last reply Reply Quote 0
            • msimon360M Offline
              msimon360 @sdetweil
              last edited by

              @sdetweil This is great. Is it only for weather? It would be cool if all modules could be like this. You could define data providers and then data displays. Maybe in the modules directory or another directory define a pair with a unique name to work like a module does now. That way you could define providerA with displayA as module1 and providerB with displayA as module2. This would end copying modules and renaming them do display different data in the same way.

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @msimon360
                last edited by

                @msimon360 if the modules provide multi instance support (pretty easy) then you don’t have to do the copying

                on the sendSocketNotification from module to node_helper, send some unique key, typically this.identifier will work
                when the node helper sends the response, it add the id it received…
                And
                the module in
                socketNotificationReceived, check the ID against its value… if no match, ignore it

                sendSocketNotification from the helper goes to ALL instances of the module at the SAME TIME
                so it will have to check if the data is intended for its instance ID

                generally a couple lines of code in the helper and in the module
                sometimes, really modularized node_helpers need to pass if from request to response functions… (one of mine is like that)

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                msimon360M 1 Reply Last reply Reply Quote 0
                • msimon360M Offline
                  msimon360 @sdetweil
                  last edited by

                  @sdetweil I have a weather provider working now. When I try to use $SECRET_PWS_API_KEY in my config.js it doesn’t work. I export the var in my .bashrc and I am using pm2 to start mm.

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @msimon360
                    last edited by

                    @msimon360
                    in linux, environment variables are not inherited by default.

                    you have to use

                    export variable_name=value
                    

                    in the shell script before the launch of MM

                    variable_name=value
                    

                    will not be passed to the next program

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    • 1 / 1
                    • 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