wesselt / bunq2ynab

Upload bunq transactions to ynab
Other
75 stars 20 forks source link

unable to start autosync #10

Closed beninhos closed 5 years ago

beninhos commented 5 years ago

beninho@jaguar:/pool/data/app/bunq2ynab$ python3 auto_sync.py "name" Rname "My Budget" "Bunq" Getting BUNQ identifiers... Deleting file session_token.txt... Requesting session token... Getting YNAB identifiers... Registering callback for port 44716... Could not load miniupnpc module. Skipping upnp forward. Adding BUNQ callback to: https://remoteip:44716/bunq2ynab-autosync Removing old callback... Listening on port 44716...

miniupnpc wont start. So I installed it on my system. did not work. Did open a port on 44716:44716 on my router. But still gives me the above output.

What do I forget here?

wesselt commented 5 years ago

The message means miniupnpc isn't found. Did you install it with pip3 install miniupnpc ?

The function of UPNP is to configure a port forward on your router, so if you can do that yourself, the message is not a problem.

You can test if it works by "curl https://remoteip:44716/bunq2ynab-autosync" (replace remoteip with the actual IP address.) Or you can create two test accounts in bunq and sent 0,01 euro between them.

Would be glad to hear how far this gets you.

beninhos commented 5 years ago

Thanks. I installed it with apt. Now with pip3. We're getting a step further. It still hangs on the same line, but now without the error of upnp not starting.

-- after 5 minutes. It starting working. The test failed. But that was probably because i was running the real job in a different terminal window.

Now the next item.

  1. I have multiple accounts. Do I need to open ports on my router every account? the miniupnpc does not do this, and I have upnp enabled on my router. And run the same command again for every account? Or can it be combined, so i checks multiple accounts in the same run?

  2. How can I make this run in de background? Like when rebooting the system?

Thanks!

wesselt commented 5 years ago
  1. Yeah, you'd need to start one instance for each account
  2. There's many ways to run a Linux job in the background:
    • An easy and cool one is "GNU screen" or "tmux". Those are tools that keep sessions running and allow you to reconnect later.
    • You can run nohup myscript.sh & to start a job in the background (https://www.cyberciti.biz/faq/linux-execute-cron-job-after-system-reboot/)
    • You can start a script at boot time with a cron line like @reboot bash /home/myaccount/myscript.sh >> /home/myaccount/myfile.log

If you post the output for a run with miniupnpc enabled, I can have a look at it.

beninhos commented 5 years ago

Thanks! I’ll look that up! I noticed that it stops running after 24h is that normal behaviour? On 5 Jan 2019, 14:42 +0100, wesselt notifications@github.com, wrote:

  1. Yeah, you'd need to start one instance for each account
  2. There's many ways to run a Linux job in the background:

• An easy and cool one is "GNU screen" or "tmux". Those are tools that keep sessions running and allow you to reconnect later. • You can run nohup myscript.sh & to start a job in the background • You can start a script at boot time with a cron line like @reboot bash /home/myaccount/myscript.sh >> /home/myaccount/myfile.log

If you post the output for a run with miniupnpc enabled, I can have a look at it. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

wesselt commented 5 years ago

It should not stop after any amount of time. Mine runs until I reboot the server.