Running:
motionEye Version | 0.39.3
Motion Version | 4.1.1
OS Version | Ubuntu 18.04
Issue
Whenever I setup "Run a command" with a command such as:
curl -X POST -F "image=@%f" http://192.168.1.1/api/webhook/crazy_token
Motioneye disables my command and moves it into the web hook URL. Unfortunantely the webhook will not POST my image.
Expected behaviour
Leave "Run a command" alone
@dgomes you're right; in fact, what motionEye does is to look for the word "webhook" in the list of commands to execute and, if found, considers that the command is in fact a webook configuration. We need to revise this and find a better way to tell regular commands from webooks.
Can't this "automation" be simply disabled ? What was the initial purpose ?
@dgomes Motion exposes an option called e.g. on_movie_end which represents a command to be executed when a movie is done. Now, in order to accommodate both webhooks and custom commands (and possibly other things, such as notifications), motionEye specifies multiple subcommands to this option. Identifying which one of them is the webhook is something not quite straight forward :)
@ccrisan thank you for your insights :)
in the current implementation, motioneye will simply call webhook and command one after the other, as commands as separated by ; in the on_movie_end call.
To overcome this issue I've created a no operation webhook (NOOP), but I don't see why MotionEye couldn't simply remove the webhook call when no webhook is defined. Am I missing something ?
@dgomes the problem is the presence of the word "webhook" in your URL. For now you can try change that to something else and it will work.
I cannot change the URL.
I can work a PR with a solution if you guide me towards the proper behaviour.
Having the same issue here on motioneye in docker. @dgomes solution of a dummy webhook entry doesn't work for me either - motioneye disables my command no matter what.
Wouldn't a good solution be to enable motioneye to upload files with the webhook option?
For the prosperity of the internet, you can solve this by inserting a backslash in the middle of "webhook". Motion doesn't move the command to a webhook, and the backslash is escaped at some point before the command is run. My command for home assistant became:
curl -X POST -F "image=@%f" http://my.ha.ip:8123/api/webhoo\k/my_whook_id
With your solution now the image from motioneye is still working.
In Configuration.yaml work this for me.
Now i configure a appdaemon dashboard where i need the image also.
But this dosent work. In dash file i try different settings but no image / video will be visible.
camera_front_door:
widget_type: camera.push
entity_url: xyz
entity_picture: xyz
on widget_type the different posible camera entry like mjpeg / push does not work
i try as example generic camera. Here it was possible to get a image if i dont use login credentials.
http://aaa.bbb.ccc.ddd:8765/picture/1/current/?_=1551328564666
With this as user credentials no image will show.
http://aaa.bbb.ccc.ddd:8765/picture/1/current/?_=1551328564666&_username=username&_signature=signaturevalue
The camera.push option get an image, so this image is available in system.
How can it be transfer to the dash?
And how it is possible to debug appdaemon to see what happend?
i hope my description is readable and will hold enough Informations for your to help.
I dont find at www more information for motioneye and appdaemon using push.
maybe you have a link?
Thank you for your assistant.
Regards Katzi
If your HA is running on https it will not display frame from http. So try
https://aaa.bbb.ccc.ddd:8765/picture/1/current/?_=1551328564666
Most helpful comment
For the prosperity of the internet, you can solve this by inserting a backslash in the middle of "webhook". Motion doesn't move the command to a webhook, and the backslash is escaped at some point before the command is run. My command for home assistant became:
curl -X POST -F "image=@%f" http://my.ha.ip:8123/api/webhoo\k/my_whook_id