|
|
|
@ -56,12 +56,14 @@ async function checkWOMAS() {
|
|
|
|
|
let dashboardData = await axios.get('https://warnung.bund.de/api31/dashboard/' + regId + '.json')
|
|
|
|
|
//console.log('dashboardData', dashboardData.data)
|
|
|
|
|
for (let alarmHead of dashboardData.data) {
|
|
|
|
|
if (alarmHead.id.indexOf('dwd.') == 0) continue
|
|
|
|
|
if (!stateMachine[ alarmHead.id ]) {
|
|
|
|
|
let alarmData = await axios.get('https://nina.api.proxy.bund.dev/api31/warnings/' + alarmHead.id + '.json')
|
|
|
|
|
for (let infoData of alarmData.data.info) {
|
|
|
|
|
await sendPage(region.preset, replaceUmlaute(infoData.headline))
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
console.log(stateMachine[ alarmHead.id ])
|
|
|
|
|
console.log(alarmHead.id, stateMachine[ alarmHead.id ])
|
|
|
|
|
stateMachine[ alarmHead.id ] = alarmData.data.info.length
|
|
|
|
|
}
|
|
|
|
|
//console.log('alarmData', alarmData.data)
|
|
|
|
|