Error with FinTS sensor

I’m pretty sure, all attributes and login credentials are correctly configured. I copied & pasted the bank identification number and URL directly from the online banking portal to HA. While trying to get this running I even changed my online banking username and PIN to avoid special characters and umlauts.

But my FinTS sensor still doesn’t work and throws an error on startup:

    2018-07-01 22:12:18 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform fints
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/sensor/fints.py", line 70, in setup_platform
    balance_accounts, holdings_accounts = client.detect_accounts()
  File "/usr/src/app/homeassistant/components/sensor/fints.py", line 133, in detect_accounts
    for account in self.client.get_sepa_accounts():
  File "/usr/local/lib/python3.6/site-packages/fints/client.py", line 33, in get_sepa_accounts
    dialog.sync()
  File "/usr/local/lib/python3.6/site-packages/fints/dialog.py", line 41, in sync
    resp = self.send(msg_sync)
  File "/usr/local/lib/python3.6/site-packages/fints/dialog.py", line 99, in send
    raise FinTSDialogError(resp.get_summary_by_segment('HIRMG'))
fints.dialog.FinTSDialogError: {'9050': 'Die Nachricht enthält Fehler.', '9800': 'Dialog abgebrochen', '9010': 'Zugriff auf BPD nicht möglich.'}

This is my (of course obfuscated) sensor configuration:

  - platform: fints
    bank_identification_number: 1234567890123456
    username: john.doe
    pin: MyP1N
    url: https://banking-dkb.s-fints-pt-dkb.de/fints30
    accounts:
      - account: 'DE98765432109876543210'

Is there anyone with a working FinTS sensor? Preferably with a german DKB account?

As I’m still stuck with this error and don’t think, it’s a config problem on my side, I opened an Github issue for it:

https://github.com/home-assistant/home-assistant/issues/15615

Use the “LegitimationsID” instead of the username… :slight_smile: It works!
https://www.linuxwiki.de/OpenHBCI/GetesteteBanken/DKB

Thanks for your help @tyborall. It’s indeed working when using the “LegitimationsID” for the username attribute.

Actually I must have overlooked the ‘in most cases the “Bankleitzahl”’ comment in the docs for the bank_identification_number as well, as I always used the LegitimationsID there. Thus, it never came to my mind, that I’d have to use this ID for the username instead of my online banking login username.

But I’m still curious, if this sensor is still supported by it’s author or if it’s abandoned. Nobody ever replied to the github issue, despite this problem would’ve been easy solvable, because PEBKAC…

Update from my side: I’m not using this sensor anymore as it made to much trouble. There where strange error messages from time to time and I didn’t want to lock my bank accounts out, so I decided to not use it anymore…