add home assistant notif to downloads
Some checks failed
/ run ansible (push) Has been cancelled

This commit is contained in:
Gabriel Augendre 2024-12-08 18:40:36 +01:00
parent 8f4fda2020
commit e0a7e6d9c8
7 changed files with 42 additions and 11 deletions

View file

@ -67,6 +67,13 @@
3466633264626636620a613634653933333332386365393639343030616234376537373635343237 3466633264626636620a613634653933333332386365393639343030616234376537373635343237
37373364303732343264623239353837613435363363393862383765376435376166343237333664 37373364303732343264623239353837613435363363393862383765376435376166343237333664
3330623266383462666564376166373032393361653234633863 3330623266383462666564376166373032393361653234633863
downloader_home_assistant_hook_id: !vault |
$ANSIBLE_VAULT;1.1;AES256
38376539353731316230663461653764633138313465353132386230623864356637356465366434
6466376364643632636538356466353261396235386564300a653831326230623761663433303632
64633537343931623430616132656234613661366166366265396566333435643338303731303463
3662343165343261640a336564313161326364396435366666653838383766383961366463346137
64383235343132393566356266643936386235326337393236623635313537616539
downloader_freebox_username: !vault | downloader_freebox_username: !vault |
$ANSIBLE_VAULT;1.1;AES256 $ANSIBLE_VAULT;1.1;AES256
33636161363132333137313536613165393466303436306130376264383834663439346366383765 33636161363132333137313536613165393466303436306130376264383834663439346366383765

View file

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
set -euo pipefail set -uo pipefail
pushd /mnt/data/paperless-ngx pushd /mnt/data/paperless-ngx || exit 1
./downloader eau-du-grand-lyon -o consume -u '{{downloader_eau_lyon_username}}' -p '{{downloader_eau_lyon_password}}' --headless ./downloader eau-du-grand-lyon -o consume -u '{{downloader_eau_lyon_username}}' -p '{{downloader_eau_lyon_password}}' --headless
status=$?
curl -X PUT -d 'source=eau-du-grand-lyon' "https://hass.augendre.info/api/webhook/{{ downloader_home_assistant_hook_id }}"
exit $status

View file

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
set -euo pipefail set -uo pipefail
pushd /mnt/data/paperless-ngx pushd /mnt/data/paperless-ngx || exit 1
./downloader free-mobile -o consume -u '{{downloader_free_mobile_username}}' -p '{{downloader_free_mobile_password}}' --headless --no-interaction ./downloader free-mobile -o consume -u '{{downloader_free_mobile_username}}' -p '{{downloader_free_mobile_password}}' --headless --no-interaction
status=$?
curl -X PUT -d 'source=free-mobile' "https://hass.augendre.info/api/webhook/{{ downloader_home_assistant_hook_id }}"
exit $status

View file

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
set -euo pipefail set -uo pipefail
pushd /mnt/data/paperless-ngx pushd /mnt/data/paperless-ngx || exit 1
./downloader freebox -o consume -u '{{downloader_freebox_username}}' -p '{{downloader_freebox_password}}' --headless ./downloader freebox -o consume -u '{{downloader_freebox_username}}' -p '{{downloader_freebox_password}}' --headless
status=$?
curl -X PUT -d 'source=freebox' "https://hass.augendre.info/api/webhook/{{ downloader_home_assistant_hook_id }}"
exit $status

View file

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
set -euo pipefail set -euo pipefail
pushd /mnt/data/paperless-ngx pushd /mnt/data/paperless-ngx || exit 1
./downloader lcl-checking -o consume -u '{{downloader_lcl_username}}' -p '{{downloader_lcl_password}}' --headless ./downloader lcl-checking -o consume -u '{{downloader_lcl_username}}' -p '{{downloader_lcl_password}}' --headless
status=$?
curl -X PUT -d 'source=lcl-checking' "https://hass.augendre.info/api/webhook/{{ downloader_home_assistant_hook_id }}"
exit $status

View file

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
set -euo pipefail set -uo pipefail
pushd /mnt/data/paperless-ngx pushd /mnt/data/paperless-ngx || exit 1
./downloader octopus-energy-address -o consume -u '{{downloader_octopus_username}}' -p '{{downloader_octopus_password}}' --headless ./downloader octopus-energy-address -o consume -u '{{downloader_octopus_username}}' -p '{{downloader_octopus_password}}' --headless
status=$?
curl -X PUT -d 'source=octopus-energy-address' "https://hass.augendre.info/api/webhook/{{ downloader_home_assistant_hook_id }}"
exit $status

View file

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
set -euo pipefail set -uo pipefail
pushd /mnt/data/paperless-ngx pushd /mnt/data/paperless-ngx || exit 1
./downloader shiva -o consume -u '{{downloader_shiva_username}}' -p '{{downloader_shiva_password}}' --headless ./downloader shiva -o consume -u '{{downloader_shiva_username}}' -p '{{downloader_shiva_password}}' --headless
status=$?
curl -X PUT -d 'source=shiva' "https://hass.augendre.info/api/webhook/{{ downloader_home_assistant_hook_id }}"
exit $status