Skip to content

Add documentation for stream component #8838

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

Merged
merged 6 commits into from
Mar 12, 2019

Conversation

hunterjm
Copy link
Member

@hunterjm hunterjm commented Mar 6, 2019

Description:
Documents the stream component and the new camera service.

Pull request in home-assistant (if applicable): home-assistant/core#21473

Checklist:

  • Branch: next is for changes and new documentation that will go public with the next home-assistant release. Fixes, changes and adjustments for the current release should be created against current.
  • The documentation follows the standards.

@ghost ghost added the to-do label Mar 6, 2019
@klaasnicolaas klaasnicolaas added new-integration This PR adds documentation for a new Home Assistant integration new-feature This PR adds documentation for a new Home Assistant feature to an existing integration ready-for-review This PR needs to be reviewed next This PR goes into the next branch has-parent This PR has a parent PR in a other repo and removed to-do labels Mar 6, 2019
klaasnicolaas
klaasnicolaas previously approved these changes Mar 11, 2019
@klaasnicolaas klaasnicolaas added awaits-parent Awaits the merge of an parent PR and removed ready-for-review This PR needs to be reviewed labels Mar 11, 2019
@frenck frenck added the parent-merged The parent PR has been merged already label Mar 12, 2019
@dshokouhi
Copy link
Member

@hunterjm I had just started testing this, currently looking to see if I have a supported camera.

On my dev instance of HA I have things running on a raspberry pi. When attempting to start HA with stream: in my configuration I got the following error:

2019-03-12 08:49:59 ERROR (SyncWorker_5) [homeassistant.util.package] Unable to install package av==6.1.2: Command "/home/pi/home-assistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-udfl2b3t/av/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ftn5zmh2/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/home-assistant/include/site/python3.6/av" failed with error code 1 in /tmp/pip-install-udfl2b3t/av/
2019-03-12 08:49:59 ERROR (MainThread) [homeassistant.requirements] Not initializing stream because could not install requirement av==6.1.2
2019-03-12 08:49:59 ERROR (MainThread) [homeassistant.setup] Setup failed for stream: Could not install all requirements.

After a little bit of googling the following commands allowed me to get past this error, so I think a note for manual install users would be helpful here:

sudo apt-get install -y python-dev pkg-config

sudo apt-get install -y libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libavresample-dev libavfilter-dev

If you think its out of scope for this PR I will submit a change but I think it may be helpful to some users to get in the first release :)

@hunterjm
Copy link
Member Author

@dshokouhi - The pyAV package is also available pre-built on https://www.piwheels.org/, which Hassbian has as a default package source, I believe. Maybe we can add a note to add that? Can you try removing those packages and installing from piwheels?

@dshokouhi
Copy link
Member

@hunterjm it looks like wheels is not supported on python 3.6? I have Python 3.6.7 on my raspberry pi. I already had the default package source setup on my pi as I had just checked it from the link but it did not grab the packages.

Wheels provided support all Raspberry Pi models (Pi 3, Pi 2, Pi 1 and Pi Zero). Wheels are provided for Python 3.4 and 3.5. We plan to add support for Python 3.6, 3.7 and 2.7.

When I attempt remove the installed packages and try again I get the same error about it being unable to find the packages. Below is part of the error when I try to manually install pyAV, when I grab the packages I linked above the install works fine.

    Could not find libavformat with pkg-config.
    Could not find libavcodec with pkg-config.
    Could not find libavdevice with pkg-config.
    Could not find libavutil with pkg-config.
    Could not find libavfilter with pkg-config.
    Could not find libswscale with pkg-config.
    Could not find libswresample with pkg-config.

I can provide the full error but don't want to spam this PR.

@hunterjm
Copy link
Member Author

Ok. Good to know that piwheels doesn’t support 3.6 and 3.7.

I think we can add a warning message in the docs, but upon release it should work out of the box in new hassbian installs, HASS.io, and the official docker image.

@dshokouhi
Copy link
Member

ok I will just add the note for manual installers who run into the error on how to fix it once this PR gets merged :)

Co-Authored-By: hunterjm <hunterjm@gmail.com>
frenck
frenck previously approved these changes Mar 12, 2019
Copy link
Member

@dshokouhi dshokouhi left a comment

Choose a reason for hiding this comment

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

probably want to update this part


## {% linkable_title Configuration %}

To enable the random binary sensor, add the following lines to your `configuration.yaml` file:
Copy link
Member

Choose a reason for hiding this comment

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

we have a random binary sensor here? :)

Copy link
Member

Choose a reason for hiding this comment

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

Thanks

@fabaff fabaff merged commit c8d9f58 into home-assistant:next Mar 12, 2019
@ghost ghost removed the awaits-parent Awaits the merge of an parent PR label Mar 12, 2019
@hunterjm hunterjm deleted the feature/streams branch March 13, 2019 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-parent This PR has a parent PR in a other repo new-feature This PR adds documentation for a new Home Assistant feature to an existing integration new-integration This PR adds documentation for a new Home Assistant integration next This PR goes into the next branch parent-merged The parent PR has been merged already
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants