-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
376 lines (352 loc) · 11.2 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
/* Magic Mirror Config Sample
*
* By Michael Teeuw http://michaelteeuw.nl
* MIT Licensed.
*
* For more information on how you can configure this file
* See https://github.com/MichMich/MagicMirror#configuration
*
*/
var config = {
address: "localhost", // Address to listen on, can be:
// - "localhost", "127.0.0.1", "::1" to listen on loopback interface
// - another specific IPv4/6 to listen on a specific interface
// - "0.0.0.0", "::" to listen on any interface
// Default, when address config is left out or empty, is "localhost"
electronOptions:{
webPreferences:{
webviewTag: true
}
},
port: 8080,
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
// or add a specific IPv4 of 192.168.1.5 :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
// or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
useHttps: false, // Support HTTPS or not, default "false" will use HTTP
httpsPrivateKey: "", // HTTPS private key path, only require when useHttps is true
httpsCertificate: "", // HTTPS Certificate path, only require when useHttps is true
language: "ko",
timeFormat: 24,
units: "metric",
// serverOnly: true/false/"local" ,
// local for armv6l processors, default
// starts serveronly and then starts chrome browser
// false, default for all NON-armv6l devices
// true, force serveronly mode, because you want to.. no UI on this device
modules: [
{
module: "alert",
},
{
module: "updatenotification",
position: "top_bar"
},
{
module: "clock",
position: "top_left"
},
/*{
module: "calendar",
header: "대한민국 공휴일",
position: "top_left",
config: {
calendars: [
{
//symbol: "calendar-check",
url: 'https://calendar.google.com/calendar/ical/ko.south_korea%23holiday%40group.v.calendar.google.com/public/basic.ics',
symbol: 'calendar-check',
//url: "https://www.googleapis.com/calendar/v3/calendars/${calendarID}/events?orderBy=startTime&singleEvents=true&timeMax=2020-06-10T00:00:00Z&timeMin=2020-06-01T00:00:00Z&key=AIzaSyBQ8ZfwQiSLCimFQcfgdZNJPtOVqPScnPk"
//url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"
}
]
}
},*/
{
module: "compliments",
position: "lower_third"
},
{
module: "currentweather",
position: "top_right",
config: {
location: "Seoul, KR",
locationID: "1835847", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
appid: "ae5f846c94d969fc3241c8bd590574e9"
}
},
{
module: "weatherforecast",
position: "top_right",
header: "Weather Forecast",
config: {
location: "Seoul, KR",
locationID: "1835847", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
appid: "ae5f846c94d969fc3241c8bd590574e9"
}
},
{
module: "newsfeed",
position: "bottom_bar",
config: {
feeds: [
{
title: "JTBC News",
url: "http://fs.jtbc.joins.com//RSS/newsflash.xml"
}
],
showSourceTitle: true,
showPublishDate: true,
broadcastNewsFeeds: true,
broadcastNewsUpdates: true
}
},
/*
//MMM-SmartTouch
{
module: 'MMM-SmartTouch',
position: 'bottom_center', // This can be any of the regions.(bottom-center Recommended)
config: {
// The config property is optional.
refreshInterval: 1
}
},
*/
//MMM-GoogleAssistant module
{
module: "MMM-GoogleAssistant",
position: "fullscreen_above",
config: {
debug: false,
assistantConfig: {
lang: "ko-KR",
projectId: "cos-assitant", // Required to use gaction.
modelId: "cos-assitant-cos-assistant-949dbj", // (OPTIONAL for gaction)
instanceId: "yonseiMirror", // (OPTIONAL for gaction)
},
responseConfig: {
useScreenOutput: true,
screenOutputCSS: "screen_output.css",
screenOutputTimer: 5000,
activateDelay: 250,
useAudioOutput: true,
useChime: true,
newChime: false
},
micConfig: { // put there configuration generated by auto-installer
recorder: "arecord",
device: "plughw:1",
},
customActionConfig: {
autoMakeAction: false,
autoUpdateAction: false, // in RPI, gaction CLI might have some trouble.(current version should be 2.2.4, but for linux-arm, Google haven't updated) so leave this as false in RPI. I don't know it is solved or not.
actionLocale: "ko-KR", // At this moment, multi-languages are not supported, sorry. Someday I'll work.
},
snowboy: {
audioGain: 2.0,
Frontend: false,
Model: "smart_mirror",
Sensitivity: 0.7
},
debug: false,
A2DServer: {
useA2D: true,
stopCommand: "stop"
},
/*recipes: [ "Reboot-Restart-Shutdown.js" ]*/
}
},
//MMM-Assistant2Display
{
module: "MMM-Assistant2Display",
position: "top_left",
config: {
debug:false,
useYoutube: true,
links: {
useLinks: true,
displayDelay: 15 * 1000,
scrollStep: 7,
scrollInterval: 100,
scrollStart: 5000,
scrollActivate: true,
verbose: false
},
photos: {
usePhotos: true,
displayDelay: 5 * 1000
},
volume: {
useVolume: true,
volumePreset: "ALSA",
myScript: null//"amixer sset -M 'master' #VOLUME#%"
},
briefToday: {
useBriefToday: false,
welcome: "brief Today"
},
screen: {
useScreen: false,
delay: 5 * 60 * 1000,
turnOffDisplay: true,
ecoMode: true,
displayCounter: true,
displayBar: false,
displayStyle: "Text",
text: "Auto Turn Off Screen:",
detectorSleeping: false,
governorSleeping: false,
rpi4: false
},
pir: {
usePir: false,
gpio: 21,
reverseValue: false
},
governor: {
useGovernor: false,
sleeping: "powersave",
working: "ondemand"
},
internet: {
useInternet: false,
displayPing: false,
delay: 2* 60 * 1000,
scan: "google.fr",
command: "pm2 restart 0",
showAlert: true
},
TelegramBot: {
useTelecastSound: false,
TelecastSound: "TelegramBot.ogg"
},
cast: {
useCast: false,
castName: "MagicMirror_A2D",
port: 8569
},
spotify: {
useSpotify: false,
connectTo: null,
playDelay: 3000,
minVolume: 10,
maxVolume: 100
}
}
},
//MMM-AVStock module(AlphaVantage)
{
module: "MMM-AVStock",
position: "top_left", //"bottom_bar" is better for 'mode:ticker'
config:{
apiKey : "JND7V66JF4OQAT0N", // https://www.alphavantage.co/
timeFormat: "YYYY-MM-DD HH:mm:ss",
symbols : ["aapl", "GOOGL", "005930.KS"],
alias: ["APPLE", "", "SAMSUNG Electronics"], //Easy name of each symbol. When you use `alias`, the number of symbols and alias should be the same. If value is null or "", symbol string will be used by default.
tickerDuration: 30, // Ticker will be cycled once per this second.
chartDays: 90, //For `mode:series`, how much daily data will be taken. (max. 90)
poolInterval : 1000*5, // (Changed in ver 1.1.0) - Only For Premium Account
mode : "table", // "table", "ticker", "series"
decimals: 4, // number o decimals for all values including decimals (prices, price changes, change%...)
candleSticks : true, //show candle sticks if mode is Series
coloredCandles : true, //colored bars: red and green for negative and positive candles
premiumAccount: false, // To change poolInterval, set this to true - Only For Premium Account
}
},
//MMM-GmailFeed
{
module: 'MMM-GmailFeed',
position: 'top_center',
config: {
username: '[email protected]',
password: 'jhlee9946',
updateInterval: 60000,
maxEmails: 5,
maxSubjectLength: 40,
maxFromLength: 15,
playSound: true
}
},
//MMM-Volume
/*
{
module: "MMM-Volume",
position: "top_left", // It is meaningless. but you should set.
config: {
usePresetScript: "ALSA",
// When set to `null`, `getVolumeScript` and `setVolumeScript` will be used directly. See the experts section.
// For available presetScript, See `presetScript{}`
upDownScale: 5,
// for VOLUME_UP or VOLUME_DOWN.
volumeOnStart: 10,
// If you set this, this volume will be applied on start of MagicMirror
volumeText: "Vol: #VOLUME#%",
// Showing volume.
hideDelay: 20000,
// After X milliseconds from showing, volume gain-meter will be disappeared.
fadeDelay: 200,
// If the volume is restored with a fade effect this time in milliseconds will be waited between to scales
telegramMessages: {
CUR_VOLUME : "Current Volume is *#VOLUME#*.",
SET_VOLUME : "Setting Volume to *#VOLUME#*",
INVALID : "Invalid parameters. `/vol` or `/vol 0~100` is allowed."
},
// Usually You might not need to modify belows; Only for Experts.
getVolumeScript: ``, //get 0~100
setVolumeScript: ``, //set 0~100
// volume control scripts for Other systems. If you set null to `usePresetScript`, these fields will be used instead.
presetScript: {
"OSX": {
getVolumeScript: `osascript -e 'output volume of (get volume settings)'`, // get 0~100
setVolumeScript: `osascript -e 'set volume output volume #VOLUME#'` // set 0~100
},
"ALSA": {
getVolumeScript: `amixer sget 'Master' | awk -F"[][]" '{print ""$2""}' | grep % | awk '{gsub ( /%/, "" ) ; print}'`,
setVolumeScript: `amixer sset -M 'Master' #VOLUME#%`,
},
"HIFIBERRY-DAC": {
getVolumeScript: `amixer sget 'Digital' | grep -E -o '[[:digit:]]+%' | head -n 1| sed 's/%//g'`, // get 0~100
setVolumeScript: `amixer sset -M 'Digital' #VOLUME#%`, // set 0~100
},
"PULSE": {
getVolumeScript: `amixer get Master | awk -F"[][]" '{print ""$2""}' | grep % | awk 'NR==1{print $1}' | awk '{gsub(/%/,"") ; print}'`, // get 0~100
setVolumeScript: `amixer set Master #VOLUME#% -q`, // set 0~100
},
"RESPEAKER_SPEAKER": {
getVolumeScript: `amixer -M sget Speaker | grep -E -o '[[:digit:]]+%' | head -n 1| sed 's/%//g'`, // get 0~100
setVolumeScript: `amixer -M sset Speaker #VOLUME#%`, // set 0~100
},
"RESPEAKER_PLAYBACK": {
getVolumeScript: `amixer -M sget Playback | grep -E -o '[[:digit:]]+%' | head -n 1| sed 's/%//g'`, // get 0~100
setVolumeScript: `amixer -M sset Playback #VOLUME#%`, // set 0~100
},
},
notifications: {
VOLUME_GET : "VOLUME_GET",
VOLUME_SET : "VOLUME_SET",
VOLUME_UP : "VOLUME_UP",
VOLUME_DOWN: "VOLUME_DOWN",
VOLUME_STORE : "VOLUME_STORE",
VOLUME_RESTORE : "VOLUME_RESTORE",
VOLUME_TOGGLE : "VOLUME_TOGGLE",
CURRENT_VOLUME : "CURRENT_VOLUME",
},
// You can redefine notifications if you need.
}
},
*/
/*
//mm-music-player
{
module: 'mm-music-player',
position: 'bottom_left',
config: {
startingVolume: 50,
fadeDuriation: 2000
}
},*/
]
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {module.exports = config;}