Giter Site home page Giter Site logo

gitviola / ynab-bank-importer Goto Github PK

View Code? Open in Web Editor NEW
133.0 12.0 24.0 259 KB

💰 Pull transactions from your bank and import them to YNAB automatically.

Home Page: https://ynab.com/referral/?ref=C-_IP8eD8dWYfEec&utm_source=customer_referral

License: MIT License

Ruby 98.62% Dockerfile 1.38%
ynab importer bank money bbva n26 budget exporter docker fints

ynab-bank-importer's People

Contributors

dependabot[bot] avatar dequis avatar dstengele avatar manuelgrabowski avatar markuspabst avatar mathijshoogland avatar peterjeschke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ynab-bank-importer's Issues

[FEATURE] Detect ATM withdrawals

  • Can choose to enable or disable (disabled by default)
  • Customize name of Cash-Account in settings
  • Detect by category for N26 transactions
  • Detect by memo/description/transfer reason for Figo
  • Detect for BBVA transactions (comes with #9)
  • Setspayee to Transfer : %Cash Account Name% for withdrawal transactions

`entry_date': undefined method `month'

Hi,

I'm trying to run the script locally on Mac (directly in terminal, I have ruby installed).
I'm getting the following error:

/Library/Ruby/Gems/2.3.0/gems/cmxl-0.2.2/lib/cmxl/fields/transaction.rb:63:in `entry_date': undefined method `month' for "190229":String (NoMethodError)
        from /Users/yuvalshaked/yuvdev/ynab-bank-importer/lib/dumper/fints.rb:34:in `date'
        from /Users/yuvalshaked/yuvdev/ynab-bank-importer/lib/dumper.rb:19:in `to_ynab_transaction'
        from /Users/yuvalshaked/yuvdev/ynab-bank-importer/lib/dumper/fints.rb:24:in `block in fetch_transactions'
        from /Users/yuvalshaked/yuvdev/ynab-bank-importer/lib/dumper/fints.rb:24:in `map'
        from /Users/yuvalshaked/yuvdev/ynab-bank-importer/lib/dumper/fints.rb:24:in `fetch_transactions'
        from /Users/yuvalshaked/yuvdev/ynab-bank-importer/lib/account.rb:18:in `fetch_transactions'
        from run.rb:11:in `block in <main>'
        from run.rb:9:in `map'
        from run.rb:9:in `<main>'

My config is:

ynab:
  access_token: "xxxxxxxxxxxxxxxxxxx919237484383ebe0" # Your YNAB access token
  budget_id: "xxxxxxxx-xxxx-xxxxx-xxxxxx-8c90ac86a0e0" # the first hash in the url when you open your budget
  cash_account_id: "xxxxxxxx-xxxxx-xxxxx-xxxxx-57c2e77ecdc9" # if set that it creates transactions
                            # to your cash account if withdrawal is detected
accounts:
  - dumper: :fints
    iban: "DE3210050000xxxxxxxxxxxx" # iban of your account
    ynab_id: "xxxxxxxx-xxxx-xxxx-xxxx-dada1c650246" # last hash in the url when you click on the account in YNAB
    username: "username" # online banking username / alias
    password: "password" # online banking PIN (NOT! the pin of your bank card!)
    fints_blz: "10050000" # Your bank's code / Bankleitzahl
    fints_endpoint: "https://banking-be3.s-fints-pt-be.de/fints30" # more info can be found here: https://github.com/schurig/ynab-bank-importer/wiki/FinTS---HBCI#fints_endpoint
  - dumper: :n26
    iban: # n26 iban
    ynab_id: # last hash in the url when you click on the account in YNAB
    username: # n26 username
    password: # n26 password
    skip_pending_transactions: false # default: false, only imports transactions when they're processed
    set_category: false # default: false, sets the N26 category name as category

Any idea what may be causing this?

Consider using the new YNAB API?

Hi @schurig, I'm a developer at YNAB. This project looks nice! I wanted to let you know we are working on an REST based API which is currently in Early Access stage. I'm hoping you would be interested in joining and evaluating usage of the API for this project. We support creating transactions through the API and will be rolling out an update this week which provides first-class handling for imported transactions. If you're interested, please fill out this quick survey: https://goo.gl/forms/TL87uGCl0tUAayD72 and then we can get in in the Early Access group.

multiple budgets?

Is it possible to configure multiple budgets? So, Budget A with Bank Account 1 and 2, Budget B with Bank Account 3 and 4? Both Budgets belong to the same YNAB Account.

[Improvement] Make usage easier

Goal is to only have these files:

docker-compose.yml
config.yml

and run the script with docker-compose run ruby

  • Build new docker image on every push to master
  • docker-compose.yml file that uses container from registry

[IDEA] Set payee based on memo (for paypal)

Hi,
I am paying a lot with googlepay lately. Because of this most of my transactions are "Paypal".
would it be possible to change this specific payee based on the memo?

PayPal (Europe) S.a.r.l. et Cie., S.C.A.
Bu­chungs­text
PP.2630.PP . DM-Drogerie Markt
, Ihr Einkauf bei DM-Drogerie Markt

would lead to "PP.2630.PP . DM-Drogerie Markt" for example.

After all paypal is never (?) the original payee, but some shop.

thank you all

Better explenation for novices

Hi,

is there any chance you can provide better explenation for novices?
I found your container on docker and installed on my unraid rig.
It seems to pull the entire 555mb container but I have no understanding on how to configure it and where to place the configuration file.
This looks like such a useful piece of software but its such a pitty the intructions are so limited, like assuming eveyone is aleady experienced :(

I've tried to do the RPI instalation and that one also did not worked well :(
any advice?

UTF-8 conversion error

Since a few days, all my imports failed because the importer failed with this exception:

Traceback (most recent call last):
        10: from run.rb:9:in `<main>'
         9: from run.rb:9:in `map'
         8: from run.rb:11:in `block in <main>'
         7: from /home/pi/ynab-bank-importer/lib/account.rb:18:in `fetch_transactions'
         6: from /home/pi/ynab-bank-importer/lib/dumper/fints.rb:24:in `fetch_transactions'
         5: from /home/pi/ynab-bank-importer/lib/dumper/fints.rb:24:in `map'
         4: from /home/pi/ynab-bank-importer/lib/dumper/fints.rb:24:in `block in fetch_transactions'
         3: from /home/pi/ynab-bank-importer/lib/dumper.rb:30:in `to_ynab_transaction'
         2: from /home/pi/ynab-bank-importer/lib/dumper/fints.rb:68:in `import_id'
         1: from /home/pi/ynab-bank-importer/lib/dumper/fints.rb:88:in `transaction_type'
/home/pi/ynab-bank-importer/lib/dumper/fints.rb:88:in `encode': U+CC44 from UTF-8 to ISO-8859-1 (Encoding::UndefinedConversionError)

The U+CC44 seems to be a korean sign:

채 U+CC44 HANGUL SYLLABLE CAE, decimal: 52292, HTML: 채, UTF-8: 0xEC 0xB1 0x84, block: Hangul Syllables, decomposition: U+110E U+1162

I narrowed it down to a single account and I think I know the culprit: one transaction contains an umlaut (in this case ä). There are actually three not-yet-imported transactions, so I can't be certain.

This is an ING "Extra-Konto" for savings, and the three transactions are system-transactions, not normal transactions.

I'm not sure whether fints even allows unicode, so I'm reluctant to just change the code in question.

Suggestion for Wiki

Hello there,
I just tested the script with my Account at Volksbank (Gronau-Ahaus).
It is necessary to use the 'pinTanURL'.

Maybe you want to add this to "Currently tested with:" in the Wiki.

ING transactions show up with wrong year (2019 instead of 2020)

Starting this year, I am seeing several transactions with the wrong year. These are imported from a German ING account.
I don't know if it's a problem with the bank data or this library (the former seems more likely), but I wanted to know if anyone else has seen a similar issue?

Edit: The transactions in question show up twice – once with the correct date and once with the wrong one.

"Wrong line format" error with fints / comdirect

Importer fails with a comdirect fints account:

Traceback (most recent call last):
	15: from /usr/app/run.rb:9:in `<main>'
	14: from /usr/app/run.rb:9:in `map'
	13: from /usr/app/run.rb:11:in `block in <main>'
	12: from /usr/app/lib/account.rb:18:in `fetch_transactions'
	11: from /usr/app/lib/dumper/fints.rb:22:in `fetch_transactions'
	10: from /usr/local/bundle/gems/ruby_fints-0.0.3/lib/fints/client.rb:79:in `get_statement'
	 9: from /usr/local/bundle/gems/ruby_fints-0.0.3/lib/fints/helper.rb:13:in `mt940_to_array'
	 8: from /usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl.rb:41:in `parse'
	 7: from /usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl.rb:41:in `collect'
	 6: from /usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl.rb:41:in `block in parse'
	 5: from /usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl.rb:41:in `new'
	 4: from /usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl/statement.rb:16:in `initialize'
	 3: from /usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl/statement.rb:36:in `parse!'
	 2: from /usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl/statement.rb:36:in `each'
	 1: from /usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl/statement.rb:42:in `block in parse!'
/usr/local/bundle/gems/cmxl-0.2.1/lib/cmxl/field.rb:51:in `parse': Wrong line format: ":              ?249,999?25FLOSSB.V.STORCH-MUL.OPP.R?26A0M430EUR 1,60?27ABR.BETRAG BRUTTO 13,07 EUR?28STEUERABZUG 2,93- EUR?29Ref. 2PF199999999992/4" (Cmxl::Field::LineFormatError)

(sensitive parts overwritten with 9s)

The transaction seems to be this one in the comdirect web interface:

bildschirmfoto 2019-01-09 um 08 35 36

Any help?

New ynab-bank-importer version not getting ING-DiBa "Payee"

Hi,

With the new version (using YNAB access_token), my transactions from ING-DiBa do not have anymore the 'Payee' field as before.

Let me know if I can help you with some logs, or try to debug the code... Unfortunately I'm not seeing anymore the CSV files within the 'export' folder as before to try to provide you with more details.

Also, big thanks for this project!!!

FinTS HBCI: Give field name

Using the wiki/FAQ it is not clear what field the information for the FinTS was needed.
Something like this would have helped:
"The information you look for is in the field pinTanURL" or something like that.

PSD2 with 2FA breaks the cronjob

This is the error message.

/usr/local/lib/ruby/gems/2.4/gems/ruby_fints-0.0.3/lib/fints/dialog.rb:83:in `send_msg': {"9050"=>"Die Nachricht enthält Fehler.", "9075"=>"Starke Kundenauthentifizierung notwendig.", "9800"=>"Dialog abgebrochen", "9340"=>"Auftrag abgelehnt."} (FinTS::DialogError)
   from /usr/local/lib/ruby/gems/2.4/gems/ruby_fints-0.0.3/lib/fints/dialog.rb:67:in `init'
   from /usr/local/lib/ruby/gems/2.4/gems/ruby_fints-0.0.3/lib/fints/client.rb:20:in `get_sepa_accounts'
   from /root/ynab-bank-importer/lib/dumper/fints.rb:21:in `fetch_transactions'
   from /root/ynab-bank-importer/lib/account.rb:18:in `fetch_transactions'
   from run.rb:11:in `block in <main>'
   from run.rb:9:in `map'
   from run.rb:9:in `<main>'

Any idea how to deal with this?

[FEATURE] Transactions between your accounts

  • Notices when the transfer was to any other of your configured accounts
  • Names for each account on YNAB can be configured in the config
  • payee in transaction is set to Transfer : %Account Name% for those transactions

UBS Bank - Switzerland

Great project!

Is there a way to get it to work for UBS Bank in Switzerland? I am using Buxfer right now and that connects to UBS via SaltEdge. However, I would like to move back to Ynab is I could import from UBS.

NoMethodError with ING-DiBa Import

I just added my ING-DiBa account, but received this errormessage:

Traceback (most recent call last):
        9: from /usr/app/run.rb:9:in `<main>'
        8: from /usr/app/run.rb:9:in `map'
        7: from /usr/app/run.rb:11:in `block in <main>'
        6: from /usr/app/lib/account.rb:18:in `fetch_transactions'
        5: from /usr/app/lib/dumper/fints.rb:21:in `fetch_transactions'
        4: from /usr/local/bundle/gems/ruby_fints-0.0.3/lib/fints/client.rb:19:in `get_sepa_accounts'
        3: from /usr/local/bundle/gems/ruby_fints-0.0.3/lib/fints/dialog.rb:28:in `sync'
        2: from /usr/local/bundle/gems/ruby_fints-0.0.3/lib/fints/dialog.rb:28:in `new'
        1: from /usr/local/bundle/gems/ruby_fints-0.0.3/lib/fints/segment/hkidn.rb:7:in `initialize'
/usr/local/bundle/gems/ruby_fints-0.0.3/lib/fints/helper.rb:4:in `fints_escape': undefined method `gsub' for <myUsername>:Integer (NoMethodError)

Note that I redacted my username from the logs. The config, but can't find a mistake.

Encoding::UndefinedConversionError

Hello,

I get an error for my fints account (n26 is working fine).

This is my config.yml

ynab:
access_token: "d1e******"
budget_id: "4fe******"
accounts:
- dumper: :n26
iban: "DE2******"
ynab_id: "adb******"
username: "******"
password: "******"
- dumper: :fints
iban: "DE2*****"
ynab_id: "65f******"
username: "4******"
password: "******"
fints_blz: "17054040"
fints_endpoint: "https://banking-bb6.s-fints-pt-bb.de/fints30"

And this is the Error Message I‘m getting.

docker-compose run --rm importer
Traceback (most recent call last):        8: from /usr/app/run.rb:9:in `<main>'
        7: from /usr/app/run.rb:9:in `map'
        6: from /usr/app/run.rb:11:in `block in <main>'
        5: from /usr/app/lib/account.rb:18:in `fetch_transactions'
        4: from /usr/app/lib/dumper/fints.rb:22:in `fetch_transactions'
        3: from /usr/local/bundle/gems/ruby_fints-0.0.3/lib/fints/client.rb:79:in `get_statement'
        2: from /usr/local/bundle/gems/ruby_fints-0.0.3/lib/fints/helper.rb:13:in `mt940_to_array'
        1: from /usr/local/bundle/gems/cmxl-0.2.2/lib/cmxl.rb:36:in `parse'
/usr/local/bundle/gems/cmxl-0.2.2/lib/cmxl.rb:36:in `encode!': "\x84" from TIS-620 to UTF-8 (Encoding::UndefinedConversionError)

I hope you can help me out.

Kind regards,
Dennis

Undefined method map

C:\Users\erikb\docker>docker-compose pull importer && docker-compose run --rm importer
Pulling importer ... done
Traceback (most recent call last):
/usr/app/run.rb:9:in <main>': undefined method map' for nil:NilClass (NoMethodError)

Completely different bank setup

Forgive me, I'm a newb to all this.

I'd like to experiment with getting my bank here in Estonia working with this. Is this project something that would theoretically work? There's a developer site https://sebgroup.com/developer but I'm just wondering whether this script is theoretically adaptable to any bank's API?

Net::OpenTimeout

While following your docker setup instructions and using Docker for Mac, I am running into a Net::OpenTimeout issue. Never used Docker before, so I would highly appreciate some help getting this great tool running.

/usr/local/lib/ruby/2.5.0/net/http.rb:937:in `initialize': execution expired (Net::OpenTimeout)

Thank you!

NoMethodError with FINTS (Deutsche Bank)

Love the project, have been using it for a few months. I use the FINTS importer. About 7 days ago, my import (I run it nightly via cron with docker-compose run) stopped importing. Not sure if it is related to Merge #57 or Merge #56 but this is the traceback I get now after updating everything (git repo, docker image, etc):

Traceback (most recent call last):
7: from /usr/app/run.rb:9:in <main>' 6: from /usr/app/run.rb:9:in map'
5: from /usr/app/run.rb:11:in block in <main>' 4: from /usr/app/lib/account.rb:18:in fetch_transactions'
3: from /usr/app/lib/dumper/fints.rb:24:in fetch_transactions' 2: from /usr/app/lib/dumper/fints.rb:24:in map'
1: from /usr/app/lib/dumper/fints.rb:24:in block in fetch_transactions' /usr/app/lib/dumper.rb:19:in to_ynab_transaction': undefined method `>' for nil:NilClass (NoMethodError)

N26 import failes with Bad Request (YNAB::ApiError)

Hey @schurig,

I recently found your great work and I wanted to try it out.
Unfortunately, it is failing for my N26 account.

I have set up all the required fields in config.yml for the N26 dumper like this:

accounts:
  - dumper: :n26
    iban: 'myn26iban' # n26 iban
    ynab_id: 'my_ynab_id' # last hash in the url when you click on the account in YNAB
    username: '[email protected]' # n26 username
    password: 'my$pecialP4ssw0rd' # n26 password
    set_category: false # default: false, sets the N26 category name as category

When I execute the docker image I'm getting the following error:

$ docker-compose run importer
Traceback (most recent call last):
	3: from /usr/app/run.rb:21:in `<main>'
	2: from /usr/local/bundle/gems/ynab-1.2.0/lib/ynab/api/transactions_api.rb:29:in `bulk_create_transactions'
	1: from /usr/local/bundle/gems/ynab-1.2.0/lib/ynab/api/transactions_api.rb:68:in `bulk_create_transactions_with_http_info'
/usr/local/bundle/gems/ynab-1.2.0/lib/ynab/api_client.rb:68:in `call_api': Bad Request (YNAB::ApiError)
$

I'm completely new to Ruby, so cannot say a lot about the code. I have tested the API with my credentials using Postman and it is working. Apparently, the code is failing during the creation of the transactions.

Is N26 currently working for you?

It is working fine with my DKB account.

Thanks a lot!
Moritz

endpoint for targobank?

Hi there,

I'm hitting my head against the wall on this one, trying to find the fints endpoint for Targobank (BLZ 30020900)... I think Targo only introduced it recently, so maybe that's why it's nowhere to be found. Would appreciate any help on this one :)

side note : isn't the whole point of HBCI to open up banking?? but then those endpoints are some kind of a secret, I don't quite understand it... ;-)

[FEATURE] Docker on raspberry pi

Project mission:

A script that can run every 15 minutes on a small and cheap mini-computer at your home (eg. raspberry pi) with an easy configuration and support for most European banks.


To resolve the text in bold the following tasks are needed:

  • automatically build an docker-image for the raspberry pi
  • write documentation on how to set it up (link to docker setup and cronjob)
  • alternative setup without docker (plain ruby with cronjob which is already working)

Duplicate transactions are not imported

Hi there,

First of all, thank you for this project, I have been looking for this for a while! I have everything up and running using the fints importer (ING DiBA), and have noticed that when I have 2 transactions from the same vendor, with the same monetary value, that only one will be imported.

I'm more than happy to jump into the code if you can give me some direction.

Thanks!

N26 importer creates duplicate entries

I still couldn't pinpoint the exact source for this problem, but maybe someone more insight into this issue. Sometimes, the n26 importer creates duplicate transactions of already existing transactions. At first, only one transaction is shown (that is correct) but after running the importer a few times, a second transaction is created. This happens frequently with relatively recent transactions, but a few days ago, it happened with transactions that were three months old. It doesn't happen with every transaction either.

My hunch is that n26 changes the payee and memo fields, but I couldn't pinpoint it exactly. I have attached one instance of the duplicated transation:

image

Undefined method `categories'

I just tried the importer and wanted to import my n26 data into ynab. I installed docker, configured it and run it. But instead of importing my data, it threw an exception:

Traceback (most recent call last):
        5: from /usr/app/run.rb:9:in `<main>'
        4: from /usr/app/run.rb:9:in `map'
        3: from /usr/app/run.rb:11:in `block in <main>'
        2: from /usr/app/lib/account.rb:18:in `fetch_transactions'
        1: from /usr/app/lib/dumper/n26.rb:25:in `fetch_transactions'
/usr/local/bundle/gems/httparty-0.16.0/lib/httparty/response.rb:101:in `method_missing': undefined method `categories' for #<HTTParty::Response:0x00005622236033f8> (NoMethodError)

Problem with Sparkasse and FinTS

Hello,

first of all: amazing project! Been using it for months now with my ING account.

I ran into some troubles with a Sparkasse bank account though.

accounts:
  - dumper: :fints
    iban: 'DE543305000xxxxxx'
    ynab_id: 'xxxxx'
    ynab_name: 'Sparkasse'
    username: '15xxxxxxxx' # my login number that I also use for the browser-login
    password: 'xxxxxxx'
    fints_endpoint: 'https://banking-rl3.s-fints-pt-rl.de/fints30'
    fints_blz: '33050000'
�[1mTraceback�[m (most recent call last): 
7: from /usr/app/run.rb:9:in `<main>' 
6: from /usr/app/run.rb:9:in `map' 
5: from /usr/app/run.rb:11:in `block in <main>' 
4: from /usr/app/lib/account.rb:18:in `fetch_transactions' 
3: from /usr/app/lib/dumper/fints.rb:21:in `fetch_transactions' 
2: from /usr/local/bundle/gems/ruby_fints-0.0.3/lib/fints/client.rb:19:in `get_sepa_accounts' 
1: from /usr/local/bundle/gems/ruby_fints-0.0.3/lib/fints/dialog.rb:39:in `sync' /usr/local/bundle/gems/ruby_fints-0.0.3/lib/fints/dialog.rb:83:in `send_msg': �[1m{"9050"=>"Die Nachricht enthält Fehler.", "9800"=>"Dialog abgebrochen", "9010"=>"Initialisierung fehlgeschlagen, Auftrag nicht bearbeitet."} (�[1;4mFinTS::DialogError�[m�[1m)�[m

I've double checked the crendentials and they seem to be correct. Can you spot anything I'm doing wrong?

"Automate it" - small typo in cron command

I have just set up the importer and noticed a small typo in the cron command described in the Wiki. It says cd /home/youruser/.ynab-bank-importer && /usr/local/bin/docker-compose run --rm importer | mail -s "YNAB importer failed" [email protected].

Based on the mail subject line i see that the mail should be sent when the importer fails. But currently it is sent everytime, since the output of the docker-compose command (which is none) is just piped into the mail command. You shold fix it and write a double-pipe instead which is evaluated as an OR. After that the command is evaluated like it should: Execute docker-command until success OR write a mail to notify the user.

Special Characters in password

I have a "!" at the beginnung of my password so I am getting:

Traceback (most recent call last):
8: from /usr/app/run.rb:9:in <main>' 7: from /usr/app/lib/settings.rb:8:in all'
6: from /usr/local/lib/ruby/2.5.0/psych.rb:497:in load_file' 5: from /usr/local/lib/ruby/2.5.0/psych.rb:497:in open'
4: from /usr/local/lib/ruby/2.5.0/psych.rb:498:in block in load_file' 3: from /usr/local/lib/ruby/2.5.0/psych.rb:263:in load'
2: from /usr/local/lib/ruby/2.5.0/psych.rb:350:in parse' 1: from /usr/local/lib/ruby/2.5.0/psych.rb:402:in parse_stream'
/usr/local/lib/ruby/2.5.0/psych.rb:402:in `parse': (./config.yml): did not find expected tag URI while parsing a tag at line 11 column 15 (Psych::SyntaxError)

How do I escape my password?

Duplicate Transactions (N26 and DKB)

I always get 2 transactions for every transaction. The second one comes one or two days after the first one. This is very confusing as YNAB does not seem to detect the duplicates and I get two transactions and need to delete one of them manually.

Is there a workaorund for the issue? Thank you!
This is such a good project that really helps me with my budget! :)

N26 transaction types

I just wanted to give you some more information on what I found out about the transaction type: Credit card authorizations are tagged with AA and returned authorizations are tagged AV.

I've had this when adding a credit card to iTunes. There was a 1 Euro AA charge and shortly after a 1 Euro AV refund. Those types don't ever change in this case, I think only authorizations that get converted to charges will change the type.

It might make sense to ignore AV transactions also. Your list of transactions won't match, but there's always a refund to an authorization, so the amounts stay the same.

Connection refused http.rb:939:in

I installed everything needed to run on an Ubuntu 18.04 LTS container.

I used this command for all the tools needed:
sudo apt install git autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev ruby-all-dev libcurl4-openssl-dev ruby-bundler -y

Then I installed Ruby and everything else using this set of commands:
git clone https://github.com/rbenv/rbenv.git ~/.rbenv; echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc; echo 'eval "$(rbenv init -)"' >> ~/.bashrc; source ~/.bashrc; type rbenv; git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build; rbenv install 2.5.0;

Then I cloned the git files, did the bundle install and created this config:

---
ynab:
  access_token: "bc69ca9******"
  budget_id: "998*****"
  cash_account_id: # (optional)
accounts:
  - dumper: :fints
    iban: "DE28*****"
    ynab_id: "20*****"
    fints_endpoint: "banking-by7.s-fints-pt-by.de"
    fints_blz: "79****"
    username: "04******"
    password: "f*****"

When I do ruby run.rb, I get this error:

> Traceback (most recent call last):
	20: from run.rb:9:in `<main>'
	19: from run.rb:9:in `map'
	18: from run.rb:11:in `block in <main>'
	17: from /home/linux/ynab-bank-importer/lib/account.rb:18:in `fetch_transactions'
	16: from /home/linux/ynab-bank-importer/lib/dumper/fints.rb:21:in `fetch_transactions'
	15: from /var/lib/gems/2.5.0/gems/ruby_fints-0.0.3/lib/fints/client.rb:19:in `get_sepa_accounts'
	14: from /var/lib/gems/2.5.0/gems/ruby_fints-0.0.3/lib/fints/dialog.rb:39:in `sync'
	13: from /var/lib/gems/2.5.0/gems/ruby_fints-0.0.3/lib/fints/dialog.rb:81:in `send_msg'
	12: from /var/lib/gems/2.5.0/gems/ruby_fints-0.0.3/lib/fints/https_connection.rb:11:in `send_msg'
	11: from /var/lib/gems/2.5.0/gems/httparty-0.16.3/lib/httparty.rb:624:in `post'
	10: from /var/lib/gems/2.5.0/gems/httparty-0.16.3/lib/httparty.rb:507:in `post'
	 9: from /var/lib/gems/2.5.0/gems/httparty-0.16.3/lib/httparty.rb:573:in `perform_request'
	 8: from /var/lib/gems/2.5.0/gems/httparty-0.16.3/lib/httparty/request.rb:145:in `perform'
	 7: from /usr/lib/ruby/2.5.0/net/http.rb:1455:in `request'
	 6: from /usr/lib/ruby/2.5.0/net/http.rb:909:in `start'
	 5: from /usr/lib/ruby/2.5.0/net/http.rb:920:in `do_start'
	 4: from /usr/lib/ruby/2.5.0/net/http.rb:935:in `connect'
	 3: from /usr/lib/ruby/2.5.0/timeout.rb:103:in `timeout'
	 2: from /usr/lib/ruby/2.5.0/timeout.rb:93:in `block in timeout'
	 1: from /usr/lib/ruby/2.5.0/net/http.rb:936:in `block in connect'
/usr/lib/ruby/2.5.0/net/http.rb:939:in `rescue in block in connect': Failed to open TCP connection to :80 (Connection refused - connect(2) for nil port 80) (Errno::ECONNREFUSED)

I dont know what this Error means, If you need more information, please let me know. Maybe this error occur, because I do not use it on rasbian, but on ubuntu instead. I also use a pihole in my network, it would be possible, that it blocks something of the script, idk. I am not a programmer nor a linux expert, so please be patient. If I get this working, I can provide the complete install manual so others can install it on ubuntu too.

FinTS dumper without IBAN (e.g. credit cards)

Hi @schurig,

I'm currently evaluating your ynab importer.
I was wondering if it is possible to also fetch transactions from credit cards account (e.g. from DKB)?
As far as I understand they are identified by IBAN, but the credit card accounts do not have a IBAN, only a account number.

Am I correct that this scenario is currently not implemented?

FinTS::DialogError with ING-DiBa Account

Hi!

I've been successfully using this for syncing an N26 account to my YNAB for a few months, thanks so much for that convenience ❤️

On trying to add an ING-DiBa account however I'm running into the following issue:

Traceback (most recent call last):
	7: from /usr/app/run.rb:9:in `<main>'
	6: from /usr/app/run.rb:9:in `map'
	5: from /usr/app/run.rb:11:in `block in <main>'
	4: from /usr/app/lib/account.rb:18:in `fetch_transactions'
	3: from /usr/app/lib/dumper/fints.rb:21:in `fetch_transactions'
	2: from /usr/local/bundle/gems/ruby_fints-0.0.3/lib/fints/client.rb:19:in `get_sepa_accounts'
	1: from /usr/local/bundle/gems/ruby_fints-0.0.3/lib/fints/dialog.rb:39:in `sync'
/usr/local/bundle/gems/ruby_fints-0.0.3/lib/fints/dialog.rb:83:in `send_msg': {"9800"=>"Der Dialog wurde abgebrochen.", "9010"=>"Ungültiger Signaturaufbau?: Fehler im Segmentaufbau."} (FinTS::DialogError)

I'm using the correct IBAN, FinTS Endpoint (https://fints.ing-diba.de/fints/), FinTS BLZ (50010517) and my username and password which I use to authenticate to ING-DiBa's online banking. Everything's quoted as well to be parsed as a string from the yaml config.

Any idea what could be going wrong here?

Thanks!

Error with comdirect

Hi,

the current version works fine with my Sparkasse account but I can't access my comdirect account. I'm getting this error:

docker-compose run importer
Traceback (most recent call last):
9: from /usr/app/run.rb:9:in <main>' 8: from /usr/app/run.rb:9:in map'
7: from /usr/app/run.rb:11:in block in <main>' 6: from /usr/app/lib/account.rb:18:in fetch_transactions'
5: from /usr/app/lib/dumper/fints.rb:24:in fetch_transactions' 4: from /usr/app/lib/dumper/fints.rb:24:in map'
3: from /usr/app/lib/dumper/fints.rb:24:in block in fetch_transactions' 2: from /usr/app/lib/dumper.rb:30:in to_ynab_transaction'
1: from /usr/app/lib/dumper/fints.rb:68:in import_id' /usr/app/lib/dumper/fints.rb:85:in transaction_type': undefined method `encode' for nil:NilClass (NoMethodError)

This is my config:

inaccurate payee_name for Sparkasse transactions (fints dumper)

Hi,

It seems that for many transactions I a get a generic payee called Landesbank Hessen-Thuringen.
If I look more closely at the transactions, I can find the actual name of the business in a different position on the source string, so that if I change these rows in fints.rb:

def payee_name(transaction)
  parse_transaction_at(32, transaction).try(:strip)
end

To this:

def payee_name(transaction)
  name = parse_transaction_at(32, transaction).try(:strip)
  return name unless name.include? "Landesbank Hessen-Thuringen"
  parse_transaction_at(22, transaction).try(:strip).split("+").last
end

I get a much nicer output. Did anyone else encounter this? Is there a better way to find out where the payee is located in the source string?

Unhelpful memo with fints

With my Sparkasse account, the memo field get filled with (to me) unrecognizable data like:
EREF+123456789012 PP.1234.

The actual memo (that e.g. MoneyMoney shows) in that case was:
PP.1234PP . Cinemaxx, Ihr Einkauf bei Cinemaxx

Which is a lot more helpful. Any chance to have the second value instead?

Can not authenticate with n26 api

 pi@raspberrypi:~/ynab-bank-importer $ sudo docker-compose run importer
/usr/local/lib/ruby/2.4.0/net/http.rb:906:in `rescue in block in connect': Failed to open TCP connection to api.tech26.de:443 (getaddrinfo: Nameor service not known) (SocketError)
        from /usr/local/lib/ruby/2.4.0/net/http.rb:903:in `block in connect'
        from /usr/local/lib/ruby/2.4.0/timeout.rb:93:in `block in timeout'
        from /usr/local/lib/ruby/2.4.0/timeout.rb:103:in `timeout'
        from /usr/local/lib/ruby/2.4.0/net/http.rb:902:in `connect'
        from /usr/local/lib/ruby/2.4.0/net/http.rb:887:in `do_start'
        from /usr/local/lib/ruby/2.4.0/net/http.rb:876:in `start'
        from /usr/local/lib/ruby/2.4.0/net/http.rb:1407:in `request'
        from /usr/local/bundle/gems/httparty-0.16.3/lib/httparty/request.rb:145:in `perform'
        from /usr/local/bundle/gems/httparty-0.16.3/lib/httparty.rb:573:in `perform_request'
        from /usr/local/bundle/gems/httparty-0.16.3/lib/httparty.rb:507:in `post'
        from /usr/local/bundle/gems/twentysix-0.1.1/lib/twentysix/core.rb:9:in `authenticate'
        from /usr/app/lib/dumper/n26.rb:26:in `fetch_transactions'
        from /usr/app/lib/account.rb:18:in `fetch_transactions'
        from /usr/app/run.rb:11:in `block in <main>'
        from /usr/app/run.rb:9:in `map'
        from /usr/app/run.rb:9:in `<main>'

I am running the importer on my raspberry pi with docker-compose. At some point some two weeks ago, the import process just stopped working. I have not changed the password and I have confirmed that the correct password is set in the config.

I have also confirmed that I can connect to the api.tech26.de:443:

pi@raspberrypi:~/ynab-bank-importer $ curl https://api.tech26.de
{"error":"unauthorized","error_description":"Full authentication is required to access this resource"}

Does anyone else experience similar problems?
Did something on the n26 api change?
Not being to authenticate anymore , even though it worked before and nothing changed on my side of the authentication is somewhat confusing.

How can I help with debugging?

Unclear about cash_account_id

I am a little unsure about the cash_account_id. I understand the documentation that it defines the actual cash account, so when it detects a transfer to cash on my main account, it will automatically create a "transfer to cash" action in YNAB.

But if i have multiple accounts on different banks in the same budget (type "Checking), and only one cash account (type "Cash"), why should i specify the cash_account_id? And how will the script detect which account in YNAB it is linked to? Or is the name "cash" misleading and you are not referring to actual cash, like coins and notes, but to the account the script should import to?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.