Got it Thank you!
Hmm - I’m at war with this Push integration and motionEye…
Anyone has idea why is this error showing up in logs?
Error processing webhook webtestcamera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 77, in async_handle_webhook
response = await webhook["handler"](hass, webhook_id, request)
File "/usr/src/homeassistant/homeassistant/components/push/camera.py", line 74, in handle_webhook
data = dict(await request.post())
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_request.py", line 620, in post
chunk = await field.read_chunk(size=2**16)
File "/usr/local/lib/python3.7/site-packages/aiohttp/multipart.py", line 303, in read_chunk
chunk = await self._read_chunk_from_stream(size)
File "/usr/local/lib/python3.7/site-packages/aiohttp/multipart.py", line 330, in _read_chunk_from_stream
self._prev_chunk = await self._content.read(size)
File "/usr/local/lib/python3.7/site-packages/aiohttp/streams.py", line 368, in read
await self._wait('read')
File "/usr/local/lib/python3.7/site-packages/aiohttp/streams.py", line 298, in _wait
await waiter
concurrent.futures._base.CancelledError
I’m using standard call for this:
curl -X POST -F "image=@%f" http://my.ha.ip.address:8123/api/webhook/webtestcamera
tried with:
curl -X POST -F "image=@%f" http://my-ha-ip-address:8123/api/webhoo\k/webtestcamera
Just to add on this. When using normal webhook, I do get trigger. Problem is with this webhook while trying to send image.
Can’t find any other error then this one (listed above).
Hi @dgomes,
Sorry to resurrect an old post however I’m trying to use a similar command with motioneye to copy the stored image to another folder. However I have both still images and movies enabled so just doing
cp %f /tmp/latestimage.jpg
writes both the mp4 from the movie and the jpg from the alert image to the same file name and usually the mp4 takes precedence as it was the last file written.
I am trying to only copy the jpg file however I’m having a hard time doing that. Your example of using
if [[ ${file: -4} == ".jpg" ]]; then cp %f /tmp/latestimage.jpg; fi
doesn’t seem to work.
Any thoughts on how I can get this to only copy the jpg image and not the mp4 video file?
the name of the file is stored in %f and is processed before bash
if [[ "%f" == *jpg ]]; then cp %f /tmp/latestimage.jpg; fi
Thanks for the tip mate.
Unfortunately it’s not working for me. I’ll keep playing and see if I can get it working.
Hi, sorry to bump an old thread again but I’ve been trying to figure this out for days!
I’m trying to send the image from motioneye to my push camera but it keeps sending the .MP4 file instead, as Rosie had the same problem above. I’ve tried your suggested command using
if [[ ${file: -4} == ".jpg" ]]; then curl .....; fi
But this never sends a file! Just above you suggest using
if [[ "%f" == *jpg ]]; then
This also never seems to send anything, could you help me with the correct command as I feel like I’ve tried everything! Thanks in advance