Skip to content
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

Add missing await for coroutine #17609

Merged
merged 1 commit into from
Oct 19, 2018

Conversation

jjlawren
Copy link
Contributor

Description:

Adds missing await for ffmpeg camera setup coroutine.

Fixes warnings on startup:

/srv/homeassistant/lib/python3.6/site-packages/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)):

Related issue (if applicable): fixes #

Example entry for configuration.yaml (if applicable):

- platform: ffmpeg
  name: Fancy Camera
  input: -rtsp_transport tcp -i rtsp://10.99.0.110:8554/unicast

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

@homeassistant
Copy link
Contributor

Hi @jjlawren,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

Copy link
Contributor

@bachya bachya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can merge when build passes. 👍

@Danielhiversen Danielhiversen merged commit 88ec73e into home-assistant:dev Oct 19, 2018
@ghost ghost removed the in progress label Oct 19, 2018
@jjlawren jjlawren deleted the ffmpeg_camera_fix_await branch October 23, 2018 02:09
@balloob balloob mentioned this pull request Oct 26, 2018
@edif30
Copy link
Contributor

edif30 commented Oct 28, 2018

@jjlawren For some reason and I cannot figure out why, this PR caused errors on start for my cameras randomly.

I would just get this

[haffmpeg.tools] ReturnCode: 1 / STD: b'' / ERR: b'

Then a test would fail for one of the cameras. Also, I would randomly get a segfault and HA would restart itself during a restart. I think HA was getting to the ffmpeg await and failing/timeout and get lost. The seg fault was located at...

Oct 28 10:59:15 host kernel: [3068784.405869] traps: python[122862] general protection ip:7f2178493529 sp:7ffe0a20f500 error:0
Oct 28 10:59:15 host kernel: [3068784.405874]  in libc-2.24.so[7f217845f000+195000]

Soon as I reverted this change, I no longer see the issue. I run HA in a Docker container on 0.81.x.

We should revert this and test further or come up with another solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants