Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions MMM-Remote-Control.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ Module.register("MMM-Remote-Control", {
Log.debug(`${this.name} received a module notification: ${notification} from sender: ${sender}`);
switch (notification) {
case "DOM_OBJECTS_CREATED":
// Fallback: DOM_OBJECTS_CREATED can occasionally fire before this module
+ // has fully registered as a notification listener (race condition seen with
+ // newer Node.js/Electron versions), causing the event to be missed and the
+ // module to stay permanently "not initialized". ALL_MODULES_STARTED is
+ // received reliably afterwards and acts as a safety net.
+ case "ALL_MODULES_STARTED":
+ if (this.currentDataSent) { break; }
+ this.currentDataSent = true;
this.sendSocketNotification("REQUEST_DEFAULT_SETTINGS");
this.sendCurrentData();
break;
Expand Down
Loading