Commit Graph

275 Commits (c77d013f430b25b131843d7a72c75d6fb8aa8831)

Author SHA1 Message Date
jmtatsch 703eea0c93 Enable autodiscovery for mqtt cameras (#13697)
* Enable autodiscovery for mqtt cameras, BREAKING CHANGE: homogenisation topic->state_topic

* fix line too long

* fix topic->state_topic in test

* image shall not be the state of entity
2018-04-06 00:11:38 -04:00
Jerad Meisner 8852e52601 Switched to async/await. Bumped pyxeoma version (#13404) 2018-03-23 10:22:01 -07:00
karlkar b1079cb493 Fix for not setting up the camera if it is offline during setup phase (#13082)
* Fix for not setting up the camera if it is offline during setup phase

* async/await and modified service creation

* Properly handle not supported PTZ

* setup platform made synchronous as ONVIFService constructors do I/O

* Fix intendation issue
2018-03-15 20:30:41 -07:00
PhracturedBlue 223bc187dc More robust MJPEG parser. Fixes #13138. (#13226)
* More robust MJPEG parser. Fixes ##13138.

* Reimplement image extraction from mjpeg without ascy generator to support python 3.5
2018-03-14 21:44:13 -07:00
Joe Lu dff4f6ce48 Integrated with py-synology:0.2.0 which has fix to auto-renew session when it's expired (#13079) 2018-03-11 12:33:36 -07:00
Paulus Schoutsen d0f089975d
Run asyncio event loop in debug mode during tests (#13058)
* Run asyncio event loop in debug mode during tests

* Remove debug mode again
2018-03-11 12:32:12 -07:00
Matthias Urlichs f5cc40024d Rename homeassistant.util.async to .async_ (#13088)
"async" is (going to be) a reserved word.
2018-03-11 10:01:12 -07:00
PhracturedBlue c5228cbc64 Add camera proxy (#12006)
* Add camera proxy

* Fix additional tox linting issues

* Trivial cleanup

* update to new async/await methods rather than decorators.  Other minor fixes from code review
2018-03-08 18:23:52 -08:00
Michael Pusterhofer 9086119082 Add add_devices back to rpi_camera (#12947)
* Add add_devices back to rpi_camera
2018-03-06 21:44:37 +02:00
karlkar 78c27b99bd Added support for multiple onvif profiles (#11651)
* Added support for multiple profiles

* Removed attributes, setup made synchronous, as it performs I/O
2018-03-05 19:56:15 -08:00
Paulus Schoutsen 6a5c7ef43f
Upgrade to aiohttp 3 (#12921)
* Upgrade aiohttp to 3.0.6

* Fix tests

* Fix aiohttp client stream test

* Lint

* Remove drain
2018-03-05 13:28:41 -08:00
Aaron Bach c5157c1027 Update Yi platform to make use of async/await (#12713) 2018-02-27 18:06:45 -08:00
karlkar 2280dc2a34 Support for PTZ in Onvif cameras (#11630)
* Service PTZ added

* Removed description loading during setup

* Fixed hound issues

* Changed attribute names

* Fixed pylint error

* Cleaning up the code

* Changed access to protected member to dict

* Removed new line added by mistake

* Fixed pylint error

* Fixed minors

* Fixed pylint caused by usage of create_type function

* Code made more concise

* Fixed string intendation problem

* Service name changed

* Update code to fit with the new version

* Set ptz to None if PTZ setup failed

* more precise exception used
2018-02-18 08:08:56 -08:00
Joe Lu a8444b22e7 Support for August doorbell (#11124)
* Add support for August doorbell

* Address PR comment for August platform

* Address PR comment for August binary sensor

* Address PR comment for August camera

* Addressed PR comment for August lock

* - Fixed houndci-bot error

* - Updated configurator description

* - Fixed stale docstring

* Added august module to .coveragerc
2018-02-18 09:24:51 +01:00
Sergio Viudes 8840c227d2 Added doorbird_last_motion to DoorBird camera platform (#12457) 2018-02-17 21:12:11 -08:00
Matthew Hilton 66dcb6c947 ONVIF Camera added Error handling and rtsp authentication. (#11129)
Bugfixes for several issues with hass.io and non-venv installations

Added passing of credentials to RTSP stream

Changed from ONVIFService to ONVIFCamera as ONVIFService didn't contain
the same error handling.

Changed method to get Stream URL from camera to a more compatible method

Added extra Error handling
2018-02-17 08:57:05 -05:00
Paulus Schoutsen 3fd61d8f45 Update voluputous (#12463)
* Update voluputous

* Fix http config

* Fix optional with default=None

* Optional, default=none

* Fix defaults in voluptuous schemas

* Fix tests

* Fix update error

* Lint
2018-02-17 10:29:14 +01:00
Frederik Bolding 6500cb7915 File Path fixes for RPi Camera (#12338)
* Checked file path with is_allowed_path() for RPi Camera

* Used cv.isfile to verify file path instead of manual checks

* Changed default file path for RPiCamera to config_dir/image.jpg

* Used tempfiles for storing RPi Camera images, if no other path is defined

* Stopped checking for whitelisted paths on temporary files
2018-02-13 23:07:50 -08:00
Paulus Schoutsen 7e9dcfa4c9
Revert #12316 (#12329) 2018-02-11 20:33:08 -08:00
Paulus Schoutsen 2e3524147c
Remove unique ID from netatmo (#12317)
* Remove unique ID from netatmo

* Shame platform in error message
2018-02-11 19:33:37 -08:00
Paulus Schoutsen 3e150bb2b3 Protect bloomsky platform setup (#12316) 2018-02-11 22:49:16 +01:00
Otto Winter 678f284015 Upgrade pylint to 1.8.2 (#12274)
* Upgrade pylint to 1.8.1

* Fix no-else-return

* Fix bad-whitespace

* Fix too-many-nested-blocks

* Fix raising-format-tuple

See https://github.com/PyCQA/pylint/blob/master/doc/whatsnew/1.8.rst

* Fix len-as-condition

* Fix logging-not-lazy

Not sure about that TEMP_CELSIUS though, but internally it's probably just like if you concatenated any other (variable) string

* Fix stop-iteration-return

* Fix useless-super-delegation

* Fix trailing-comma-tuple

Both of these seem to simply be bugs:
 * Nest: The value of self._humidity never seems to be used anywhere
 * Dovado: The called API method seems to expect a "normal" number

* Fix redefined-argument-from-local

* Fix consider-using-enumerate

* Fix wrong-import-order

* Fix arguments-differ

* Fix missed no-else-return

* Fix no-member and related

* Fix signatures-differ

* Revert "Upgrade pylint to 1.8.1"

This reverts commit af78aa00f125a7d34add97b9d50c14db48412211.

* Fix arguments-differ

* except for device_tracker

* Cleanup

* Fix test using positional argument

* Fix line too long

I forgot to run flake8 - shame on me... 🙃

* Fix bad-option-value for 1.6.5

* Fix arguments-differ for device_tracker

* Upgrade pylint to 1.8.2

* 👕 Fix missed no-member
2018-02-11 09:20:28 -08:00
Otto Winter 2ae0c5653e Fix source code using Windows newline (#12248)
* 🚜 Fix usage of carriage return

* 🤝 Rebase and repeat

* 🚜 Fix file permissions
2018-02-09 08:11:47 +01:00
Jerad Meisner a2916a9c47 Fix Xeoma camera platform to allow different admin/viewer credentials (#12161) 2018-02-06 10:47:38 -08:00
Joe Lu e35d4f0a2c Canary live stream (#11949)
* Added support for Canary live stream view

* Updated requirements

* - Fixed lint error

* Addressed PR comment

* - Disabled polling for Canary camera as suggested in PR comment
- Live session is now renewed every time camera is retrieved and min time between session renewal is 90 seconds
2018-02-05 14:02:43 +01:00
Paulus Schoutsen e51427b284 Entity registry (#11979)
* Entity#unique_id defaults to None

* Initial commit entity registry

* Clean up unique_id property

* Lint

* Add tests to entity component

* Lint

* Restore some unique ids

* Spelling

* Remove use of IP address for unique ID

* Add tests

* Add tests

* Fix tests

* Add some docs

* Add one more test

* Fix new test…
2018-01-30 10:39:39 +01:00
Otto Winter 8dcfd35b8b Spelling fixes (#12041)
* Spelling fixes

*Lots* of them.

* Spelling breaking changes

* Fix lint errors
2018-01-29 23:37:19 +01:00
Emil Stjerneman 3c869c6ed6 Fix 11982 - uvc don't handle null as username (#11984) 2018-01-28 10:50:23 +01:00
Ville Skyttä 55ee8959ba Spelling fixes (#11940) 2018-01-27 11:58:27 -08:00
Jerad Meisner 94e270f828 Added Xeoma camera platform (#11619)
* Added Xeoma camera platform

* Switch to dict.get() for optional config values with no default

* Minor changes
2018-01-25 23:48:38 +01:00
i-am-shodan 502ebd2a31 Improve foscam library exception support (#11701)
* Improve foscam library exception support

Catches foscam exceptions that otherwise pollute the log. Many of these exception can safely be ignored

* Fixed line length

Fixed line length

* Changed exception and log handling

changed logging and catched only the TypeError effecting the library

* Removed unused var

Removed var

* Fix remaining issue
2018-01-25 23:47:53 +01:00
Paulus Schoutsen 183e0543b4
Clean up entity component (#11691)
* Clean up entity component

* Lint

* List -> Tuple

* Add Entity.async_remove back

* Unflake setting up group test
2018-01-22 22:54:41 -08:00
Fabian Affolter 47e31dc9ee Fixes for PEP257 (#11810)
* Fixes for PEP257

* More updates
2018-01-20 22:35:38 -08:00
karlkar 7617b8af52 Fix for None object access attempt (#11748)
* Fix NoneType access error

* Update lib dependencies

* Fix for line length
2018-01-17 21:10:15 -08:00
karlkar 98692523bf Added extra arguments to onvif platform config (#11680) 2018-01-16 09:23:48 +01:00
Andreas Björshammar 965bd8a2e0 Added support for enable/disable motion detection (#11583)
* Added support for enable/disable motion detection

* Changed name of variable for exception, lint error

* Moved motion_detection_enabled property to the other properties
2018-01-11 15:44:23 -08:00
Paulus Schoutsen 88b70e964c
Remove execution file perm (#11563) 2018-01-09 23:55:14 -08:00
Anders Melchiorsen 8267a21bfe Lazy loading of service descriptions (#11479)
* Lazy loading of service descriptions

* Fix tests

* Load YAML in executor

* Return a copy of available services to allow mutations

* Remove lint

* Add zha/services.yaml

* Only cache descriptions for known services

* Remove lint

* Remove description loading during service registration

* Remove description parameter from async_register

* Test async_get_all_descriptions

* Remove lint

* Fix typos from multi-edit

* Remove unused arguments

* Remove unused import os

* Remove unused import os, part 2

* Remove unneeded coroutine decorator

* Only use executor for loading files

* Cleanups suggested in review

* Increase test coverage

* Fix races in existing tests
2018-01-07 14:54:16 -08:00
Dan Nixon f0bf7b0def More support for availability reporting on MQTT components (#11336)
* Abstract MQTT availability from individual components

- Moved availability topic and payloads to MQTT base schema.
- Updated components that already report availability:
  - Switch
  - Binary sensor
  - Cover

* Add availability reporting to additional MQTT components

- Light
- JSON light
- Template light
- Lock
- Fan
- HVAC
- Sensor
- Vacuum
- Alarm control panel

* Annotate MQTT platform coroutines
2018-01-01 18:32:29 -08:00
Andy Castille 6b586c268a DoorBird feature update (#11193)
* Allow disabling the DoorBird camera live view

* Support for push notifications from DoorBird devices

* use DoorBirdPy 0.1.1 instead of 0.1.0

* Fix lint errors in DoorBird binary sensor

* Change DoorBird push notifications from binary sensor to event

* Remove DoorBird camera options

* use DoorBirdPy 0.1.2 to fix history image urls

* clean up doorbird event code and remove unused doorbird camera imports

* use async for doorbird doorbell events

* Minor changes

* Update file header

* Fix my mess

* Fix docstring
2017-12-29 10:05:45 +01:00
Joe Lu f892c3394b Add support for Canary component and platforms (#10306)
* Add Canary component

* Made some change to how canary data is updated and stored

* Updated to use py-canary:0.1.2

* Addressed flake8 warnings

* Import canary API locally

* Import canary API locally again

* Addressed pylint errors

* Updated requirements_all.txt

* Fixed incorrect unit of measurement for air quality sensor

* Added tests for Canary component and sensors

* Updated canary component to handle exception better when initializing

* Fixed tests

* Fixed tests again

* Addressed review comments

* Fixed houndci error

* Addressed comment about camera force update

* Addressed comment regarding timeout when fetching camera image

* Updated to use py-canary==0.2.2

* Increased update frequency to 30 seconds

* Added support for Canary alarm control panel

* Address review comments

* Fixed houndci error

* Fixed lint errors

* Updated test to only test setup component / platform

* Fixed flake error

* Fixed failing test

* Uptake py-canary:0.2.3

* canary.alarm_control_panel DISARM is now mapped to canary PRIVACY mode

* Fixed failing tests

* Removed unnecessary methods

* Removed polling in canary camera component and update camera info when getting camera image

* Added more tests to cover Canary sensors

* Address review comments

* Addressed review comment in tests

* Fixed pylint errors

* Excluded canary alarm_control_panel and camera from coverage calculation
2017-12-08 10:40:45 +01:00
Marcelo Moreira de Mello dbbbe1ceef Load Ring camera only with Ring Protect plan activated (#10739)
* Added ability to only load Ring camera
if the Ring Protect plan is activated.

* Fixed notification for all invalid cameras

* Fixed attribute name

* Using asyncio for persistent notifications
2017-11-25 12:15:12 +01:00
Marcelo Moreira de Mello 3dd49b2b95 Protect sensitive information for Amcrest cameras (#10569)
*  Creates a AmcresHub object to protect some private attributes on the logs

* Uses hass.data to pass AmcrestHub to components

* Prefer constants

* Removed serializer since it's using hass.data and simplified camera entity constructor

* small cleanup
2017-11-23 16:38:53 -08:00
Guillaume Rischard 2084ad2164 Optimised images. Saved 80 KB out of 656 KB. 12.3% overall (up to 32.1% per file) (#10735) 2017-11-21 21:19:13 -08:00
Jeremy Williams c2d0c8fba4 Arlo - Fixes for updated library (#9892)
* Reduce update calls to API. Add signal strength monitor.

* Fix lint errors

* Fix indent

* Update pyarlo version and review fixes

* Fix lint errors

* Remove staticmethod

* Clean up attributes

* Update arlo.py
2017-11-15 23:33:50 +01:00
Marcelo Moreira de Mello 2118ab2503 Fixed update() method and removed `ding` feature from stickupcams/floodlight (#10428)
* Simplified URL expiration calculation and fixed refresh method

* Remove support from Ring from StickupCams or floodlight cameras

* Makes lint happy

* Removed unecessary attributes
2017-11-09 01:01:20 +01:00
Fabian Affolter cc293db5ab
Update services.yaml files (#10229)
* Add period to the description

* Update abbreviation
2017-10-30 21:39:12 +01:00
Pascal Vizeli 444b7c5ee7
Add new service 'snapshot' for camera (#10207)
* Add new service 'snapshot' for camera

* Fix lint

* fix arguments

* Add test and fix bugs

* Fix lint

* Fix typo
2017-10-29 23:14:26 +01:00
Kane610 34368a6b69 WIP: Refactor Axis component removing external dependencies (#9791)
* Async rewrite

* Device and events now working with async core

* More async than before

* Methods have moved

* Remove check if parameter serial number is available since library handles reconnection anyway and we can expect user to set up configuration correctly

* Async rewrite

* Device and events now working with async core

* More async than before

* Methods have moved

* Remove check if parameter serial number is available since library handles reconnection anyway and we can expect user to set up configuration correctly

* Serial number is the only unique identifier, checks are still needed

* No async for setup_device

* Bump axis to 13 in preparation of friday the 13th

* Fix review comments

* Removed async after some discussions with @armills.
It wasn't possible to get past that aiohttp doesnt support digest auth, which makes it impossible to convert the full library at this point in time.
2017-10-25 00:04:30 -07:00
Marcelo Moreira de Mello 51a65ee8e9 Introducing Ring Door Bell Camera (including StickUp cameras) and WiFi sensors (#9962)
*   Extended Ring DoorBell to support camera playback and wifi sensors

   * Bump python-ringdoorbell to version 0.1.6
   * Support to camera playback via ffmpeg
   * Extended ringdoorbell sensors to report WiFi attributes
   * Extended unittests

* Makes lint happy

* Added support to stickup cameras and fixed logic

* Fixed unittests for stickup cameras

* Makes lint happy

* Refactored attributions and removed extra refresh method.
2017-10-21 16:08:40 +02:00