Read the statement by Michael Teeuw here.
How do you get modules to communicate with each other?
-
@sdetweil sorry my laptop stopped working so only just seen this! Where am i writing these commands? In config.js? Do i need to put some sort of if condition in? Also do you know of any exaple codes that show how to do this?
Thanks
-
@adrien00 the source code of the voice module would need to do this.
many modules use this . my MMM-SleepWake does this to tell other modules that we are blanking the screen or waking it up
https://github.com/sdetweil/MMM-SleepWake
all the default modules send notifications to tell others about the weather, the calendar, alerts, news…
other modules can use the info or ignore it.
sendNotification is a broadcast to all other running modules
-
@sdetweil This is so helpful, thanks!
-
-
@adrien00 I have two modules that relay info back and forth to each other. They are weather modules and I get info and send it over to the other module.
I do this because I needed/wanted some weather info to show up in a specific place so I send my ‘payload’ from the 1st module to the 2nd module…