Motioneye webhooks seems not working

Hi,

I’m trying to use motioneye to detect motions . So I’ve setup the plugin, configure the webhooks .

I go to devtools, listen on the event fired by motioneye… but nothing … I can move on the camera, it never fire

So, I go to motioneye, and check the webhook configured :

http://192.168.3.3:8123/api/webhook/6aff8ddf1ccce3f872b32b0784b7a6bae20bc6a7a4df852388c491b61d53289d?camera_id=%t&changed_pixels=%D&despeckle_labels=%Q&event=%v&fps=%{fps}&frame_number=%q&height=%h&host=%{host}&motion_center_x=%K&motion_center_y=%L&motion_height=%J&motion_version=%{ver}&motion_width=%i&noise_level=%N&threshold=%o&width=%w&src=hass-motioneye&event_type=motion_detected&device_id=d06de9cc55919a189a0d627394ee1409

So, I’ve captured the body sent by motioneye, and try by myself :

curl --location "http://192.168.3.3:8123/api/webhook/6aff8ddf1ccce3f872b32b0784b7a6bae20bc6a7a4df852388c491b61d53289d?src=hass-motioneye&event_type=motion_detected&device_id=d06de9cc55919a189a0d627394ee1409" --header "Content-Type: application/json" --data "{}"

And it fail returning the error :

Missing webhook parameter: device_id

So, is the home assistant webhook allowing this parameter from query before ? and now only takes the body ?

I’m locked now, and don’t know how to search more informations …

Not certain, but it looks like your quotes are messed up.

my quotes are messed up ? where ?

( if it’s the curl command, it’s generated by postman, because I use postman to try also )

I use your code but in run command not on webhook in motioneye. With https and -k parameter to bypass ssl verification

curl -k --location “https://mylocalip:8123/api/webhook/my-id-generated” --header “Content-Type: application/json” --data “{}”

And finally work to run an automation!

What is your configuration in HA? Did you create a special sensor or other device?

Finally, I am not using motioneye anymore .

im using freegate now , Facial detection with IA etc, problem solved

This problem may be solved by Erik by ditching motionEye but it has not been resolved. It is a very simple apparent bug restated as follows:

The documentation says to test a webhook command as follows:

>curl -X POST -H "Content-Type: application/json" -d '{ "key": "value" }' https://your-home-assistant:8123/api/webhook/some_hook_id

Where “some_hook_id” can be anything but in this case is the id generated automatically by the motionEye integration when configuring a camera.

When running this command with “some_hook_id” the curl command returns a response of

Missing webhook parameter: device_id

and an Automation trigger with “some_hook_id” as the Webhook ID is never triggered. The implication is that the Webhook Post failed based on the curl response received and that the failure is due to a missing “device_id” parameter of which the Webhook documentation makes no mention.

To be clear, motionEye plays no part in this issue as the curl command is being run from the command line according to the Webhook documentation which has nothing to do with motionEye. It is just implementing motionEye that has brought light to this apparently glaring bug in Webhook. According to the documentation one can use any arbitrary “web_hook_id.”

Btw, I have tried appending "?device-id= and the same message occurred. I haven’t yet tried to figure out a valid device id in the system to try to use just as a test. According to the doc, device IDs play no part so I shouldn’t have to go down this rabbit hole.

Before this is turned in as a bug does anyone have any idea why this is failing in this manner?