-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.mjs
More file actions
337 lines (322 loc) · 12.1 KB
/
Copy pathconfig.mjs
File metadata and controls
337 lines (322 loc) · 12.1 KB
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
export default {
// ── MeshCore companion connection ──────────────────────────────────────────
meshcore: {
enabled: true,
// Serial configuration (Companion USB)
// type: "Serial",
// port: "/dev/ttyACM0", // serial port of the Companion USB device
/*
TCP configuration - uncomment if you want to connect to a
companion wifi instead of companion usb
*/
type: "TCP",
host: "192.168.1.226:5555", // IP address and port of the Companion WiFi device
// Your position – used to calculate bearing and distance to lightning/quakes
lat: 48.14,
lon: 17.11
},
// ── Daily weather forecast ─────────────────────────────────────────────────
forecast: {
enabled: true,
channel: "#slovakia", // MeshCore channel name to post forecasts on
alarm: "*", // time of day to send the forecast (HH:MM), use "*" to send immediately on start
regions: [
// List of locations to include in the daily forecast.
// Each region is fetched from Open-Meteo and sent as a separate message.
{ name: "BA", lat: 48.15, lon: 17.11 },
{ name: "KE", lat: 48.72, lon: 21.26 },
{ name: "BB", lat: 48.73, lon: 19.15 },
]
},
// ── Lightning alerts (Blitzortung) ─────────────────────────────────────────
blitz: {
enabled: true,
channel: "#alerts", // MeshCore channel name to post lightning alerts on
timerCollection: 600000, // how often (ms) to evaluate collected lightning data and send alerts
monitorArea: { // bounding box – only lightning inside this area is tracked
minLat: 47.50,
minLon: 15.54,
maxLat: 49.61,
maxLon: 23.04
}
},
// ── Earthquake alerts (SeismicPortal) ─────────────────────────────────────
quake: {
enabled: true,
channel: "#alerts", // MeshCore channel name to post earthquake alerts on
minMag: 3, // minimum Richter magnitude to report
monitorArea: { // bounding box – only quakes inside this area are reported
minLat: 47.50,
minLon: 15.54,
maxLat: 49.61,
maxLon: 23.04
}
},
// ── Pohoda festival news (stageocean.com) ─────────────────────────────────
pohoda: {
enabled: true,
channel: "#pohoda", // MeshCore channel name to post news titles on
url: "https://api.stageocean.com/v1/news?eventId%5B%5D=019ec6a4-c6d4-8118-0220-dd69f353b51a&eventId%5B%5D=null&organizationId=01983111-427d-2a5f-c41b-bd416cab1d0f&status=published&sortBy=publishedAt&sortOrder=desc&isFeed=true&perPage=15&locale=sk",
pollInterval: 300 // how often (seconds) to check for new articles
},
// ── Message sending behaviour ──────────────────────────────────────────────
send: {
repeatWaitMs: 15000, // how long (ms) to wait for a nearby repeater to relay the message
maxRetries: 3 // how many times to retry sending if no repeater relay is detected
},
// ── Compass direction labels ───────────────────────────────────────────────
// Used in lightning and earthquake alert messages. Translate to your language if needed.
compasNames: {
N: "North",
NE: "North-East",
E: "East",
SE: "South-East",
S: "South",
SW: "South-West",
W: "West",
NW: "North-West"
},
// ── Radiation alerts (radmon.org) ─────────────────────────────────────────
radiation: {
enabled: true,
channel: "#alerts", // MeshCore channel name to post radiation alerts on
pollInterval: 300, // how often (seconds) to poll for new readings
alertLevel: "warning", // station threshold to trigger on: "warning" or "alert"
monitorArea: { // bounding box – every station inside this area is watched
minLat: 47.50,
minLon: 15.54,
maxLat: 49.61,
maxLon: 23.04
},
requiredReadings: 4, // consecutive readings above threshold before alerting (filters cosmic-ray spikes)
timeout: 60 // minutes before re-alerting the same station
},
// ── Meteo alarm weather warnings (meteoalarm.org) ─────────────────────────
meteoAlerts: {
enabled: true,
channel: "#alerts", // MeshCore channel name to post weather warnings on
url: "https://feeds.meteoalarm.org/feeds/meteoalarm-legacy-atom-slovakia", // Atom feed URL – change to your country
pollInterval: 60, // how often (seconds) to check the feed for new warnings
timeout: 180, // how long (minutes) to suppress re-sending the same warning
severityFilter: [ // only warnings with these severity levels are sent
"severe",
"extreme"
],
certaintyFilter: [ // only warnings with these certainty levels are sent
"likely",
"observed"
],
regions: [ // list of area names to monitor (must match names in the feed exactly)
"Bratislava"
],
regionAliases: {
"Banská Bystrica": "BB",
"Banská Štiavnica": "BS",
"Bardejov": "BJ",
"Bánovce nad Bebravou": "BN",
"Brezno": "BR",
"Bratislava": "BA",
"Bytča": "BY",
"Čadca": "CA",
"Detva": "DT",
"Dolný Kubín": "DK",
"Dunajská Streda": "DS",
"Galanta": "GA",
"Gelnica": "GL",
"Hlohovec": "HC",
"Humenné": "HE",
"Ilava": "IL",
"Kežmarok": "KK",
"Komárno": "KN",
"Košice": "KE",
"Košice-okolie": "KS",
"Krupina": "KA",
"Kysucké Nové Mesto": "KM",
"Levice": "LV",
"Levoča": "LE",
"Liptovský Mikuláš": "LM",
"Lučenec": "LC",
"Malacky": "MA",
"Martin": "MT",
"Medzilaborce": "ML",
"Michalovce": "MI",
"Myjava": "MY",
"Námestovo": "NO",
"Nitra": "NR",
"Nové Mesto nad Váhom": "NM",
"Nové Zámky": "NZ",
"Partizánske": "PE",
"Pezinok": "PK",
"Piešťany": "PN",
"Poltár": "PT",
"Poprad": "PP",
"Považská Bystrica": "PB",
"Prešov": "PO",
"Prievidza": "PD",
"Púchov": "PU",
"Revúca": "RA",
"Rimavská Sobota": "RS",
"Rožňava": "RV",
"Ružomberok": "RK",
"Sabinov": "SB",
"Senec": "SC",
"Senica": "SE",
"Skalica": "SI",
"Snina": "SV",
"Sobrance": "SO",
"Spišská Nová Ves": "SN",
"Stará Ľubovňa": "SL",
"Stropkov": "SP",
"Svidník": "SK",
"Šaľa": "SA",
"Topoľčany": "TO",
"Trebišov": "TV",
"Trenčín": "TN",
"Trnava": "TT",
"Turčianske Teplice": "TR",
"Tvrdošín": "TS",
"Veľký Krtíš": "VK",
"Vranov nad Topľou": "VT",
"Zlaté Moravce": "ZM",
"Zvolen": "ZV",
"Žarnovica": "ZC",
"Žiar nad Hronom": "ZH",
"Žilina": "ZA"
},
regionGroups: {
"BA-kraj": ["Bratislava", "Malacky", "Pezinok", "Senec"],
"TT-kraj": ["Dunajská Streda", "Galanta", "Hlohovec", "Piešťany", "Senica", "Skalica", "Trnava"],
"TN-kraj": ["Bánovce nad Bebravou", "Ilava", "Myjava", "Nové Mesto nad Váhom", "Partizánske", "Považská Bystrica", "Prievidza", "Púchov", "Trenčín"],
"NR-kraj": ["Komárno", "Levice", "Nitra", "Nové Zámky", "Šaľa", "Topoľčany", "Zlaté Moravce"],
"ZA-kraj": ["Bytča", "Čadca", "Dolný Kubín", "Kysucké Nové Mesto", "Liptovský Mikuláš", "Martin", "Námestovo", "Ružomberok", "Turčianske Teplice", "Tvrdošín", "Žilina"],
"BB-kraj": ["Banská Bystrica", "Banská Štiavnica", "Brezno", "Detva", "Krupina", "Lučenec", "Poltár", "Revúca", "Rimavská Sobota", "Veľký Krtíš", "Zvolen", "Žarnovica", "Žiar nad Hronom"],
"PO-kraj": ["Bardejov", "Humenné", "Kežmarok", "Levoča", "Medzilaborce", "Poprad", "Prešov", "Sabinov", "Snina", "Stará Ľubovňa", "Stropkov", "Svidník", "Vranov nad Topľou"],
"KE-kraj": ["Gelnica", "Košice", "Košice-okolie", "Michalovce", "Rožňava", "Sobrance", "Spišská Nová Ves", "Trebišov"]
},
// Template for the alert message.
// Available placeholders: {region} {start} {end} {event} {severity} {certainty}
severityFilter: [ // only warnings with these severity levels are sent
"severe",
"extreme",
],
certaintyFilter: [ // only warnings with these certainty levels are sent
"likely",
"observed",
],
regions: [ // list of area names to monitor (must match names in the feed exactly)
"Bratislava",
"Malacky",
"Pezinok",
"Senec",
"Dunajská Streda",
"Galanta",
"Hlohovec",
"Piešťany",
"Senica",
"Skalica",
"Trnava",
"Bánovce nad Bebravou",
"Ilava",
"Myjava",
"Nové Mesto nad Váhom",
"Partizánske",
"Považská Bystrica",
"Prievidza",
"Púchov",
"Trenčín",
"Komárno",
"Levice",
"Nitra",
"Nové Zámky",
"Šaľa",
"Topoľčany",
"Zlaté Moravce",
"Bytča",
"Čadca",
"Dolný Kubín",
"Kysucké Nové Mesto",
"Liptovský Mikuláš",
"Martin",
"Námestovo",
"Ružomberok",
"Turčianske Teplice",
"Tvrdošín",
"Žilina",
"Banská Bystrica",
"Banská Štiavnica",
"Brezno",
"Detva",
"Krupina",
"Lučenec",
"Poltár",
"Revúca",
"Rimavská Sobota",
"Veľký Krtíš",
"Zvolen",
"Žarnovica",
"Žiar nad Hronom",
"Bardejov",
"Humenné",
"Kežmarok",
"Levoča",
"Medzilaborce",
"Poprad",
"Prešov",
"Sabinov",
"Snina",
"Stará Ľubovňa",
"Stropkov",
"Svidník",
"Vranov nad Topľou",
"Gelnica",
"Košice",
"Michalovce",
"Rožňava",
"Sobrance",
"Spišská Nová Ves",
"Trebišov"
],
eventMaxChars: 50,
// Template for the alert message.
// Available placeholders: {region} {start} {end} {duration} {event} {severity} {certainty}
messageTemplate: "s: {start}, d: {duration}\n{event}\n{severity}/{certainty}\nR: {region}",
// If the share of matching regions reaches this percentage of configured `regions`,
// the regions list is replaced with `regionAllLabel`.
regionAllThresholdPercent: 80,
regionAllLabel: "SR",
// Severity level labels – translate to your language if needed
severity: {
unknown: "?",
minor: "🟢 0.",
moderate: "🟡 1.",
severe: "🟠 2.",
extreme: "🔴 3."
},
// Certainty level labels – translate to your language if needed
certainty: {
observed: "100%", // CAP: occurring or already occurred — not a probability
likely: ">50%",
possible: "<=50%",
unlikely: "~0%",
unknown: "?"
},
// Event type labels – translate to your language if needed
events: {
wind: "🌬️",
snoworice: "❄️🧊",
thunderstorm: "⛈️",
fog: "🌫️",
hightemperature: "🌡️♨️",
lowtemperature: "🌡️🧊",
coastalevent: "🌊",
forestfire: "🔥🌲",
avalanche: "Avalanche",
rain: "🌧️",
flood: "Flood",
rainflood: "Rain Flood",
marinehazard: "Marine Hazard",
drought: "Drought",
icing: "🥶"
}
}
}