Amcrest streaming broken in 0.91.0
See original GitHub issuecustom Amcrest component will load OK under .91.0, snapshots in preview are OK, but streaming is completely broken. Numerous errors (logs below). 91.0 release notes show an update to Amcrest was made to SUPPORT_STREAM.
I temporarily removed the custom Amcrest code and tried the official. It won’t even load! I won’t list those errors here since that’s not relevant to the custom code. Looks like I will either have to back out to .90 or hope .91.1 fixes it.
2019-04-05 10:04:06 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/real_ip.py", line 33, in real_ip_middleware
return await handler(request)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/ban.py", line 68, in ban_middleware
return await handler(request)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/auth.py", line 216, in auth_middleware
return await handler(request)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/view.py", line 114, in handle
result = await result
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/camera/__init__.py", line 475, in get
return await self.handle(request, camera)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/camera/__init__.py", line 511, in handle
return await camera.handle_async_mjpeg_stream(request)
File "/config/custom_components/amcrest/camera.py", line 206, in handle_async_mjpeg_stream
from haffmpeg import CameraMjpeg
ImportError: cannot import name 'CameraMjpeg' from 'haffmpeg' (/usr/local/lib/python3.7/site-packages/haffmpeg/__init__.py)
2019-04-05 10:04:34 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/real_ip.py", line 33, in real_ip_middleware
return await handler(request)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/ban.py", line 68, in ban_middleware
return await handler(request)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/auth.py", line 216, in auth_middleware
return await handler(request)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/view.py", line 114, in handle
result = await result
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/camera/__init__.py", line 475, in get
return await self.handle(request, camera)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/camera/__init__.py", line 511, in handle
return await camera.handle_async_mjpeg_stream(request)
File "/config/custom_components/amcrest/camera.py", line 206, in handle_async_mjpeg_stream
from haffmpeg import CameraMjpeg
ImportError: cannot import name 'CameraMjpeg' from 'haffmpeg' (/usr/local/lib/python3.7/site-packages/haffmpeg/__init__.py)
2019-04-05 10:04:43 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/real_ip.py", line 33, in real_ip_middleware
return await handler(request)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/ban.py", line 68, in ban_middleware
return await handler(request)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/auth.py", line 216, in auth_middleware
return await handler(request)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/view.py", line 114, in handle
result = await result
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/camera/__init__.py", line 475, in get
return await self.handle(request, camera)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/camera/__init__.py", line 511, in handle
return await camera.handle_async_mjpeg_stream(request)
File "/config/custom_components/amcrest/camera.py", line 206, in handle_async_mjpeg_stream
from haffmpeg import CameraMjpeg
ImportError: cannot import name 'CameraMjpeg' from 'haffmpeg' (/usr/local/lib/python3.7/site-packages/haffmpeg/__init__.py)
2019-04-05 10:05:02 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/real_ip.py", line 33, in real_ip_middleware
return await handler(request)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/ban.py", line 68, in ban_middleware
return await handler(request)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/auth.py", line 216, in auth_middleware
return await handler(request)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/http/view.py", line 114, in handle
result = await result
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/camera/__init__.py", line 475, in get
return await self.handle(request, camera)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/camera/__init__.py", line 511, in handle
return await camera.handle_async_mjpeg_stream(request)
File "/config/custom_components/amcrest/camera.py", line 206, in handle_async_mjpeg_stream
from haffmpeg import CameraMjpeg
ImportError: cannot import name 'CameraMjpeg' from 'haffmpeg' (/usr/local/lib/python3.7/site-packages/haffmpeg/__init__.py)
2019-04-05 10:07:59 ERROR (MainThread) [aiohttp.server] Error handling request
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (11 by maintainers)
Top Results From Across the Web
Amcrest IP Camera Component Enhancements - PTZ control ...
i'm on 0.91.0 my configuration is like this. amcrest: - host: 192.168.1.XXX name: Giardino2 username: admin password: !secret general ...
Read more >rtsp no longer working - Amcrest Forum
Now camera B no longer streams through that app. I get a Connection Timeout. I have tried contacting the TinyCam Pro Author, ...
Read more >IP8M-2496EW-V2 trouble streaming main stream to vlc at full ...
This fails. It looks like VLC buffers for a second, then nothing is displayed in VLC. 192.xxx.yyy.zzz is the LAN IP address of...
Read more >Video Streaming but not visible (IP2M-841B) - Amcrest Forum
The cameras appear to be streaming and I can see the speed indicator changing every second, however there seems to be an "encoding"...
Read more >Cameras not working. Screens are black. - Amcrest Forum
I bought the 960h system. After installing and setting up all cameras were up and running now all screens are black.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh crap, I just moved amcrest folder out of custom_components back 1 level (config/amcrest) thinking that would remove it from loading pattern. I didn’t realize HA would also look in config folder too.
will take care of this oversight right now…
Cool! FWIW, my current PR is #22703. It adds a binary_sensor (motion_detected) to take the place of the motion_dectector sensor. (But I think you already knew that. 😄) Next up will be adding services and deprecating the switches.