Motioneye.motion_detected event is not firing despite webhook being received

Well I’m about ready to pull my hair out. I am running HA Supervised on a Debian machine and have MotionEye installed as an addon and the integration has been configured (though I did get the password wrong for the streaming user and had to remove the integration and wait for it to reappear because I have zero clue what the url is supposed to be). Webhooks were automatically added to the ME interface but they simply weren’t working.

I spent quite a while searching the device page for the ME integration for any sign of a motion_detected action, or sensor, or entity. Nothing. The only entities that exist are the settings related to motion detection, recording, etc.

I tried creating an automation triggered by a webhook with the same ID and got this extremely informative error.

2023-09-28 20:05:42.339 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140295134465216] Error setting up trigger
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/webhook/trigger.py", line 121, in async_attach_trigger
async_register(
File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 53, in async_register
raise ValueError("Handler is already defined!")
ValueError: Handler is already defined!

After that I decided to create a brand new trigger and pull the webhook ID from that and insert it into the webhook in motioneye. That worked and I can now fire off automations from that webhook but I would prefer to not figure it all out from scratch if this is supposed to be integrated.

That said, despite the web hook clearly being delivered, the motioneye.motion_detected is still not firing (verified via event lisener). Per the documentation it appears that the webhook firing should be triggering an event that can be used for all kinds of other things, but as far as I can tell that just fully isn’t happening.

I also created a binary sensor (from other posts here) that should be reacting to the motion_detected event. As you can probably guess - that hasn’t happened.

I also tried removing src=hass-motioneye as the documentation states if I tweak the webhook I should. Technically I changed the ID, but I had already configured MotionEye to accept overwritten webhooks.

Send help. I can’t look at it anymore today.