nucleus-ffm / foss_warn

An unofficial open source application to get emergency alerts from https://warnung.bund.de/meldungen.
GNU General Public License v3.0
100 stars 6 forks source link

pre 0.4.1 Feedback: warning overflow #51

Open citizenserious opened 2 years ago

citizenserious commented 2 years ago

There is an absolute Warning overflow which may be related to the new API or something else. I attached screenshots where you can see that there are warning incoming seconds apart which are labeled as "update" but contain nearly the same information. I do not know if this is a issue triggered by the BBK or the DWN or if it is a app thing. That's why I looked up the warnings on the website of the BBK and also attached a screenshot of it.

Frequency was set to 1 Minute to try out the battery and data consumption. Which I can not fully classify yet, but the data consumption seems to be much lower for now.

Screenshot_20220820-132507_FOSS_Warn

Screenshot_20220820-132858_FOSS_Warn

Screenshot_20220820-134221_FOSS_Warn

Screenshot_20220820-135332_FOSS_Warn

Screenshot_20220820-134257_Iceraven

Further feedback: the #41 issue seems to be gone for me. also I can select my city now, before I had to select the whole district.

Edit: I attache more information so you can see the difference in the warning here as an example:

Screenshot_20220820-142040_FOSS_Warn Screenshot_20220820-142019_FOSS_Warn

I also saved the ID of these two warnings above but left it out because I do not know if it would reveal my position, if you need it I would send it to you via pm.

Also there is something odd about the notifications, they are all doubled now.

Screenshot_20220820-150028_Settings

nucleus-ffm commented 2 years ago

Thanks for the feedback. The large amount of alerts is annoying, but as you can see they all have a different Id (otherwise you wouldn't get the new notification). So I am not sure what to do about it. Should there be no notification of updates? One could just turn off the notifications about "starke Gewitter" in general.

citizenserious commented 2 years ago

Hmm, I don't know how to handle this. Do you know how the Nina app handles these warnings? Updates are important, but if some have to disable these warnings in general it is even worse than just cutting the updates in my opinion. Maybe making it optional? I don't know what's best.

I have an idea though: The updates I got today were just changes in "Effektiv ab:" and "Gültig ab:" not even the "Gültig bis" nor the description changed in anyway (Edit: of course "Meldung vom" and the type "Typ: update" changed too). So if a warning is labeled as an "update" and there are no changes besides the "Effektiv ab" and "Gültig ab" there should no warning be triggered am I right? Maybe I am overlooking something here. But I do not even know how to implement this and if this would be a hard thing to code. The problem I could think of is how to connect these warning updates to the "original" warning, because they all get different IDs.

I even got one "update" where nothing was changed besides the ID and "Meldung vom" and the labeling als "Typ: Update" nothing else, I can't imagine that Nina would broadcast this to its users. The problem here lies primarily at the DWD.

citizenserious commented 11 months ago

Could it be possible, that one of the issues here is that Landkreiswarnungen are used instead of Gemeindewarnungen?

MrCustomizer commented 10 months ago

This is in my opinion the most important issue to fix in this application. Too many warnings desensitize the users (which is a bad thing in a warning app). What makes matters worse is the fact, that the DWD warnings cannot be disabled completely, because the "everything else" toggle button is greyed out (why is that, btw?). I know of one person who immediately uninstalled the app because of the notification spam.

@citizenserious Could you elaborate on your proposal to use Gemeindewarnungen instead of Landkreiswarnungen? I don't understand the connection to the problem.

I'v written a mail to info@dwd.de and explained the problem. I've mentioned the problem with the different ids and asked, if that is in their opinion correct. And if so, if there is another field which connects the update to the original message. If there is no connection possible, I think citizenserious' proposal of making the connection by other metadata would be the best way to go.

In the meantime, as fixing this could take some time: Would it be feasible to allow the users to deactivate DWD warnings completely? This would mean to activate the notification toggle "Everything else" for the DWD warnings, so that users can change this toggle.

For reference, my (German) mail to info@dwd.de:

Guten Tag,

bei der App Foss Warn (https://github.com/nucleus-ffm/foss_warn) handelt es sich um eine Warn-App für Katastrophen. Das Ziel der App ist es, eine Open Source-Variante zu den etablierten Apps wie Nina und Katwarn zu schaffen.

Die App Foss Warn hat als eine Quelle für Warnungen Unwetterwarnungen des DWD eingebunden. Dort gibt es aber das Problem, dass es in der App zu "Notification Spam" kommt. Es kommen also deutlich zu viele Warnungen, was Nutzer natürlich abschreckt und nervt.

Die Ursache für das Problem liegt nach dem aktuellen Stand der Analyse daran, dass die vom DWD versendeten Nachrichten häufig mit Updates aktualisiert werden, die als eigenständige Warnmeldungen verschickt werden. In diesen Updates ist es wohl oft so, dass nur die Uhrzeiten angepasst werden ("Effektiv ab:", "Gültig ab:", etc.), die eigentliche Meldung bleibt aber die gleiche. In Foss Warn werden diese Meldungen aber nicht zusammengefasst, da die IDs dieser Nachrichten unterschiedlich sind, auch wenn sie ein Update einer schon vorhandenen Nachricht sind.

Meine Fragen dazu sind:

1.) Ist das so gedacht/korrekt, dass die Updates eigene IDs haben oder sollte vielleicht bei Updates die gleiche ID wie bei der Originalnachricht verwendet werden?

2.) Falls die Antwort auf 1 "ja" ist: Gibt es ein anderes Feld in den Nachrichten, das die eindeutige Verknüpfung eines Updates zur Originalnachricht herstellt oder könnte man eines einfügen?

