-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Support for multiple houses #60
Comments
I am happy to get PRs, so please go on, but discussing the changes first would be nice. |
My use case involves having two separate instances of the module in the same MagicMirror (MM) for both my house and cabin. I assume others might have similar setups. According to the MagicMirror documentation, each module can only have one node helper. Therefore, the node helper needs to be updated to support requests from multiple instances and respond with information that allows each instance to determine whether the update from the Tibber API is relevant to them. The main change involves introducing an instance ID. This ID is used when the client (MMM-Tibber) communicates with the node helper via socket communication. The house ID serves as the instance ID, which is included in the message and extracted on the node helper side. When the node helper sends Tibber data or subscription data back to the clients (MMM-Tibber), it attaches the same instance ID to the message. Each client then checks the instance ID to see if the update is meant for them. If it is, they update their view; if not, they ignore the update. Let me know and I will open a PR so you can review the change. |
Please do :-) |
Sorry for the delay: #61 |
I guess this is completed now, right? |
Yes, closing now |
I started hacking away on a fork to support running multiple instances (house + cabin) of the module in the same MagicMirror setup. Hoping that you are open for a PR containing these changes. Sounds like a good plan?
The text was updated successfully, but these errors were encountered: