Deutsche Bahn Binding

After upgrade to OH 3.3-M6 the Deutsche Bahn Binding stopped working. I recreated the DB Account and application and stored the Client Key and Client Secret in openHAB. However, I get the following error message

2022-06-06 09:35:04.951 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'deutschebahn:timetable:89a673090f' changed from UNKNOWN to OFFLINE (COMMUNICATION_ERROR): java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header

What to do?

Had to go through the APi Marketplace again. Wrongly selected Fahrplan instead of Timetable.

All working again


I have openhab 3.3 -M3 running on my Pi4. I saw that the new Deutsche Bahn binding
was implemented in oh 3.3- M6. Is there a chance to install the binding
with the new connections without upgrading to M6? I did’nt get the new
oh version running, so I took the old one again…(“Never change a running system…”).
Thanks for your help!

I cannot provide that advise

what hampers you from just trying it and in case it does not work remove it again ?

then of course you shouldn’t do it.

I removed the binding. Then I reinstalled it. I got the same binding back…

No chance to fill out the new connection keys to the bridge.

have a look to the jar file:

find / -name "*org.openhab.binding.deutschebahn*jar"
7z l <path>/<to>/<jarfilename.jar>

Few lines from result:

2022-06-14 20:07:08 D....            0            0  META-INF/maven
2022-06-14 20:07:08 D....            0            0  META-INF/maven/org.openhab.addons.bundles
2022-06-14 20:07:08 D....            0            0  META-INF/maven/org.openhab.addons.bundles/org.openhab.binding.deutschebahn
2022-06-14 20:06:52 .....          438          233  OSGI-INF/org.openhab.binding.deutschebahn.internal.DeutscheBahnHandlerFactory.xml
2022-06-14 20:06:50 .....         4820         1396  org/openhab/binding/deutschebahn/internal/filter/FilterParser$InitialState.class
2022-06-14 20:06:52 .....         4043         1358  org/openhab/binding/deutschebahn/internal/AbstractDtoAttributeSelector.class
2022-06-14 20:06:52 .....         1414          654  org/openhab/binding/deutschebahn/internal/timetable/dto/StationDetails.class

Based on the timestamp I would expect this to be the latest Milestone release.

Sorry for being such a noob. I found the jar file using the command line. But it doesn’t
have the 7z command…
However, I removed the present binding again, rebooted and then I installed the binding
once again. Still, when I try to create a new bridge thing, I don’t find the two fields to be filled
out with the keys from the marketplace (where I already registered).
Is there a chance to find a single .jar file with the new connections, that I can just put into
the addons folder (after removing the present binding)?
Thanks again.

If you are on 3.3-M3 and install the binding through the web-interface you will always get the M3 version.

“Never change a running system” … true, but it is ok to upgrade to M6. If you use the DB Binding you would have to go through the new API process and if you use the Netatmo binding you would have to recreate all things. That`s what I had to do. All in all 1 h effort and it was worth it.

I somehow suspected this…My upgrade to M6 didn`t quite work…
Would you or someone else be so kind and give me a hint, how
to upgrade on a Pi4? From openhabian-config? Or with some nice linux command
on the console? My present M3 is safely stored in an image file…

I am using a Pi 3 B Plus and used openhabian-config to make all upgrades

There are some breaking changes like I Netatmo and Deutsche Bahn, that I had to fix afterwards, but that was easy but tedious

  • with menu entry 41 you switch between stable , testing ( Milestone) , unstable ( Snapshot )
  • with menu entry 02 you do the update of all software packages

On command line you can check the content of files in /etc/apt/sources.list.d/. There must be one file describing which repository to use ( stable, testing, unstable ).
Doing sudo apt-get update will get list of latest available packages.
Doing sudo apt-get upgrade will upgrade all packages.
I would do sudo apt-get -s upgrade before to check which packages will be upgrade.
In case you would like to upgrade a single package and it’s dependencies only then do
sudo apt-get upgrade <packagename>

Thank you so much! The upgrade to M6 went well, as far as I can see it.
The Deutsche Bahn Things doesn’t work as expected because new keys are required :grinning:
However, when I tried to login to DB Marketplace I got the following message:
The website encountered an unexpected error. Please try again later. :astonished: :astonished: :astonished:
But this is not your or our business here in the forum…
I will try later…

Best regards!

1 Like

Finally made it. Deutsche Bahn doesn’t like quick clicks in the web…

Conclusion: Deutsche Bahn will change it’s servers on July 1st 2022.
The clock is ticking for everyone who uses this binding.
The adopted binding can be installed, but you have to upgrade to openhab
3.3. M6
Again thanks for the help!