New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FFmpeg camera component - timeout reading image with Xiaomi Dafang cameras #15403
Comments
I'm also having problems with ffmpeg. Can you discribe where you changed timeout locally, then I can try that too and see if it's the same problem. |
This is also a problem for me |
More error messages:
|
Unfortunately my home assistant machine died on me, so I'll be getting a
new one and try to recreate my configuration but if I'm correct that the
error is related to the performance of my old machine I expect this error
not to be seen again. Will keep you posted as to my findings.
…On Tue, Sep 11, 2018, 14:48 Isabella Gross Alström ***@***.***> wrote:
More error messages:
018-09-09 15:18:39 ERROR (MainThread) [haffmpeg.core] FFmpeg fails [Errno
9] Bad file descriptor Traceback (most recent call last): File
"/usr/local/lib/python3.6/site-packages/haffmpeg/core.py", line 114, in
open stderr=stderr File "/usr/local/lib/python3.6/asyncio/subprocess.py",
line 225, in create_subprocess_exec stderr=stderr, **kwds) File
"uvloop/loop.pyx", line 2603, in subprocess_exec File "uvloop/loop.pyx",
line 2563, in __subprocess_run File "uvloop/handles/process.pyx", line 595,
in uvloop.loop.UVProcessTransport.new File "uvloop/handles/process.pyx",
line 130, in uvloop.loop.UVProcess._init OSError: [Errno 9] Bad file
descriptor 2018-09-09 15:18:39 WARNING (MainThread) [haffmpeg.tools] Error
starting FFmpeg. 2018-09-09 15:18:39 ERROR (MainThread)
[homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last): File
"/usr/local/lib/python3.6/site-packages/homeassistant/components/camera/__init__.py",
line 496, in send_camera_still image = await async_get_image(hass,
msg['entity_id']) File
"/usr/local/lib/python3.6/site-packages/homeassistant/components/camera/__init__.py",
line 160, in async_get_image image = await camera.async_camera_image() File
"/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs) File
"/usr/local/lib/python3.6/site-packages/homeassistant/components/camera/local_file.py",
line 72, in camera_image with open(self._file_path, 'rb') as file: OSError:
[Errno 9] Bad file descriptor 2018-09-09 15:18:44 WARNING (MainThread)
[haffmpeg.tools] Timeout reading image. 2018-09-09 15:19:14 WARNING
(MainThread) [haffmpeg.tools] Timeout reading image. 2018-09-09 15:19:24
WARNING (MainThread) [haffmpeg.tools] Timeout reading image. 2018-09-09
15:19:34 WARNING (MainThread) [haffmpeg.tools] Timeout reading image.
2018-09-09 15:19:44 WARNING (MainThread) [haffmpeg.tools] Timeout reading
image. 2018-09-09 15:19:54 WARNING (MainThread) [haffmpeg.tools] Timeout
reading image. 2018-09-09 15:20:24 WARNING (MainThread) [haffmpeg.tools]
Timeout reading image. 2018-09-09 15:21:34 WARNING (MainThread)
[haffmpeg.tools] Timeout reading image. 2018-09-09 15:23:04 WARNING
(MainThread) [haffmpeg.tools] Timeout reading image. 2018-09-09 15:23:14
WARNING (MainThread) [haffmpeg.tools] Timeout reading image. 2018-09-09
15:23:24 WARNING (MainThread) [haffmpeg.tools] Timeout reading image.
2018-09-09 15:23:34 WARNING (MainThread) [haffmpeg.tools] Timeout reading
image. 2018-09-09 15:23:44 WARNING (MainThread) [haffmpeg.tools] Timeout
reading image. 2018-09-09 15:23:54 WARNING (MainThread) [haffmpeg.tools]
Timeout reading image.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#15403 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABTZcKPCZ7pQ_7jC4AzUGPfA1C_c7BRUks5uZ6MRgaJpZM4VJIZD>
.
|
I'm hesitant to think my problems are related to performance since I'm running on an Intel nuc. |
I'm also hesitant. My instance is running on a RPi 3. |
After upgrading from an old version (0.73.2) to the latest version (0.79.1), all my camera's give the error: So, something has changed, and I hope it will be fixed soon! |
I'm experiencing the same issue(0.79.3). For me it seems to be working and then crashes after a couple of min with error "Timeout reading image." |
Using 0.80.1 I get this error in the log while the camera component is setup: /usr/src/app/homeassistant/components/camera/ffmpeg.py:35: RuntimeWarning: coroutine 'FFmpegManager.async_run_test' was never awaited if not hass.data[DATA_FFMPEG].async_run_test(config.get(CONF_INPUT)): |
How to change the timeout? I've the same errors. |
i have a Xiaomi Aqara "hub&cam"/"cam&hub", and also get this "timeout reading image" in my log many times (sometimes 6 per minute, than a pauze for 1 or >30 minutes etc). Not sure whether it is related to the camera going into sleep mode; just did a short test by getting the cam out of sleep, rebooting the Rpi, and 25min in, not a single error about reading the image... |
Just found https://www.programcreek.com/python/example/104604/async_timeout.timeout, see example 39 ... i'm not a programmer, but i think when some checks fail, it leads to the error written to the logs. Maybe there are too many situations not handled, leading to that error being written, and we can ignore it in many cases? @pvizeli might know more. |
Same issues on 0.84.6 I restarted the HASS and the camera with no luck. When streaming the RTSP via VLC I have very minimal lag (miliseconds) so I am not sure what happened. |
Same issue over here, camera worked for about a week or 2 without any problems and today it started to give me these errors, https://community.home-assistant.io/t/out-of-the-blue-issues-with-camera-snapshot-service/90526 |
@vout this does bot seem related. The error here is specifically with Xiaomi Dafang cameras. |
@tsvi No it seems like exactly the same error, an timeout issue. So probably it isn't an Xiaomy Dafang issue only but an general rtsp stream issue. The "setup" you have in your opening post is the same i have, - platform: ffmpeg
name: IP camera oprit
input: !secret ip_camera_oprit_stream
extra_arguments: '-q:v 1 -r 25 -vf "scale=640:360"' Where !secret ip_camera_oprit_stream is just an regular rtsp stream |
I did some extensive debugging. I discovered that this was taking 5+ seconds, because it was trying to detect the sound stream which was badly configured. |
Seeing the same error using a Yi home cam. I'm migrating HA to new hardware and this config is working on the old installation (RPI Zero) - platform: yi
name: 'Front Yard'
host: '10.0.0.13'
password: !secret FrontCamPass
path: /tmp/sd/record
ffmpeg_arguments: '-vf scale=640:480' |
Is this still an issue you are experiencing? Can you please try upgrading to the latest version of Home Assistant (0.90) and report back if this is still a problem? Thanks! |
ooops! sorry yes, the upgrade fixed the issue, this can be closed.
…On Thu, Mar 21, 2019 at 7:41 PM GuitarSkater ***@***.***> wrote:
Is this still an issue you are experiencing? Can you please try upgrading
to the latest version of Home Assistant (0.90) and report back if this is
still a problem? Thanks!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#15403 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AXJmlUMf5g5W5UBJtKo93qIucRYFlB9Iks5vZDTagaJpZM4VJIZD>
.
|
This is still an issue for me on quite powerful hass running as virtual machine
It worked several times, but now even after reboot I constantly getting timeouts. |
timeout fixed by adding |
Home Assistant release with the issue:
0.73.1
Last working Home Assistant release (if known):
N/A
Operating environment (Hass.io/Docker/Windows/etc.):
Ubuntu Bionic. Using virtualenv
Running on old x86 Intel Celeron 900Mhz with 1Gb of RAM and 8Gb of HD
Also when using HASSIO on Rpi 3B+
Component/platform:
ffmpeg
Description of problem:
Keep getting timeout on reading image. Network related has been ruled out.
Due to the old hardware I'm using HASS on, the timeout value of 15 sec for ffmpeg getting still images is not enough.
Changing the timeout locally to 20 sec stabilizes the system. Better would be to have it as a configuration setting for the ffmpeg component.
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information:
The text was updated successfully, but these errors were encountered: