Closed daniel-s-w closed 1 year ago
Thanks for this, it solved my issue.
I did notice on the web browser the QR code did show up before this change, just couldn't get it to work on the display.
Maybe creating a PR can solve this for all of us.
Checking the docs for Magic Mirror, the notificationReceived method should send the "MODULE_DOM_CREATED" notification when the module's dom has been fully loaded.
By using "DOM_OBJECTS_CREATED", we are only waiting for the objects to be created, but not yet fully loaded.
https://github.com/TeraTech/MMM-WiFiPassword/blob/343b91b322dd96788fba3900bbb22f0b790800db/MMM-WiFiPassword.js#L113
After updating the MMM from v2.10.1 to v2.17.1 the QR Code did not show up any further. After some tests, I found, that there is no notification "DOM_OBJECTS_CREATED" send to the referenced function - thus the QR code creation does not take place. Instead the notification is named "MODULE_DOM_CREATED". Adjusting the switch statement seems to fix this issue, but should be checked further. My fix is as follows: