You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-39Lines changed: 46 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,46 +1,53 @@
1
1
# MMM-CommandToNotification
2
+
2
3
MagicMirror² module which periodically calls configured scripts and sends the output as value of configurable notifications. The values can be displayed in modules like [MMM-ValuesByNotification](https://github.com/Tom-Hirschberger/MMM-ValuesByNotification).
3
4
4
5
Example scripts to read the temperature values of DHT11, DHT22, DS18B20, HTU21 or BME280 connected to the raspbarry or Miraflor sensor in reach of bluetooth are included in the scripts directory.
| script | Either a absolute path or the path of a script within "scripts" directory | true | String | null |
37
43
| args | Arguments which should be passed to the script | false | String | "" |
38
44
| timeout | Should the script be killed if it does not return within a specific amount of sedonds? | false | Integer | infinity |
39
45
| notifications | A array containing names of the notifications to send if script returns output. If not present the script gets called but no notification will be send | false | Array |[]|
40
46
41
-
42
47
### Example
48
+
43
49
Add the following example to produce the following result:
50
+
44
51
* the scripts will be iterated every 10 seconds cause no skips option is configured
45
52
* the script "scripts/randomInteger.js" gets called every iteration
46
53
* a random number between -10 and 10 is produced
@@ -51,32 +58,32 @@ Add the following example to produce the following result:
51
58
* the timeout of the script is set to 10 seconds
52
59
* the result of the script (JSON object as string) will be send as payload of notification TEST3
0 commit comments