Skip to content

Examples for Controlling from Another Module

shbatm edited this page Dec 21, 2018 · 1 revision
  • Example for a notification schedule for to automatically switch your monitor on and off with :
notification_schedule: [
    {notification: 'REMOTE_ACTION', schedule: '30 9 * * *', payload: {action: 'MONITOROFF'}},
    {notification: 'REMOTE_ACTION', schedule: '30 18 * * *', payload: {action: 'MONITORON'}}
]

Or to automatically change the monitor brightness :

 notification_schedule: [
    // TURN THE SCREEN BRIGHTNESS "DAY" AT 07:30 EVERY DAY
	{notification: 'REMOTE_ACTION', schedule: '30 7 * * *', payload: {action: "BRIGHTNESS", value: "100"}},
	// TURN THE MSCREEN BRIGHTNESS "NIGHT" AT 22:30 EVERY DAY
	{notification: 'REMOTE_ACTION', schedule: '30 22 * * *', payload: {action: "BRIGHTNESS", value: "50"}}
]
  • Example to trigger Remote Actions from MMM-Navigate
Action: [
	{notification: "REMOTE_ACTION", payload: {action: "USER_PRESENCE", value: true}}, //Send notification "USER_PRESENCE" to true to all other modules
	[{notification: "REMOTE_ACTION", payload: {action: "MONITOROFF"}},{notification: "REMOTE_ACTION", payload: {action: "MONITORON"}}],
	{notification: "REMOTE_ACTION", payload: {action: "BRIGHTNESS", value: "50"}},
	{notification: "REMOTE_ACTION", payload: {action: "BRIGHTNESS", value: "200"}},
	[{notification: "REMOTE_ACTION", payload: {action: "HIDE", module: "module_2_updatenotification"}},{notification: "REMOTE_ACTION", payload: {action: "SHOW", module: "module_2_updatenotification"}}],//Hide or show the module Update_Notification. Warning : the "identifier" of the module must be used.						
	{notification: "REMOTE_ACTION", payload: {action: "REFRESH"}},
	{notification: "REMOTE_ACTION", payload: {action: "RESTART"}},
	{notification: "REMOTE_ACTION", payload: {action: "REBOOT"}},
	{notification: "REMOTE_ACTION", payload: {action: "SHUTDOWN"}}
],
Clone this wiki locally