UNSOLVED Multiple Vehicles MMM-BMWConnected
Hello, I’m looking for a way to use multiple vehicles in this module, maybe someone can help with this problem. I’ve two vehicles, everyone with its own BMW Account and can’t solve this problem by my self.
@crush You could run two instances of the module.
@mumblebaj I tried that, unfortunately unsuccessfully.
My two problems:
- Instance 2 shows the same values as instance 1, although I use different access data for Instance 2.
- The image isn’t displayed correctly, it seems like everything is a bit bigger and so it doesn’t fit properly anymore.
I am attaching a picture.
@crush the module doesn’t support multiple instances by itself.
By the design of the MagicMirror framework, all instances of the module share one node_helper, which in the case of this module is overwriting the config.
You could ask the author in the Github repo for multi-instance support.
There is also a workaround to achieve this, until the module provides multi-instance support out of the box, by duplicating the module directory and renaming it to
MMM-BMWConnected2. Inside that directory, you have to rename files like
MMM-BMWConnected2.js. Also inside the files, you have to change all occurrences from
MMM-BMWConnected. Don’t forget to change the module name in the config.js for your second entry. You should repeat this process after every update of the module that you install to stay up-to-date.
@strawberry-3-141 Thank you for your response. I used this workaround by duplicating before (yesterday) and had the problems as mentioned. The second instance (www-bmwconnected2) shows the same datas as instance number one (www-bmwconnected)???
@crush are you sure you also changed the module name for the second instance in the config file? It sounds like you have forgotten to rename something. If you need more help you can contact me on the discord channel and I can have a look.
@mumblebaj the notifications are bidirectional with the node_helper, after renaming the module correctly MagicMirror will spawn a node_helper A for module A and node_helper B for module B. They communicate directly with each other (sendSocketNotification) so the other module will not receive the notification.
This post is deleted!
@strawberry-3-141 I got it, thanks. I had to rename both modules like “module1” and “module2”. “Module” only and “Module2” as second didn’t work!
@crush that shouldn’t matter. Maybe you forgot to rename something that you fixed with renaming again.