-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmagicmirror.js
242 lines (240 loc) · 8.07 KB
/
magicmirror.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
var config = {
address: "", // Empty as running in a docker container.
port: 8080, // Update port in HASS.IO configuration and not here.
ipWhitelist: [], // Empty as in docker container, ACL from the host.
//
// The settings below are for a basic setup, please modifiy as needed.
//
language: "en",
timeFormat: 24,
units: "imperial",
customCss: "css/custom.css",
modules: [
{
module: "alert",
},
{
module: "updatenotification",
position: "top_bar"
},
{
module: 'MMM-OnScreenMenu',
position: 'bottom_right',
config: {
touchMode: true,
enableKeyboard: true,
menuItems: {
notify1: { title: "Home",
icon: "home",
notification: "PAGE_CHANGED",
payload: 0 },
notify2: { title: "Comics",
icon: "comment",
notification: "PAGE_CHANGED",
payload: 1 },
notify3: { title: "Home Assistant",
icon: "house-signal",
notification: "PAGE_CHANGED",
payload: 2 },
notify4: { title: "Google",
icon: "chrome",
notification: "PAGE_CHANGED",
payload: 3 },
notify5: { title: "GoogleMapsTraffic",
icon: "chrome",
notification: "PAGE_CHANGED",
payload: 4 }
}
}
},
{
module: "MMM-pages",
config: {
modules: [
[ "calendar", "clock","weatherforecast","currentweather","newsfeed", "MMM-HASS", "MMM-homeassistant-sensors" ],
[ "DailyXKCD" ],
[ "MMM-iFrame" ],
[ "MMM-GoogleFit","MMM-GoogleMapsTraffic"]
],
excludes: ["alert", "updatenotification", "MMM-OnScreenMenu"],
}
},
{
module: 'MMM-iFrame',
position: 'fullscreen_below', // This can be any of the regions.
config: {
url: ["http://192.168.0.111:8123/lovelace/overview"],
updateInterval: 60 * 60 * 1000,// Refresh every 60 minutes
width: "100%",
height: "1000px"
}
},
{
module: "DailyXKCD",
position: 'top_left',
config: {
invertColors: true,
showTitle: true,
showAltText: false
}
},
{
module: "clock",
position: "top_left"
},
{
module: "calendar",
header: "US Holidays",
position: "top_left",
config: {
calendars: [
{
symbol: "calendar-check-o ",
url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
},
{ symbol: "calendar-check-o",
url: "https://calendar.google.com/calendar/ical/basic.ics"
}
]
}
},
{
module: "compliments",
position: "lower_third"
},
{
module: "currentweather",
position: "top_right",
config: {
location: "Anytown,US",
locationID: "8675309", //ID from http://www.openweathermap.org/help/city_list.txt
appid: ""
}
},
{
module: "weatherforecast",
position: "top_right",
header: "Weather Forecast",
config: {
location: "anytown,US",
locationID: "8675309", //ID from http://www.openweathermap.org/help/city_list.txt
appid: ""
}
},
{
module: "newsfeed",
position: "bottom_bar",
config: {
feeds: [
{
title: "New York Times",
url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
},
{
title: "BBC",
url: "http://feeds.bbci.co.uk/news/video_and_audio/news_front_page/rss.xml?edition=uk",
},
{
title: "Propublica",
url: "http://feeds.propublica.org/propublica/main",
},{ title: "Reddit",url: "http://www.reddit.com/r/news+worldnews+politics+upliftingnews+fridaynewsdump+todayilearned+.rss"}
],
showSourceTitle: true,
showPublishDate: true,
ignoreOldItems: true,
ignoreOlderThan: 864000000
}
},
{
module: "MMM-HASS",
position: "top_left",
config: {
host: "http://192.168.0.111", // Special docker ha api proxy
port: "8123",
https: false,
hassiotoken: true,
devices: [
{ deviceLabel: "Exterior",
deviceReadings: [
{ sensor: "sensor.yr_temperature", icon: "wi wi-thermometer", suffix: "°"},
{ sensor: "sensor.yr_humidity", icon: "wi wi-humidity", suffix: "%"}
]
},
{ deviceLabel: "Interior",
deviceReadings: [
{ sensor: "sensor.home_temperature", icon: "wi wi-thermometer", suffix: "°", notification: "INDOOR_TEMPERATURE"},
{ sensor: "sensor.home_humidity", icon: "wi wi-humidity", suffix: "%"}
]
},
{ deviceLabel: "Internet",
deviceReadings: [
{ sensor: "sensor.speedtest_download", icon: "fa fa-tachometer-alt", suffix: ""}
]
}
]
}
},
{
module: 'MMM-homeassistant-sensors',
position: 'top_left',
config:
{
host: 'http://192.168.0.111', // Special docker ha api proxy
port: '8123',
https: false,
prettyName: false,
stripName: false,
token: "token",
values:
[
{
sensor: "sensor.alarm_panel_display",
icons:
[
{
"default":"alarm-check",
}
]
}, {
sensor: "binary_sensor.motion_sensor",
icons: [{
"state_off": "run",
"state_on": "run-fast"
}
]
},
{
sensor: "switch.alarm_chime",
icons: [
{
"state_off": "lightbulb-outline",
"state_on": "lightbulb-on-outline"
}
]
}
]
}
},
{
module: 'MMM-GoogleFit',
position: 'top_right',
config: {
displayWeight: 'false'
}
},
{
module: 'MMM-GoogleMapsTraffic',
position: 'top_left',
config: {
key: 'key',
lat: '00.00',
lng: '-00.00',
height: '300px',
width: '300px',
styledMapType: "transparent",
disableDefaultUI: true,
backgroundColor: 'hsla(0, 0%, 0%, 0)'
}
}
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {module.exports = config;}