Ohne die Verknüpfung müssten in FossWarn Workarounds entwickelt werden, die aus anderen Kriterien die Verknüpfung von Update zu Originalnachricht herstellt. Das ist fehleranfällig und wartungsaufwändig und deshalb keine präferierte Lösung.

Weitere Informationen und den aktuellen Stand der Analyse kann man (auf englisch) in diesem Ticket nachlesen:

https://github.com/nucleus-ffm/foss_warn/issues/51

Ich bin nicht ganz sicher, ob ich diese Anfrage an die richtige Adresse geschickt habe. Falls nicht, wäre es toll, wenn Sie mir einen passenden Ansprechpartner nennen oder diese Anfrage weiterleiten könnten.

nucleus-ffm commented 10 months ago

@MrCustomizer Thank you very much for your efforts. A few days ago I spoke to the guy behind the open source "kleine Wettervorschau Deutschland" app and he pointed me to some CAP documentation from the DWD that I didn't know about, but it helped a lot. Unlike the other source, the DWD warnings contain a filed named references where the IDs of the previous warning are actually referenced. So we are now actually able to implement the parsing of the API correctly. This is one of the next tasks we will be working on. Unfortunately this format is only used by the DWD.

Meanwhile, version 0.7.0 is currently in alpha testing. This version has completely new notification settings and you can even disable notifications from DWD and LHP completely.

MrCustomizer commented 10 months ago

@nucleus-ffm These are very good news, thanks for the update (and for continually improving the app)! I guess I know now what's behind this toot ;). Nevertheless, I will report back, if the answer by DWD contains something useful or interesting.

citizenserious commented 10 months ago

@MrCustomizer I followed all the "spam" alerts last time, you can use the ID of the message an copy it as a link.

As an example: https://warnung.bund.de/meldungen/dwd.2.49.0.0.278.0.DWD.PVW.1703096700000.53b4d8d-47d9-4535-aeac-3e78626861b9.MUL/ The last part of the link "dwd.2.49.0.0.278.0.DWD.PVW.1703096700000.53b4d8d-47d9-4535-aeac-3e78626861b9.MUL" is the ID in FOSS Warn when you have "Show extended metadata" activated in the settings.

I noticed two things:

  1. Every warning included another area in its extent and direction, but included my place (chosen location) as well. That's why I got warned for all that ID's
  2. When I compared these warning on the website of the DWD I noticed that I got even more warnings because at my location I received the warnings for my district (Landkreiswarnungen) and not specifically for my city (Gemeindewarnungen). Which means there are even more warnings not exactly relevant to my specific location I had chosen.
MrCustomizer commented 10 months ago

There are some links from the mail correspondence with DWD I wanted to share with you: Firstly, the recommendation was to use https://opendata.dwd.de/weather/alerts/cap/, which you already plan to do. Then I was pointed to some more information, which is perhaps helpful in the implementation: https://www.dwd.de/DE/leistungen/opendata/hilfe.html?nn=16102#doc625266bodyText11 https://www.dwd.de/DE/leistungen/opendata/help/warnungen/cap_dwd_implementation_notes_de_pdf.pdf?__blob=publicationFile&v=5