Skip to content

Fix webhook delivery and callback crash on HA 2026.5#199

Open
sevorl wants to merge 1 commit into
arnonym:mainfrom
sevorl:main
Open

Fix webhook delivery and callback crash on HA 2026.5#199
sevorl wants to merge 1 commit into
arnonym:mainfrom
sevorl:main

Conversation

@sevorl

@sevorl sevorl commented May 27, 2026

Copy link
Copy Markdown

What this fixes

Webhook automations not triggering reliably on HA Core 2026.5+ (notably with local_only true).
Runtime crash on incoming/registration callbacks:
AttributeError: Account object has no attribute onRegState
Changes

Added dedicated webhook base URL support (HA_WEBHOOK_BASE_URL) and wired it through config/runtime.
In add-on mode, default webhook endpoint now targets Core directly via homeassistant hostname.
Implemented webhook delivery fallback chain with better logging and exception handling.
Fixed pjsua2 callback dispatch compatibility by explicitly binding callback handlers on Account instances.
Enforced LF line endings for shell scripts via .gitattributes to prevent bash carriage-return startup failures.
Added/updated tests for webhook URL selection and send behavior.
Updated README with webhook base URL behavior.
Validation

Reproduced and fixed startup failure caused by CRLF shell scripts.
Verified webhook-triggered automations fire again in HA OS test deployment.
Verified focused webhook unit tests pass.
Issue
Closes #197

@arnonym

arnonym commented May 29, 2026

Copy link
Copy Markdown
Owner

Hi,

this PR mixes fixes for several issues into one.

  1. Attribute errors.
  2. Web-hook problem
  3. CRLF shell script.

For 1. and 2. I never saw a bug report and I also did not experience that error. Where does this come from?

For 2: the fix will trigger the web-hook multiple times for different URLs. That does not make any sense to me.

And also this PR looks very much AI generated. Was any of this tested locally?

Regards,
Arne

@sevorl

sevorl commented May 29, 2026

Copy link
Copy Markdown
Author

Hi @arnonym,
thanks for reviewing this pr.
While testing the webhook fix, I noticed that the app crashed and therefore added these additional fixes.

Yes, I did this with AI assistance.
I tested this locally and use this version for two days now on my system. I did not notice any issues and just double checked the logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

web hooks failing since core update 2026.5

2 participants