NOTIFICATION_COMMAND_START is not executed on start #976
Answered
by
marcone
eigenphase
asked this question in
Q&A
Replies: 2 comments 2 replies
-
|
You may need to double // for every / to be correctly interpreted. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Looks like you used NOTIFICATION_COMMAND_ENABLE instead of
NOTIFICATION_COMMAND_ENABLED
…On Mon, Jun 30, 2025, 20:09 segdy ***@***.***> wrote:
Thank you!
I started to look in the code but I don't see a reason why.
This is the last part of send-push-message:
function send_shell () {
log "Sending Shell command."
if [[ -n "$NOTIFICATION_COMMAND_START" && "$type" = "start" ]]; then
eval "$NOTIFICATION_COMMAND_START" &
fi
if [[ -n "$NOTIFICATION_COMMAND_FINISH" && "$type" = "finish" ]]; then
eval "$NOTIFICATION_COMMAND_FINISH" &
fi
}
log "$message"
[ "${SIGNAL_ENABLED:-false}" = "true" ] && send_signal
[ "${PUSHOVER_ENABLED:-false}" = "true" ] && send_pushover
[ "${GOTIFY_ENABLED:-false}" = "true" ] && send_gotify
[ "${DISCORD_ENABLED:-false}" = "true" ] && send_discord
[ "${IFTTT_ENABLED:-false}" = "true" ] && send_ifttt
[ "${SNS_ENABLED:-false}" = "true" ] && send_sns
[ "${WEBHOOK_ENABLED:-false}" = "true" ] && send_webhook
[ "${TELEGRAM_ENABLED:-false}" = "true" ] && send_telegram
[ "${MATRIX_ENABLED:-false}" = "true" ] && send_matrix
[ "${SLACK_ENABLED:-false}" = "true" ] && send_slack
[ "${NOTIFICATION_COMMAND_ENABLED:-false}" = "true" ] && send_shell
exit 0
Note the "log" commands.
This is in my log file:
Mon 30 Jun 16:29:38 PDT 2025: Starting recording archiving
Mon 30 Jun 16:29:38 PDT 2025: Archiving 224 file(s) including 4 event folder(s) starting at Mon 30 Jun 16:29:38 PDT 2025
Mon 30 Jun 16:29:38 PDT 2025: Sending Pushover message.
Mon 30 Jun 16:31:15 PDT 2025: low space, deleting /backingfiles/snapshots/snap-000967
Mon 30 Jun 16:39:50 PDT 2025: Archiving completed successfully. Archived 224 files in 10m12s
Mon 30 Jun 16:39:50 PDT 2025: Sending Pushover message.
Mon 30 Jun 16:39:51 PDT 2025: cleaning cam mount
Mon 30 Jun 16:39:51 PDT 2025: Ensuring cam file is mounted...
Mon 30 Jun 16:39:51 PDT 2025: Disconnecting usb from host...
Note that there is no "Sending Shell command" log entry!!
However:
# grep NOTIFICATION_COMMAND /root/teslausb_setup_variables.conf
# export NOTIFICATION_COMMAND_ENABLED=true
# export NOTIFICATION_COMMAND_START="ssh ***@***.*** 'command args'"
# export NOTIFICATION_COMMAND_FINISH="ssh ***@***.*** 'command args'"
export NOTIFICATION_COMMAND_ENABLE=true
export NOTIFICATION_COMMAND_START="/usr/bin/curl -X POST https://redacted/api/webhook/redacted1"
export NOTIFICATION_COMMAND_FINISH="/usr/bin/curl -X POST https://redacted/api/webhook/redacted2"
This is unbelievable!!
Any idea what could be wrong??
Also, do you have a suggestion how I could trigger this archiveloop thing
manually for further debugging? Right now I have generate sentry movies,
otherwise nothing will happen
—
Reply to this email directly, view it on GitHub
<#976 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALPQBDTDSIAL7ECPY7SHOXD3GIQ2BAVCNFSM6AAAAACANO4OX6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGNRSGUYTONY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
eigenphase
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have configured NOTIFICATION_COMMAND to automate keeping Tesla up via Home Assistant. In my teslausb_setup_variables.conf, I have:
However, sadly NOTIFICATION_COMMAND_START does not seem to execute and/or fail: The webhook is never executed in HA.
But, once it's started and I ssh in and execute exactly the same command it works.
Additionally, I have pushover notifications set up and they work.
Any ideas what the issue could be?
EDIT: Just completed a transfer and seems like
NOTIFICATION_COMMAND_FINISHisn't executed either ...Beta Was this translation helpful? Give feedback.
All reactions