Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple instances #20

Closed
heaton1 opened this issue Feb 18, 2017 · 3 comments
Closed

Multiple instances #20

heaton1 opened this issue Feb 18, 2017 · 3 comments

Comments

@heaton1
Copy link

heaton1 commented Feb 18, 2017

Hello!

I've got four copies of the module running, except they all have they same weather. Each have a different pws and apikey, and yet all report the same weather.

Is there a way to run multiple instances of this module?

@RedNax67
Copy link
Owner

Unfortunately not. This is caused by the node_helper.js which handles the actual api requests. To keep from exhausting the api requests only one node_helper.js will be started. Other module instances will receive the exact same message sent by the node_helper and thus display the same information.

Older versions did allow for multiple locations because the requests where handled by the browser, however they would periodically stop updating.

@RedNax67
Copy link
Owner

RedNax67 commented Feb 18, 2017

You could do it bu having multiple copies of the MMM-Winderground dir on your pi, naming them forinstance MMM-WunderGround1, 2, 3, etc.. Then you'd have to go in to the main js and modify the module name to reflect the dirname. Also you'd have to modify the ipc message name in both the main js and node_helper.js to make it unique to this instance of the module. You'd also have to have multiple entries in the config.js reflecting the relevant modulename.

@heaton1
Copy link
Author

heaton1 commented Feb 18, 2017

Alright! Thank you for quickly clearing that up. I'll play around with it a bit and see if I can fandangle it to cooperate.

@heaton1 heaton1 closed this as completed Feb 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants