this program sends via serial communication the value “S” if i use TAG1 and “G” if I usa TAG2
Then you have to use, on magic mirror, the module MMM-Serial-Notifications to read the value:
{
module: 'MMM-Serial-Notifications',
config: {
devices: {
'/dev/ttyACM0': {
messages: {
'S': [
{
notification: 'CURRENT_PROFILE',
payload: 'S',
},
],
'A': [
{
notification: 'CURRENT_PROFILE',
payload: 'G',
}
]
}
}
}
}
},
and the module MMM-ProfileSwitcher to manage all other modules:
{
module: 'MMM-ProfileSwitcher',
classes: 'default',
header: "Profile",
config: {
enterMessages: {
"G": "Ciao, G",
"S": "Ciao, S"
},
leaveMessages: {
"G": "Ciao G, ci vediamo alla prossima",
"S": "Ciao S, ci vediamo alla prossima",
},
timers: {
"S": {
time: 10 * 1000
},
"G": {
time: 10 * 1000
}
}
}
},
BYE
Stefano