Read the statement by Michael Teeuw here.
MMM-weconnectid with 2 accounts
-
We have two electric VW and two we-connect accounts. So I‘ve tried to get another instance running on my mirror, but it does not work. If I set a module on disable=true and the other on false in the config.js I can decide which car we can see.
So I made a workaround today with two config files which are copied in a circle and the refresh of electron is done with xdotool. All that is in a shell script which starts every 10 minutes with a cronjob. A quite dirty way, but we can see the battery status of both cars one after another :)
Has anyone found a smarter way? I also tried to do a refresh only on the MMM-weconnectid module but my coding skills are still not the best to include updateDOM or whatever to the js or json. I‘ve found a lot hits with Google and some into this direction in this forum the but nothing was explained in a simple way.
Does someone know a command to convice electron to reload just a specific module? Could be so easy from my newbie point of view 😉Cheers, Chris
-
@chrisfr1976 ok, fixed
the author has accepted these fixes too
do this
git checkout main git pull
the SoC value was not copied… don’t know where that went as I didn’t change that block. anyhow fixed
images, I made a sub folder by module instance… these should be correct now
-
@chrisfr1976 the other approach is to copy and rename the module. and change the register to match
if u can wait til tomorrow, I will update the module to support multiple instances
-
@sdetweil Wow, sure I can wait. But I’m already excited :-)
-
@chrisfr1976 try this
cd to the module folder
git fetch origin pull/6/head:test_multi git checkout test_multi
then in config.js you can use multiple instances of this module with different config settings…
to go back to the old code if there is a problem
git checkout main
I don’t have a vehicle so I cant test it. no code logic was changed.
I submitted this as a change request to the module author…
if he accepts it, you would (in the module folder)git checkout main git pull
-
@sdetweil unfortunately it works just a little.
I can see two modules the first time on my screen but I can’t see the SoC and the loaded pictures shows the same car. That is clear for me when I check the module.js file. But 2 different cars are loaded what can be seen on the run kilometers.
So your approach works in general to show the module twice. Thank you for that. That might be helpful for other modules, too.
But to get the MMM-weconnectid fully working there needs to be some more coding in the module.js to be done. Python grabs the information I think since I see no errors or strange things in the log.
Unfortunately I’m a mechanical engineer who just starts with some very simple coding. I can’t fix that.But again thanks a lot for your support and time you’ve spent!
Chris.
-
@chrisfr1976 each module 1 at a time works ok?
what is soc? state of charge?
-
@chrisfr1976 yes I see the issue. give me a little time.
-
@chrisfr1976 bug, sorry, he accepted code, but its broken
do this
git checkout main git fetch origin pull/7/head:test_multi-2 git checkout test_multi-2
then try again
-
@chrisfr1976 said in MMM-weconnectid with 2 accounts:
So your approach works in general to show the module twice.
not mine. it’s the official way to support multiple instances.
-