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

ffmpeg_noise entity not created if input unavailable on startup #17495

Closed
jjlawren opened this issue Oct 15, 2018 · 4 comments
Closed

ffmpeg_noise entity not created if input unavailable on startup #17495

jjlawren opened this issue Oct 15, 2018 · 4 comments

Comments

@jjlawren
Copy link
Contributor

Home Assistant release with the issue:
0.80.1

Operating environment (Hass.io/Docker/Windows/etc.):

Ubuntu standalone install

Component/platform:

binary_sensor.ffmpeg_noise (https://www.home-assistant.io/components/binary_sensor.ffmpeg_noise/)

Description of problem:
If the input source (ie, RTSP stream) is not available when Home Assistant starts up, the binary_sensor entity is not created. I think it would make more sense to create the entity but consider it unavailable.

The same stream is configured with an ffmpeg camera which is created without issue. The base ffmpeg component allows a run_test parameter to skip the startup test.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

binary_sensor:
    - platform: ffmpeg_noise
      name: Noise Sensor
      input: rtsp://10.99.0.110:8554/unicast
      extra_arguments: -filter:a highpass=f=300,lowpass=f=2500,volume=volume=2 -codec:a libmp3lame -ar 16000
      initial_state: false
      duration: 2
      reset: 30
      peak: -30

Traceback (if applicable):

2018-10-15 14:22:18 ERROR (MainThread) [haffmpeg.tools] ReturnCode: 1 / STD: b'' / ERR: b'ffmpeg version 3.4.4-0ubuntu0.18.04.1 Copyright (c) 2000-2018 the FFmpeg developers\n  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)\n  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared\n  libavutil      55. 78.100 / 55. 78.100\n  libavcodec     57.107.100 / 57.107.100\n  libavformat    57. 83.100 / 57. 83.100\n  libavdevice    57. 10.100 / 57. 10.100\n  libavfilter     6.107.100 /  6.107.100\n  libavresample   3.  7.  0 /  3.  7.  0\n  libswscale      4.  8.100 /  4.  8.100\n  libswresample   2.  9.100 /  2.  9.100\n  libpostproc    54.  7.100 / 54.  7.100\n[tcp @ 0x55f9077d4aa0] Connection to tcp://10.99.0.110:8554?timeout=0 failed: Connection refused\nrtsp://10.99.0.110:8554/unicast: Connection refused\n'
2018-10-15 14:22:18 ERROR (MainThread) [homeassistant.components.ffmpeg] FFmpeg 'rtsp://10.99.0.110:8554/unicast' test fails!
/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)):
@jjlawren
Copy link
Contributor Author

The RuntimeWarning in the traceback above has been solved in #17609.

@pvizeli
Copy link
Member

pvizeli commented Oct 26, 2018

configuration.yaml

ffmpeg:
  run_test: false

That fix the problem too?

@edif30
Copy link
Contributor

edif30 commented Oct 28, 2018

I am not sure what you mean by

If the input source (ie, RTSP stream) is not available when Home Assistant starts up, the binary_sensor entity is not created.

I just setup a dummy stream that doesn't exist and the binary sensor gets created every time.

@jjlawren
Copy link
Contributor Author

jjlawren commented Nov 5, 2018

I can't recreate my original problem and FFmpeg sensors no longer run input validity tests on startup. Closing.

@jjlawren jjlawren closed this as completed Nov 5, 2018
@ghost ghost removed the in progress label Nov 5, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Feb 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants