FaserF / ha-deutschebahn

Unofficial HA DB Integration, due to removal as of Home Assistant 2022.11
Apache License 2.0
50 stars 7 forks source link

Canceled attribute not true for canceled connections #24

Open gitolicious opened 10 months ago

gitolicious commented 10 months ago

The problem

The ongoing strike today is a good chance to test the "canceled" attribute.

Steps to reproduce:

Expected result:

Actual result:

image

What version of Home Assistant Core has the issue?

2023.11.2

What version of DeutscheBahn Integration has the issue?

bbd7bcd

What type of installation are you running?

Home Assistant OS

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

bcutter commented 10 months ago

I had many chances throughout the last days (including today, even now) to test this and wanted to create an issue for the very same problem.

Integration says everything is fine (even on time, no delay). Actually not a single train is driving. "SEV" by bus is the alternative following the DB app / website.

As I just started to actually use this integration productively, this first impression does not paint a very reliable picture unfortunately :-(

  1. Where does the data come from? Why the difference to the DB data (website / app)?
  2. Idea to improve the entity status in regards to this:
    • current implementation: on time = hh:mm, delayed = hh:mm +X
    • proposed addition when train is cancelled: (!) hh:mm (!) (or a similar indicator the train is cancelled)
FaserF commented 8 months ago

Hi, thanks for the issue. Unfortunatly I dont think it's a issue with the integration. Most likely its a issue with the dependency where this integration is based on: https://github.com/kennell/schiene

The schiene module graps the informations from the bahn.de website. More details can be found above. The better solution is fetching the data via hafas api, but until now it has not been merged to Homeassistant: https://github.com/home-assistant/core/pull/78839

bcutter commented 8 months ago

So what can we do NOW about this?

FaserF commented 8 months ago

Unfortunatly at homeassistant noone has showed support to the hafas homeassistant integration developer, therefore no new work has been done since some months on the pull request. You can give the custom integration a try here: https://github.com/akloeckner/hacs-hafas

Otherwise you can raise a ticket at schiene repo, but the developer there is not actively working anymore on schiene and I dont think that he will work on it.

bcutter commented 8 months ago

Oh great... sounds like only bad options - and therefore none at all.

So...?

Unreliable data produced by this issue is a real problem unfortunately. If I need to pull out my phone and check with official DB app if the train is actually driving at all - it makes the whole integration useless pretty fast unfortunately.

FaserF commented 8 months ago

For now I have no better options for you. The best to try is the custom integration from above.

Please note that me and all the other developers mentioned here are doing it as a hobby within our free time. The current way is more a "hacky" way to grab the data from the bahn.de website, since DB does not offer any API connection. The HAFAS way is a real API (which is not meant for personal use, but does work).

SupiTrobi commented 7 months ago

Hi, I tried the custom integration you mentioned above. To me it seems that the same "mistake" exists since the GDL is on its "usual" strike today ;-). Also with that integration I receive cancelled = false even on the bahn.de Site the connection is cancelled. Pretty sad that it also doesn't work properly. :-(

FaserF commented 5 months ago

Unfortunatly I dont think that we can do there anything on our end, since the API from the train sites then is providing it wrongly 👎🏼

bcutter commented 2 months ago

Today:

Integration: punctual

DB app/actual reality: image

Doesn't add anything to this issue - but reminded me once again I simply can't rely on the integration's data. Therefore unfortunately useless most of the time. Very sad to say.