Closed marecabo closed 4 years ago
HA supports automations, which I believe you should be able to use a REST command https://www.home-assistant.io/integrations/rest_command/
Is there any reason that wouldn't do it?
Home AssistantInstructions on how to integrate REST commands into Home Assistant.
Ah, I should have been clearer, that there are two ways in Firefly how to trigger recurring transactions:
/usr/bin/php /var/www/firefly-iii/artisan firefly-iii:cron
dailyhttp://localhost:3473/cron/run/{{access_token}}
dailyIn the workaround, I was using the latter and I think, using a REST service would just replace the curl command but also not remove the necessity to write some automation outside of the add-on to get these Firefly features to work.
In general, I would prefer to not need an automation in HA, but the add-on to be self-sufficient, so I'd suggest to implement the cron job solution inside the addon. If you are fine with that, I will attempt to implement it, but let me know what you think.
Sorry, I don't think adding the cron option is worth the effort. It will raise issues around configuration (i.e. when to run, and dealing with UTC) and troubleshooting (how to tell its working). I don't see using an automation in HA as a workaround, as the addon can only run on a Home Assistant instance, and it would be far easier for the user to configure the task there.
Thanks for the input though 👍
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.
Problem/Motivation
Certain features of Firefly III (like recurring transactions and automatic budgets) require a daily cron job.
See https://docs.firefly-iii.org/advanced-installation/cron
Expected behavior
It would be great, if this add-on would contain a mechanism to trigger the creation of recurring transactions / rollover of automatic budgets by itself.
Actual behavior
Recurring transactions do not get created on their designated dates. Automatic budgets do not roll over.
Steps to reproduce
Create a recurring transaction and observe it not getting created on its designated day.
External Workaround
Setup the following automation, adapt it whether you use SSL or not
configuration.yaml
automations.yaml
Proposed changes
Would it fit into the add-on architecture to add cron to the add-on with a crontab as proposed in the Firefly III documentation?