Can't create a webhook

Hello,

I’m trying to create a webhook using the Lovelace frontend, but I can’t find the webhook after clicking the save button.

Here’s how I’m trying to create the webhook:

-Configuration, Automations, +Add Automation, Start with an Empty Automation

Name: MyNewWebhook
Description: Trying to create a webhook
Mode: Single

Trigger Type: Webhook
Webhook ID: mywebhook

Action Type: Device
Device: BedroomLight
Action: Turn Off Bedroom

Click SAVE

The save button goes away, but the I can’t get it to work with this command:

curl -X POST -d “” --insecure https://192.168.1.2:8123/api/webhook/mywebhook

I get this error:

404: Not Found

I also can’t find the webhook anywhere I look, it’s not in authomations, entities, etc… It’s as if it was never saved or created in the first place

Am I doing this wrong?

Webhooks are not created in the way that entities are created, so you won’t find a list of webhooks anywhere.
Only webhooks that go through Nabu Casa (and that are then externally available) are explicitly created and listed.

The URL you are calling looks right in principle - assuming that IP address, port and https are all correct.
Is there anything in the log that indicates what may go wrong with this webhook call?

The IP address is the URL of my HA server and the curl command is the same that I used to use before I did a rebuild of all my automations.

My log is really quite empty. Maybe I need to enable verbosity to see anything? You can see there isn’t much from one keyboard interrupt (quiting hass) to the next, and in that time I tried to create a few webhooks without any luck.

KeyboardInterrupt
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ha/HA.VirtualEnvs/3.8/bin/hass", line 8, in <module>
sys.exit(main())
File "/home/ha/HA.VirtualEnvs/3.8/lib/python3.8/site-packages/homeassistant/__main__.py", line 313, in main
exit_code = runner.run(runtime_conf)
File "/home/ha/HA.VirtualEnvs/3.8/lib/python3.8/site-packages/homeassistant/runner.py", line 113, in run
return asyncio.run(setup_and_run_hass(runtime_config))
File "/usr/lib/python3.8/asyncio/runners.py", line 51, in run
loop.close()
File "/home/ha/HA.VirtualEnvs/3.8/lib/python3.8/site-packages/homeassistant/runner.py", line 79, in close
executor.shutdown(wait=True)
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 236, in shutdown
t.join()
File "/usr/lib/python3.8/threading.py", line 1011, in join
self._wait_for_tstate_lock()
File "/usr/lib/python3.8/threading.py", line 1027, in _wait_for_tstate_lock
elif lock.acquire(block, timeout):
KeyboardInterrupt

Do I need to put anything in my configuration.yaml in order to create webhooks? I’m up to date with HA on GIT, was running 2021.4.2 yesterday and upgraded to 2021.4.3 this morning but still no luck.

I discovered that I can find all the webhooks I’ve made in automations.yaml. I actually migrated to automations_manual.yaml per a suggestion in this post.

I deleted all my webhooks attempts from automations.yaml and put just one of them at the bottom of my functioning automations_manual.yaml file. I enabled debug logging and then tried the webhook, but if failed again and I saw no reference to it in the log.

I deleted the webhook from my automations_manul.yaml then recreated it with debug logging enabled. I didn’t see any references to it in the log file, but just as before, the new webhook ended up in automations.yaml instead of automations_manual.yaml. I moved it from automations.yaml to automations_manual.yaml and restarted but it still didn’t work.

I still get the error whether or not I use 127.0.0.1 or the ip address of my HA server in the curl command

curl -X POST --insecure https://127.0.0.1:8123/api/webhook/bedroomlightoff
404: Not Found

Is there something needed for the webhook api to be available at a basic level?

Maybe I should just scrap my entire setup and start from scratch?