Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ [REQUEST] Firefly III Data Importer - Update minutely #917

Closed
2 tasks done
GNeras opened this issue Jul 24, 2023 · 1 comment
Closed
2 tasks done

✨ [REQUEST] Firefly III Data Importer - Update minutely #917

GNeras opened this issue Jul 24, 2023 · 1 comment
Labels
enhancement New feature or request prevent stale Prevents stale being applied

Comments

@GNeras
Copy link

GNeras commented Jul 24, 2023

Checked

  • If a new addon, I have checked on Google that such as addon doesn't already exists
  • If a new feature, I have searched in the discussions & issues that it was not already covered

Which addon?

Firefly III Data Importer

Is your feature request related to a problem? Please describe

My import method is capable of providing transaction data in close to real time, but the fastest update frequency is hourly. It would be useful to have the data available in Firefly III soon after the transaction, so if I need to add any extra details to it, I can do it before I forget about it.

Describe the solution you'd like

If it's possible, add a minutely option for Updates in the add-on configuration.

@GNeras GNeras added enhancement New feature or request prevent stale Prevents stale being applied labels Jul 24, 2023
@GNeras
Copy link
Author

GNeras commented Aug 2, 2023

I found another way to do this by triggering the update from Home Assistant, so I will close this.

In case someone is interested, here's what I did.

I enabled the autoimport REST API endpoint by adding these variables to the config file for this add-on (by default /config/addons_config/fireflyiii_data_importer/config.yaml):

# the secret is required and must be at least 16 characters long
AUTO_IMPORT_SECRET: SOME_SECRET_HERE

# if this value is not set to true, you cannot import a local directory
CAN_POST_AUTOIMPORT: true

Restart the add-on and now you can send a post request to this url to import the files from /config/addons_config/fireflyiii_data_importer/import_files.

http://[HA-IP]:3474/autoimport?directory=/config/addons_config/fireflyiii_data_importer/import_files&secret=SOME_SECRET_HERE

You can do this from Home Assistant, for example by creating a RESTful Command in configuration.yaml:

rest_command:
  firefly_import:
    url: "http://127.0.0.1:3474/autoimport?directory=/config/addons_config/fireflyiii_data_importer/import_files&secret=SOME_SECRET_HERE"
    method: post
    timeout: 50

This creates a service rest_command.firefly_import that you can call from any automation/script/etc.

@GNeras GNeras closed this as completed Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request prevent stale Prevents stale being applied
Projects
None yet
Development

No branches or pull requests

1 participant