A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
Notification between modules
-
@grasshopper001 You are in two different scopes. Try to add
.bind(this)
to yoursetInterval
’s callback.Also do you see any errors on the browser side?
- Open Chrome and navigate to your MagicMirror’s Webinterface
- Open the Chrome Dev Tools via
F12
(on Windows) - Keep an eye out for anything red in the console
- Optional You can also directly debug your modules code in the dev tools.
-
@idoodler he’s using arrow functions
=>
, therefore he stays in the same scope. -
@strawberry-3-141 Thanks, again what learned:)
-
@grasshopper001 nice work.
One comment to think about. You should not call updateDom() if you do NOT have changed content to present
This wastes cpu cycles, raising heat. And maybe preventing some other module from displaying properly.
-
@sdetweil Thanks! I’ve rewritten my code according to your comment.
-
@idoodler thanks for the help.The console part in the dev tool does help a lot!