Commit Graph

406 Commits (6e7b5b71f5ff35dee96713e84f6faf06b004925d)

Author SHA1 Message Date
Pascal Vizeli 41f558b181 Bootstrap / Component setup async (#6264)
* Bootstrap / Entiy setup async

* Cleanup add_job stuff / return task/future object

* Address paulus comments / part 1

* fix install pip

* Cleanup bootstrap / move config stuff to config.py

* Make demo async

* Further bootstrap improvement

* Address Martin's comments

* Fix initial tests

* Fix final tests

* Fix bug with prepare loader

* Remove no longer needed things

* Log error when invalid config

* More cleanup

* Cleanups platform events & fix lint

* Use a non blocking add_entities callback for platform

* Fix Autoamtion is setup befor entity is ready

* Better automation fix

* Address paulus comments

* Typo

* fix lint

* rename functions

* fix tests

* fix test

* change exceptions

* fix spell
2017-02-28 20:33:19 -08:00
Jose Juan Montes 65d255a626 Local file camera now supports yet inexisting files. (#6157) 2017-02-26 21:16:11 -08:00
Erik Eriksson 3b693d5e70 generic camera: improved exception handling (#6158)
Avoid unhandled exception and stack trace when server closes connection by changing from handle ClientDisconnectedError to DisconnectedError. Also added HttpProcessingError, which was missing.
2017-02-22 07:43:52 -08:00
Matt N 2b9fb73032 zoneminder: Add camera mjpeg stream support (#6098) 2017-02-20 22:17:11 -08:00
Pascal Vizeli 1d7ab0fa95 Cleanup some async stuff (#6127)
* Cleanup some async stuff

* change to schedule_update_ha_state()

* fix media player

* fix zigbee
2017-02-20 13:24:03 -08:00
Hugo Dupras 676519d0cb Hotfix for netatmo cameras (#5644)
* Fix for missing netatmo tags in 0.37

Also fix issue with SSL certificate for vpn_url

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Netatmo welcome: vpn_url can be empty

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* add config floag to disable SSL verification for vpn_url

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Import CONF_VERIFY_SSL from const
2017-02-01 17:33:32 +01:00
Marcelo Moreira de Mello 976cd545fe Fixes issue #5627 by bumping external Amcrest module to version 1.1.4 (#5662)
Add an optional extended description…
2017-01-31 09:19:49 +01:00
Paulus Schoutsen b0d07a414b Token tweaks (#5599)
* Base status code on auth when entity not found

* Also allow previous camera token

* Fix tests

* Address comments
2017-01-28 11:51:35 -08:00
Pascal Vizeli c972e90580 Bugfix mjpeg camera (#5539) 2017-01-24 20:25:51 +01:00
Marcelo Moreira de Mello ab19577322 Bump amcrest version and refactored to simplify code (#5499)
* Bumped version to Amcrest 1.1.3 and rebase self.base_url()

* Refactored amcrest camera and amcrest sensor to simply object reference
2017-01-22 14:22:25 +01:00
Pascal Vizeli b2203f7f41 [ffmpeg] Use new 1.0 version / migrate all asyncio (#5464)
* [ffmpeg] Use new 1.0 version / migrate all asyncio

* fix lint

* fix import

* Add new service to binary_sensors

* fix lint
2017-01-20 21:56:22 -08:00
Pascal Vizeli 3da25c227f lint v2 (#5444) 2017-01-19 19:33:15 +01:00
Pascal Vizeli 11083cf04b Fix lint (#5443) 2017-01-19 19:18:32 +01:00
Pascal Vizeli 8da398c0bd Proxy aiohttp websession / more rebust. (#5419) 2017-01-19 09:55:27 -08:00
Pascal Vizeli 9799631797 [camera/mjpeg] Support still image for thumbmail (#5440) 2017-01-19 09:53:08 -08:00
Giel Janssens c72f8b1a06 Netatmo Presence (#5122)
* Netatmo Presence

* Travis

* Remove def camera_stream
2017-01-16 23:10:18 -08:00
Marcelo Moreira de Mello b915cf776b Introduced Amcrest camera sensors and bump Amcrest module version (#5310)
* Introduced Amcrest camera sensors

* Makes script/gen_requirements_all.py happy

* Bump Amcrest version across all components

* - Adjusted scan_interval to 10 seconds

- Filtering HTTPError and ConnectTimeout exceptions

- Removed @Throttle decorator
2017-01-16 22:57:25 -08:00
Colin O'Dell 8200827a19 Add support for direct MJPEG streams from Amcrest cameras (#5217)
* Add support for direct MJPEG streams from Amcrest cameras

The previous implementation relied on using snapshots from the camera. However,
some Amcrest models cannot keep up with the large number of requests and
instead timeout, resulting in no video stream. These cameras do provide MJPEG
streams though, so this commit adds the option to use these instead of creating
one from snapshots.

Unfortunately, some cameras on newer firmwares do not support MJPEG streams at
high resolution - only at low resolution.

By providing users with both a `resolution` and `stream_source` option, we can
allow them to choose whichever combination works for their particular model
and firmware version.

* Close the stream instead of releasing it

* Close stream without creating a task

* Handle client aborts

* fix lint
2017-01-15 20:37:24 +01:00
Pascal Vizeli c458ee29f2 Rename log message / handle cancellederror on image proxy (#5331) 2017-01-15 08:35:58 -08:00
Pascal Vizeli b817c7d0c2 Bugfix camera fake image (#5314)
* Bugfix camera fake image

* add logger
2017-01-14 11:53:00 +01:00
Pascal Vizeli c2492d1493 Component "Image processing" (#5166)
* Init new component for image processing.

* Add demo platform

* address comments

* add unittest v1 for demo

* Add unittest for alpr

* Add openalpr local test

* Add openalpr cloud platform

* Add unittest openalpr cloud platform

* Update stale docstring

* Address paulus comments

* Update stale docstring

* Add coro to function

* Add coro to cloud
2017-01-14 08:18:03 +01:00
Pascal Vizeli 4b43537801 Bugfix camera streams (#5306)
* fix mjpeg streams

* fix trow error on close by frontend

* fix ffmpeg
2017-01-13 15:57:38 -08:00
Valentin Alexeev f75e13f55e Use SHA hash to make token harder to guess (#5258)
* Use SHA hash to make token harder to guess

Use hashlib SHA256 to encode object id instead of using it directly.

* Cache access token

Instead of generating a token on the fly cache it in the constructor.

* Fix lint
2017-01-10 16:01:04 +01:00
St. John Johnson 9fdefa5a1d Fix #5188 by Closing the stream instead of Releasing it (#5235)
* Fix #5188 by Closing the stream instead of Releasing it

Closing just terminates the connection, release attempts to download all the contents before closing.  Since the MJPEG stream is infinite, it loads and loads content until the python script runs out of memory.

Source: 50b1d30f41/aiohttp/client_reqrep.py (L668-L672)

* Update mjpeg.py
2017-01-09 10:35:38 +01:00
Pascal Vizeli 1719d88602 Bugfix default values to timedelta (#5193)
* Bugfix default values to timedelta

* fix unittests
2017-01-06 00:16:12 +01:00
Dan Smith 6ed3c69604 Bump uvcclient to 0.10.0 (#5175)
This brings fixes for newer versions of unifi-video and a few
fixes.
2017-01-04 19:55:16 +01:00
Pascal Vizeli 244cdf43d0 Async reduce coro (#5001)
* Asyncio coro reduce

* Replace comments
2016-12-26 14:10:23 +01:00
Josh Nichols 6c50f53696 Nest fixes (#5011)
* Updated Nest API to have logical names

* Fix NoneType not having replace method in NestSensor constructor

* Move name setting to constructor, in case zone.name causes IO.

* normalize is_online to online

* Updated python-nest API

* push is_* helpers down to python-nest, and use inheritence to implement rather than checking class name

* Update python-nest
2016-12-22 20:22:07 +01:00
Daniel Høyer Iversen be552a59c9 Bug in rpi_camera 2016-12-14 18:45:05 +01:00
Marcelo Moreira de Mello 3467020dbf Added resolution support to Amcrest cameras (#4860)
* Added resolution support to Amcrest cameras

* Ordered alphabetically DEFAULT_ options
2016-12-11 21:46:19 -08:00
Josh Nichols 64b1179c13 Make sure all nest platforms require discovery info (#4734) 2016-12-04 14:33:50 -08:00
Fabian Affolter dddf4d1460 Style 0.34 (#4689)
* Minor style updates

* Minor style updates

* Update validation and logger messages

* Update ordering

* Fix lint issue

* Fix line too long

* Update ordering

* update logger messages
2016-12-03 20:46:04 +01:00
Marcelo Moreira de Mello 9c6609cb79 Added support to Amcrest camera (#4573)
* Introduced support to Amcrest IP Cameras

* Fixed lint issues

* Fixed requirements test

* * Implemented test to verify crendentials during camera setup

* Added persistent_notification in case of error when during Amcrest setup
2016-11-30 13:07:17 -08:00
Paulus Schoutsen e5504b39ec Close aiohttp responses (#4624)
* Close aiohttp responses

* Update generic.py
2016-11-30 13:05:58 -08:00
Pascal Vizeli cf57db919e Refactory aiohttp clientsession handling in HA (#4602)
* Refactory aiohttp clientsession handling in HA

* remove from core / update platforms / rename file
2016-11-27 16:26:46 -08:00
Josh Nichols 84b12ab007 Nest Cam support (#4292)
* start nestcam support

* start nestcam support

* introduce a access_token_cache_file

* Bare minimum to get nest thermostat loading

* occaisonally the image works

* switch to nest-aware interval for testing

* Add Nest Aware awareness

* remove duplicate error logging line

* Fix nest protect support

* address baloobot

* fix copy pasta

* fix more baloobot

* last baloobot thing for now?

* Use streaming status to determine online or not. online from nest means its on the network

* Fix temperature scale for climate

* Add support for eco mode

* Fix auto mode for nest climate

* update update current_operation and set_operation mode to use constant when possible. try to get setting something working

* remove stale comment

* unused-argument already disabled globally

* Add eco to the end, instead of after off

* Simplify conditional when the hass mode is the same as the nest one

* away_temperature became eco_temperature, and works with eco mode

* Update min/max temp based on locked temperature

* Forgot to set locked stuff during construction

* Cache image instead of throttling (which returns none), respect NestAware subscription

* Fix _time_between_snapshots before the first update

* WIP pin authorization

* Add some more logging

* Working configurator, woo. Fix some hound errors

* Updated pin workflow

* Deprecate more sensors

* Don't update during access of name

* Don't update during access of name

* Add camera brand

* Fix up some syntastic errors

* Fix ups ome hound errors

* Maybe fix some more?

* Move snapshot simulator url checking down into python-nest

* Rename _ready_to_update_camera_image to _ready_for_snapshot

* More fixes

* Set the next time a snapshot can be taken when one is taken to simplify logic

* Add a FIXME about update not getting called

* Call update during constructor, so values get set at least once

* Fix up names

* Remove todo about eco, since that's pretty nest

* thanks hound

* Fix temperature being off for farenheight.

* Fix some lint errors, which includes using a git version of python-nest with updated code

* generate requirements_all.py

* fix pylint

* Update nestcam before adding

* Fix polling of NestCamera

* Lint
2016-11-27 16:18:47 -08:00
Paulus Schoutsen 32ffd006fa Reorganize HTTP component (#4575)
* Move HTTP to own folder

* Break HTTP into middlewares

* Lint

* Split tests per middleware

* Clean up HTTP tests

* Make HomeAssistantViews more stateless

* Lint

* Make HTTP setup async
2016-11-25 13:04:06 -08:00
Pascal Vizeli 3d47ad5018 Use hass aiohttp connector for ssl connection (#4344) 2016-11-12 16:00:31 -08:00
Johann Kellerman 9bb94a4512 Improve async generic camera's error handling (#4316)
* Handle errors

* Feedback

* DisconnectedError
2016-11-10 21:28:22 -08:00
Pascal Vizeli 844799a1f7 Synology SSL fix & Error handling (#4325)
* Synology SSL fix & Error handling

* change handling for cookies/ssl

* fix use not deprecated functions

* fix lint

* change verify

* fix connector close to coro

* fix force close

* not needed since websession close connector too

* fix params

* fix lint
2016-11-10 21:04:47 -08:00
Pascal Vizeli 2e0c185740 Async cleanup part 3 (#4302) 2016-11-07 22:31:40 -08:00
Paulus Schoutsen 880ef8af48 Remove broken disable verify ssl synology (#4269) 2016-11-06 22:17:56 -08:00
Paulus Schoutsen a343c20404 Async gather wait (#4247)
* Fix config validation for input_*, script

* Allow scheduling coroutines

* Validate entity ids when entity ids set by platform

* Async: gather -> wait

* Script/Group: use async_add_job instead of create_task
2016-11-06 09:26:40 -08:00
Paulus Schoutsen 22c3d014aa Remove chunked encoding (#4230) 2016-11-05 15:29:22 -07:00
jgriff2 a01939c6e9 Fix Synology Camera SSL certificate option (#4201) [BREAKING CHANGE]
* Fix Synology SSL config

* Revert "Fix Synology SSL config"

This reverts commit b8dc2a92abee6249b3dd42c99d0786820ebbeb72.

* Revert "Fix Synology SSL config"

This reverts commit 805e87f3af300a1b7627bb5df0792285fcf38901.

* Fix Synology SSL config
2016-11-03 18:41:32 -07:00
Paulus Schoutsen ee5f228309 Make services yield (#4187)
* Make services yield

* Disable pylint abstract-method check

* add input_select

* add input_slider

* change to async vers.

* fix lint

* yield on add_entities as other components does
2016-11-03 18:32:14 -07:00
Fabian Affolter be272ac64a Disable too-many-* (#4107)
* Disable too-many-* and too-few-public-methods

* Remove globally disabled pylint warnings
2016-10-30 22:18:53 +01:00
Pascal Vizeli edeb31d74e Fix bug with aioHTTP and none authentification (#4116) 2016-10-29 22:47:46 +02:00
Pascal Vizeli 66541a6a19 Update ha-ffmpeg to version 0.15 (#4096) 2016-10-29 00:12:53 +02:00
Pascal Vizeli 3324995e70 Async clientsession / fix stuff on aiohttp and camera platform (#4084)
* add websession

* convert to websession

* convert camera to async

* fix lint

* fix spell

* add import

* create task to loop

* fix test

* update aiohttp

* fix tests part 2

* Update aiohttp.py
2016-10-27 21:40:10 -07:00
Pierre Ståhl 235e1a0885 Minor improvements to RPi camera platform (#4059)
* Try to create output file instead of checking write permissions

* Kill raspistill process during shutdown
2016-10-26 23:51:13 -07:00
Paulus Schoutsen 519d9f2fd0 async HTTP component (#3914)
* Migrate WSGI to asyncio

* Rename wsgi -> http

* Python 3.4 compat

* Move linting to Python 3.4

* lint

* Lint

* Fix Python 3.4 mock_open + binary data

* Surpress logging aiohttp.access

* Spelling

* Sending files is a coroutine

* More callback annotations and naming fixes

* Fix ios
2016-10-23 23:48:01 -07:00
John Arild Berentsen 678f30def1 Prevent Verisure cam to delete a file when it is None (#3988) 2016-10-22 21:01:12 +02:00
John Arild Berentsen 54a64fb8d9 Add support for verisure file camera. (#3952) 2016-10-21 22:41:17 +02:00
Hugo Dupras 9a0bb62654 Hotfix for Netatmo discovery (#3837)
This should definetly fix #2601

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>
2016-10-13 09:21:22 -07:00
jgriff2 e1647fb6ac Add synology ss cameras (#3626)
* Add files via upload

* Update .coveragerc

* test

* Update synology camera

* Use voluptuous for synology

* Use voluptuous for synology

* Use voluptuous for synology

* Use voluptuous for synology

* Conform synology to flake8

* Added Whitelist to synology

* Sync to dev branch

* Added helper function to synology
2016-10-13 08:49:58 -07:00
Hugo Dupras 1d0df63615 Netatmo binary sensor (#3455)
* Basic support for Netatmo welcome binary sensors

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Bug fixes and optimization for Netatmo devices

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* pylint fixes

* Bug Fixing and optimization for Netatmo devices

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>

* Add unique_id for cameras to avoid duplicate
And global config to disable discovery for netatmo devices

Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>
2016-10-09 08:45:12 -07:00
Hugo Dupras dd551cf056 Netatmo: Hotfix for hass 0.29 (#3576)
Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>
2016-09-29 07:45:54 -07:00
Paulus Schoutsen 00e298206e Optimize template 2 (#3521)
* Enforce compiling templates

* Refactor templates

* Add template validator to Logbook service

* Some more fixes

* Lint

* Allow easy skipping of rfxtrx tests

* Fix template bug in AND & OR conditions

* add entities extractor

Conflicts:
	tests/helpers/test_template.py

* fix unittest

* Convert template to be async

* Fix Farcy

* Lint fix

* Limit template updates to related entities

* Make template automation async
2016-09-27 21:29:55 -07:00
Paulus Schoutsen 0c0feda834 Pre-compile templates (#3515)
* Pre-compile templates

* Compile templates in numeric_state condition
2016-09-25 13:33:01 -07:00
Paulus Schoutsen da8994e4b5 Migrate camera.uvc to voluptuous (#3440) 2016-09-18 14:22:32 -07:00
Pascal Vizeli 07a92e8ac3 Split ffmpeg to compoment (#3396)
Add an optional extended description…
2016-09-15 14:35:40 +02:00
Pascal Vizeli a9ef8d8568 Update ha-ffmpeg version 0.12 and add tests (#3301)
* update ha-ffmpeg version 0.12 and add tests

* change error logging
2016-09-12 22:52:49 +02:00
Pascal Vizeli 165871d48a update ffmpeg version to 0.10 add get image to camera (#3235) 2016-09-06 18:24:11 -07:00
Pascal Vizeli cf9b49ac03 update ha-ffmpeg version to 0.9 (#3059) 2016-08-30 20:58:37 +02:00
Fabian Affolter a4b90c9879 Use voluptuous for Raspberry Pi and local file camera (#2988)
* Migrate to voluptuous

* Update const.py

* Migrate to voluptuous

* Remove duplicate _LOGGER entry
2016-08-27 14:44:22 -06:00
Fabian Affolter 2accc15d41 Migrate to voluptuous (#2991)
🐬
2016-08-27 14:43:33 -06:00
Fabian Affolter e6b9d5f5b3 Migrate to voluptuous (#2989)
🍪 🐬
2016-08-27 14:42:34 -06:00
Fabian Affolter 5cc672ea59 Migrate to voluptuous (#2990)
🐬
2016-08-26 14:50:32 -06:00
Pascal Vizeli 9ab2ac766e add motion sensor / rewrite ffmpeg binary sensor (#2969)
🐬 

* use const flags
2016-08-26 06:48:17 -06:00
Pascal Vizeli c5fd665151 add ffmpeg noise detection sensor (#2950) 2016-08-23 19:08:20 -07:00
Paulus Schoutsen aa6a0523ef Add template support to generic camera + local file tests (#2881)
* Add template support to generic camera

* Add tests for local file
2016-08-20 23:04:55 -07:00
Matthias Grawinkel 8a3c511a04 Adding Digest Auth for webcam image retrieval (#2821)
* Adding Digest Auth for webcam image retrieval

* Update generic.py

* Update mjpeg.py

* Update generic.py

* Update mjpeg.py

* Update generic.py

* Update mjpeg.py
2016-08-17 19:08:47 +02:00
Fabian Affolter a784f48022 Minor changes (#2784)
* Update link to docs

* Use fast.com

* Update docstring

* Add link to docs

* Add link to docs

* Update docstrings

* Update docstrings

* Fix typo
2016-08-11 11:14:24 +02:00
Pascal Vizeli 98c77dc08f Add ffmpeg camera platform support (#2755) 2016-08-08 17:34:46 -07:00
Fabian Affolter bef2f87ddc Docstrings (#2502)
* Update docstrings

* Update docstrings

* Add link to docs
2016-07-12 16:46:29 +02:00
Paulus Schoutsen 31b8e49ad2 Fix PyLint 1.6 issues (#2471) 2016-07-07 18:54:16 -07:00
Paulus Schoutsen d1f4901d53 Migrate to cherrypy wsgi from eventlet (#2387) 2016-06-30 09:02:12 -07:00
Fabian Affolter 419ff18afb Docstrings (#2395)
* Replace switch with lock

* Update docstrings

* Add link to docs

* Add link to docs and update docstrings

* Update docstring

* Update docstrings and fix typos

* Add link to docs

* Add link to docs

* Add link to docs and update docstrings

* Fix link to docs and update docstrings

* Remove blank line

* Add link to docs
2016-06-30 10:33:34 +02:00
Paulus Schoutsen a80a74b586 Add camera timeouts 2016-06-18 13:06:14 -07:00
Paulus Schoutsen 2508e9f9ff Add timeout to mjpeg streams 2016-06-18 12:34:39 -07:00
Landrash c7ee74a573 Local file - Camera platform (#2282) 2016-06-12 16:26:29 -07:00
St. John Johnson 3723c3a7e8 Fixing MJPEG streaming in Werkzeug by taking advantage of `direct_passthrough` (#2277) 2016-06-11 20:50:10 -07:00
Paulus Schoutsen 30f74bb3ca Migrate to generic discovery method (#2271)
* Migrate to generic discovery method

* Add tests for discovery
2016-06-11 17:43:13 -07:00
Hugo Dupras 213a738240 Add Netatmo component and add support for Netatmo Welcome Camera (#2233)
* Introducing the Netatmo component

As Netatmo is providing several type of device (sensor, camera), a new Netatmo
component needs to be created in order to centralize the Netatmo login data.
Currently this change only impacts the Netatmo Weather station

* Add new Netatmo library

This new API will provide access to the Welcome Camera

* Basic support for Netatmo Welcome camera

This change introduces support for Netatmo Welcome camera. Currently, it will
add all detected camera to Home Assistant, camera filtering (similar to the one
used for weather station modules) will be added later

* Remove useless REQUIREMENTS

* Fixes for Netatmo Welcome support

* Allow to filter Welcome cameras by name and/or home

* Update requirements for Netatmo components

* Fix multi-camera support for Welcome

* Fix pep8 error/warning

* This commit also adds improved logging for bad credentials

* Add Throttle decorator for Welcome update function

As the update function updates the data for all cameras, we should prevent this
function to be called several time during an interval
2016-06-09 23:31:36 -07:00
Dan Smith 49de55e75b Add support for UniFi Video >= 3.2.0
Unfortunately, Ubiquiti changed their (supposedly versioned) API in
3.2.0 which causes us to have to refer to cameras by id instead of
UUID. The firmware for 3.2.x also changed the on-camera login procedures
and snapshot functionality significantly.

This bumps the requirement for uvcclient to 0.9.0, which supports the
newer API and makes the tweaks necessary to interact properly.
2016-06-06 20:28:52 -07:00
Paulus Schoutsen cd87c40bbf Update frontend 2016-05-27 01:29:48 -07:00
Paulus Schoutsen fe794d7fd8 Access camera images using access token 2016-05-21 15:01:34 -07:00
Paulus Schoutsen 5aa0158761 Add url validators 2016-05-21 15:01:34 -07:00
Paulus Schoutsen 4d7555957c Fix camera 2016-05-21 15:01:34 -07:00
Paulus Schoutsen 15e329a588 Tons of fixes - WIP 2016-05-21 15:01:33 -07:00
Paulus Schoutsen 5baa98b79f Add initial config validation 2016-03-28 23:46:12 -07:00
Paulus Schoutsen e989c8a24a Merge pull request #1624 from balloob/http-11
Use HTTP 1.1
2016-03-27 23:21:52 -07:00
Paulus Schoutsen 7cb69ae9d9 Make sure we always sent content-length header 2016-03-27 12:15:41 -07:00
Luca Soldi d0503cc021 Add feature
√ add file_path config
√ changed subprocess call
2016-03-27 20:49:04 +02:00
Luca Soldi 65ef836313 Check raspistill exisance and check parameters in setup_platform 2016-03-22 22:35:09 +01:00
Luca Soldi bf915cf3b4 Added Raspberry Pi Camera Component 2016-03-22 08:33:56 +01:00
Fabian Affolter cd5b5c55e2 Fix PEP257 issues 2016-03-07 20:29:54 +01:00
Fabian Affolter 032f06e015 Modify docstrings to match PEP257 2016-03-07 18:50:30 +01:00
Paulus Schoutsen 57ac6cd76f Merge branch 'extract-entity-picture' into dev
Conflicts:
	homeassistant/components/sensor/steam_online.py
2016-02-24 22:00:58 -08:00
Fabian Affolter 4563c54a3e Add link to docs and modify docstrings to match PEP257 2016-02-24 10:38:06 +01:00
Paulus Schoutsen 967a751da1 Add entity_picture property 2016-02-23 22:41:24 -08:00
Dan Smith 05a1e11db2 Filter out AirCam models in UVC camera platform
The older (unsupported AirCam) models behave differently and also apparently
suffer some under the last release of the NVR that supported them. Since they
are EOL and not supported by current software, filter them out so we don't
break while trying to extract an image from them.
2016-02-23 12:01:51 -08:00
Dan Smith 590512916a Add tests for camera.uvc and fix bugs found in the process
This adds tests for the uvc camera module. It's a good thing too,
because I found a few bugs which are fixed here as well:

 - Graceful handling of non-integer port
 - Failure to take the first host that works when probing host,internalHost
 - Failure to detect if neither of them actually work

This also converts the code to only call add_devices once with a listcomp.
2016-02-22 14:37:57 -08:00
Dan Smith d398832112 Make UVC cameras honor the local camera password store, if set
The NVR tells us the admin username, but not the password for the
camera. Right now, we assume the default password, which obviously
doesn't work for people that have changed it. The uvcclient library
provides a way to set the cached admin password for a camera, which
is stored in a client-specific location. We can utilize that to
grab the password, falling back to the default if it's unset. With
this, people just need to run a command per camera to set the
admin password on their systems, if it has changed.
2016-02-22 13:17:53 -08:00
Paulus Schoutsen fb9d8c79b5 Bloomsky main component to load its platforms 2016-02-19 23:22:23 -08:00
Paulus Schoutsen e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Paulus Schoutsen 30e1569b21 Fix bloomsky component importing 2016-02-18 13:10:25 -08:00
Paulus Schoutsen aea0598805 Clean up camera component 2016-02-16 23:52:05 -08:00
Dan Smith 885b61a750 Implement brand and model for UVC cameras 2016-02-14 17:27:29 +00:00
Dan Smith 0ba7fb40a4 Improve UVC performance by not logging in on each image fetch
This makes the UVC camera_image() method not log into the camera on
every single image fetch, which reduces load on hass and the camera,
and lowers the latency to get an actual image fetched.
2016-02-14 17:27:29 +00:00
Dan Smith 263839a336 Handle connection errors talking to UVC cameras during image fetch
This requires uvcclient==0.6 which breaks out exceptions for us.

Fixes #1244
2016-02-14 17:27:26 +00:00
Paulus Schoutsen 2e164e519a Merge pull request #1160 from stjohnjohnson/live-camera-stream
Fixes #1062 - If supported, directly stream the MJPEG from the remote camera
2016-02-07 14:43:00 -08:00
St. John Johnson f700635445 Add support for mjpeg component to proxy it's own stream 2016-02-07 12:02:52 -08:00
Fabian Affolter 757946293e Move configuration details to docs 2016-02-07 11:52:17 +01:00
Paulus Schoutsen 7eef831ff3 Merge pull request #1141 from kk7ds/add-uvc-cameras
Add Ubiquiti Unifi Video Camera support
2016-02-06 18:21:44 -08:00
Dan Smith cab1100a51 Add Ubiquiti Unifi Video Camera support
This adds support for Ubiquiti's UniFi Video cameras via their
NVR device (or service). By configuring just the address of the
NVR and a valid API key, all cameras are discovered and enabled,
including direct-to-camera image snapshot-based video support.
2016-02-06 22:57:44 +00:00
Fabian Affolter 614034d196 Update docstrings 2016-02-06 08:23:30 +01:00
Harald Nagel b6a32098d1 Add BloomSky weather station support 2016-02-06 01:37:32 +00:00
Paulus Schoutsen 7ba9fb90f1 More PyLint fixes 2015-11-29 14:04:44 -08:00
Paulus Schoutsen a301d869d7 PyLint 1.5 fixes 2015-11-29 13:49:05 -08:00
Paulus Schoutsen 70698f7ab0 Update demo camera images 2015-11-28 23:16:20 -08:00
Paulus Schoutsen 546377e80a Throttle camera stream to 2fps 2015-11-28 18:59:59 -08:00
Fabian Affolter ca32c81612 Camera demo 2015-11-19 19:27:28 +01:00
Fabian Affolter ab9e173179 Update docstrings 2015-11-18 08:42:49 +01:00
Nolan Gilley df264f2ec0 remove unnecessary else 2015-11-14 15:49:39 -05:00
Nolan Gilley 9acb341b96 remove break 2015-11-14 10:51:07 -05:00
Nolan Gilley 85e0db6ade add exception handling to generic camera requests function. 2015-11-13 13:55:22 -05:00
Fabian Affolter 97f9f8aa49 Update link to docs (Jekyll 3 update) 2015-11-09 13:12:18 +01:00
Ryan Turner a36b315927 Fixed indentations hopefully 2015-11-09 00:11:11 -06:00
Ryan Turner f3352546c6 More lint fixes 2015-11-09 00:00:31 -06:00
Ryan Turner 3a6aa8f3d1 Fixed line length issues to make lint happy. Still bummed that I decreased test coverage :( 2015-11-08 23:51:01 -06:00
Ryan Turner dfa81b0117 Changed camera.mjpeg to use Response and Closing; cleaned up a number of code-clarity issues near that 2015-11-08 23:41:21 -06:00
Ryan Turner 8541fdb112 Fixed style issue related to failing build 2015-11-08 22:26:27 -06:00
Ryan Turner e078ab53ca Initial implementation of mjpeg camera 2015-11-08 22:15:06 -06:00
Jeff Schroeder 0f292e8fa6 Remove unused import for re 2015-11-08 20:37:29 -06:00
Jeff Schroeder 137cadb59c Make a single request to get the foscam camera image
This uses the `snapPicture2` command, which is documented in their
cgi sdk to return raw jpeg data instead of html containing the image
2015-11-07 20:18:46 -06:00
Fabian Affolter 0874cb364f Move configuration details to docs 2015-10-13 21:00:44 +02:00
Fabian Affolter 44418b509c Move configuration details to docs 2015-10-13 21:00:28 +02:00
Fabian Affolter e90dbad37e Update docstrings 2015-09-17 08:34:10 +02:00
Paulus Schoutsen 6de04d78ed Merge pull request #381 from heathbar/foscam-support
Foscam support
2015-09-15 23:37:33 -07:00
Heath Paddock 98feb3cd93 Fixed pylint errors 2015-09-16 00:40:51 -05:00
Heath Paddock 3dcd18af9e Fixed flake8 errors 2015-09-16 00:09:16 -05:00
Heath Paddock 2fd7b98cab minor code cleanup 2015-09-15 23:45:12 -05:00
Heath Paddock 90e21791f6 Removed obsolete code 2015-09-15 23:39:03 -05:00
Heath Paddock 9678613a13 foscam: made 'port' configurable and added additional documentation 2015-09-15 23:32:55 -05:00
Heath Paddock 5de89316b2 Initial implementation of Foscam FI9821W support 2015-09-15 22:58:46 -05:00
Fabian Affolter e196c136c1 Update docstring (config file) and attempt to honor PEP0257 2015-09-07 18:38:49 +02:00
Paulus Schoutsen c4a4aceeeb Frontend: Minor UI tweaks for Camera 2015-07-11 11:55:25 -07:00
Paulus Schoutsen 2cbfc60679 Add camera to demo 2015-07-10 23:24:05 -07:00
Paulus Schoutsen aec25c88b4 Clean up camera component 2015-07-10 23:17:12 -07:00
jamespcole bf2b06880e Fixed some linting errors 2015-07-10 20:10:23 +10:00
jamespcole 0ca836d7ed Another frontend rebuild 2015-07-10 19:42:22 +10:00
jamespcole c231a349c7 Updates from pull request feedback 2015-07-10 18:03:46 +10:00
jamespcole 7a4d40a8fd Fixed some linting errors 2015-06-05 23:04:52 +10:00
jamespcole aaf0ca2105 Very simple IP Camera support 2015-06-05 22:51:29 +10:00