Read the statement by Michael Teeuw here.
New Module MMM-PWSWeather
-
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.
-
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?
-
@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?
-
@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#themesbasically 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)
-
@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.
-
@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 itsendSocketNotification 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 IDgenerally 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)
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