* Remove unnecessary exception re-wraps
* Preserve exception chains on re-raise
We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.
The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.
Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.
* Fix mistaken re-wrap in homematicip_cloud/hap.py
Missed the difference between HmipConnectionError and
HmipcConnectionError.
* Do not hide original error on plex new cert validation error
Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
* Clean up demo camera
* Complete test_motion_detection
* Clean up image reading
* Clean up camera integration async methods
* Fix and clean camera integration tests
* Fix image processing patch
* Add prettier (in pre-commit and CI)
* Make all file prettier
* Change order
* Add to Azure Pipelines
* Fix a YAML file prettier caught as invalid
* Remove flow mapping using curly braces from all YAML service files
* specify rtsp_transport for onvif camera
* remove used variable
* Update homeassistant/components/stream/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* change options to stream_options
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Adding support for PTZ move modes
Adding support for other PTZ move modes.
Onvif intergration used to only support RelativeMove where it should also supports AbsoluteMove, ContinuousMove and Stop.
For exemple Goke GK7102 based IP camera only support ContinuousMove mode.
This commit add those new modes with avaibility to select mode and params in service call.
* Adding support for PTZ move modes
Adding support for other PTZ move modes.
Onvif intergration used to only support RelativeMove where it should also supports AbsoluteMove, ContinuousMove and Stop.
For exemple Goke GK7102 based IP camera only support ContinuousMove mode.
Update service helper for new avaibility to select mode and params in service call.
* RelativeMode as default move_mode to avoid breakchange
RelativeMode as default move_mode to avoid breakchange
* add missing attribute
add missing continuous_duration attribute
* change service attribute label for continuous_duration
* update description
fix wrong assertion for move_mode attr description
* Update services.yaml
* Update services.yaml
fix wrong wording for move_mode
* Update camera.py
Using defined constants instead of raw strings in conditions
* Update camera.py
Replace integer to floating point in logger debug PTZ values
* Update services.yaml
* Update services.yaml
* Update camera.py
* Update camera.py
* use dict[key] for required schema keys and keys with default schema values
* remove async for setup_ptz method
* lint error
* remove unecessary PTZ_NONE = "NONE"
changed request by @MartinHjelmare
* addressing @ MartinHjelmare comments
- Remove None in defaluts and dicts
- Replace long if blocks
* remove NONE
* lint issue
* Update camera.py
* Fix lint error - typo
* rename onvif_ptz service to just ptz
* rename onvif_ptz service to just ptz
* use dict[key] when default values are set
use service.data[key] instead of service.data.get[key] when default value is set in service schema
* adresse comment: use dict[key] for pan tilt zoom
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* update service domain for local_file from camera to local_file
* remove service.yaml entry in camera component as part of change
* fix test
* move constants to const.py
* add local_file/const.py to .coveragerc
* remove local_file/const.py from .coveragerc since component has tests
* Remove malformed pylint disable markers
* Remove some unused imports
* Remove some unneeded lint exclusions
* Remove more unneeded lint exclusions
* Add specific codes to all noqa's
* Logi Circle now uses OAuth2 for authentication, added config flow.
* Service calls now dispatched to camera entities via signalled events
* Update from PR review
* Add unit tests for config flow
* Updated CODEOWNERS
* Reverted change to .coveragerc
* Improved test coverage of config flow
* initial commit for camera preferences and preload stream
* cleanup and add tests
* respect camera preferences on each request stream call
* return the new prefs after update
* Moved climate components with tests into platform dirs.
* Updated tests from climate component.
* Moved binary_sensor components with tests into platform dirs.
* Updated tests from binary_sensor component.
* Moved calendar components with tests into platform dirs.
* Updated tests from calendar component.
* Moved camera components with tests into platform dirs.
* Updated tests from camera component.
* Moved cover components with tests into platform dirs.
* Updated tests from cover component.
* Moved device_tracker components with tests into platform dirs.
* Updated tests from device_tracker component.
* Moved fan components with tests into platform dirs.
* Updated tests from fan component.
* Moved geo_location components with tests into platform dirs.
* Updated tests from geo_location component.
* Moved image_processing components with tests into platform dirs.
* Updated tests from image_processing component.
* Moved light components with tests into platform dirs.
* Updated tests from light component.
* Moved lock components with tests into platform dirs.
* Moved media_player components with tests into platform dirs.
* Updated tests from media_player component.
* Moved scene components with tests into platform dirs.
* Moved sensor components with tests into platform dirs.
* Updated tests from sensor component.
* Moved switch components with tests into platform dirs.
* Updated tests from sensor component.
* Moved vacuum components with tests into platform dirs.
* Updated tests from vacuum component.
* Moved weather components with tests into platform dirs.
* Fixed __init__.py files
* Fixes for stuff moved as part of this branch.
* Fix stuff needed to merge with balloob's branch.
* Formatting issues.
* Missing __init__.py files.
* Fix-ups
* Fixup
* Regenerated requirements.
* Linting errors fixed.
* Fixed more broken tests.
* Missing init files.
* Fix broken tests.
* More broken tests
* There seems to be a thread race condition.
I suspect the logger stuff is running in another thread, which means waiting until the aio loop is done is missing the log messages.
Used sleep instead because that allows the logger thread to run. I think the api_streams sensor might not be thread safe.
* Disabled tests, will remove sensor in #22147
* Updated coverage and codeowners.
* Consolidate
* Fix tests
* Update imports
* Fix import
* Use importlib because integration and package share name
* Fix more tests
* Update .coveragerc and CODEOWNERS
* initial commit of streams
* refactor stream component
* refactor so stream formats are not considered a platform
* initial test and minor refactor
* fix linting
* update requirements
* need av in tests as well
* fix import in class def vs method
* fix travis and docker builds
* address code review comments
* fix logger, add stream start/stop logs, listen to HASS stop
* address additional code review comments
* beef up tests
* fix tests
* fix lint
* add stream_source to onvif camera
* address pr comments
* add keepalive to camera play_stream service
* remove keepalive and move import
* implement registry and have output provider remove itself from stream after idle, set libav log level to error
* Deprecated http.api_password
* Deprecated ApiConfig.api_password
GitHub Drafted PR would trigger CI after changed it to normal PR.
I have to commit a comment change to trigger it
* Trigger CI
* Adjust if- elif chain in auth middleware
* Add ffmpeg version
* Add ffmpeg stream content type
* Change ffmpeg camera stream content type
* Change ffmpeg stream content type
* Lint
* Add a none guard
* Fix
* Fix
* Update onvif.py
* Fix version match regrex
* Fix regrex
* Upgrade ha-ffmpeg to 1.11
* Lint
* Get ffmpeg version in ffmpeg component setup
* Change foscam python library to pyfoscam, which is more up to date and has several critical bug fixes.
* Update requirements_all.txt to match.
* Inserting automatically generated requirements.txt
* Revert changes until pyfoscam captures recent bug fixes. The pyfoscam version pulled by pip is currently broken.
* Updated requirements_all.txt based on changing pyfoscam back to libpyfoscam.
* Change foscam python library to pyfoscam, which is more up to date and has several critical bug fixes.
* Update requirements_all.txt to match.
* Inserting automatically generated requirements.txt
* Added support for cropping pictures in proxy camera
This includes extending the configuration to introduce a mode
(either 'resize', default, or 'crop') and further coordinates
for the crop operation.
* Also fixed async job type, following code review
* Remove FFmpeg input tests
* Not needed here
* Removing tests for removed functionality
* Minor lint
* Fix tests to reflect removed config option
* Remove async service registration by request
* More lint
* Unused imports
* Make it a non-breaking change
* Update ffmpeg.py
* Validate ports as port
Better than just a positive integer since it limits the range from 1 to 65535.
* Validate port for Axis
* Validate port for Xiaomi Home Camera
* Validate port for Modbus
* Validate port for Yamaha MusicCast Receivers
* Update zhong_hong.py
Validate port as a port, the gateway address as positive_int
Also moved the default values to their variable
* Validate port for the Asterisk Voicemail interface
* Fix lint
* Validate port for Xiaomi Cameras
* Updgrae blinkpy to 0.10.0
- Remove status sensor (API endpoint unreliable for this)
- Wifi strength reports in wifi bars rather than dBm (result of new API
endpoint)
- Added unique ids based on serial number
* Update requirements
* Using new methods for blink camera
- Refactored blink platform (breaking change)
- Camera needs to be uniquely enabled in config from now on
- Added motion detection enable/disable to camera platform
* Fix motion detection
- bumped blinkpy to 0.8.1
- Added wifi strength sensor
* Added platform schema to sensor
- Added global variables for brand and attribution to main platform
* Removed blink binary sensor
* Add alarm control panel
* Fixed dependency, added alarm_home
* Update requirements
* Fix lint errors
* Updated throttle times
* Add trigger_camera service (replaced snap_picture)
* Add refresh after camera trigger
* Update blinkpy version
* Wait for valid camera response before returning image
- Motion detection now working!
* Updated for new blinkpy 0.9.0
* Add refresh control and other fixes for new blinkpy release
* Add save video service
* Pushing to force bot to update
* Changed based on first review
- Pass blink as BLINK_DATA instead of DOMAIN
- Remove alarm_arm_home from alarm_control_panel
- Re-add discovery with schema for sensors/binar_sensors
- Change motion_detected to a binary_sensor
- Added camera_armed binary sensor
- Update camera device_state_attributes rather than state_attributes
* Moved blink.py to own folder. Added service hints.
* Updated coveragerc to reflect previous change
* Register services with DOMAIN
- Change device add for loop order in binary_sensor
* Fix lint error
* services.async_register -> services.register
* Added Logi Circle platform, camera and sensor
* Integrated with Logo Circle API’s feature detection to exclude sensors not supported by device. Added services for recording livestream and taking a snapshot from the livestream.
* Migrated livestream snapshot and recording functionality out of home assistant components and into the logi circle API wrapper. Added services.yaml entries for logi services.
* Added new Logi sensor types, updated to latest version of `logi_circle` and tidy up in preparation for pull request.
- Renamed `logi_set_mode` to `logi_set_config`.
- Live stream recording and snapshot methods now respect whitelisted path configuration.
- Added `streaming_mode` and `speaker_volume` sensors.
- Moved model-specific turn on/off logic to `logi_circle` library.
* Renamed `logi` component domain to `logi_circle`.
* Updates based on PR feedback
* Added timeout of 15s to logi_circle initial setup requests (login and grabbing cameras).
* Added unique ID (uses MAC address for camera platform, MAC address + sensor type for sensor platform).
* Added battery level and battery charging attributes to camera.
* Removed static attributes from device_state_attributes.
* Replaced STATE_UNKNOWN with None, replaced ‘on’ & ‘off’ with STATE_ON and STATE_OFF.
* Removed redundant SCAN_INTERVAL in sensor, removed redundant hass param from async_setup_platform in camera and sensor.
* Style tweaks.
* Replaced `asyncio.wait_for` with `async_timeout` to be consistent with other components.
* Migrating out the zoneminder platform (and camera.zoneminder) to a new library
* Clean up the global variable ZM usage
* Modify camera.zoneminder to use the new Monitor class implementation
* Refactor camera.zoneminder after latest refactor in zm-py
* Implementing changes to switch.zoneminder to use zm-py native methods
* Complete migrating over sensor.zoneminder to the zm-py library
* Tweaking ZoneMinder components from code review
* Linting fixes for the zoneminder components
* Directly assign value when turning on/off in switch.zoneminder
* Use access_token and user provided token instead of api_password
* address comments by @awarecan
* new tests
* add extra checks and test
* lint
* add comment
* First draft
* Generate device id
* No obscure registry
* Dont store config_entry_id in device
* Storage
* Small mistake on rebase
* Do storage more like entity registry
* Improve device identification
* Add tests
* Remove deconz device support from PR
* Fix hound comments, voff!
* Fix comments and clean up
* Fix proper indentation
* Fix pydoc issues
* Fix mochad component to not use self.device
* Fix mochad light platform to not use self.device
* Fix TankUtilitySensor to not use self.device
* Fix Soundtouch to not use self.device
* Fix Plex to not use self.device
* Fix Emby to not use self.device
* Fix Heatmiser to not use self.device
* Fix Wemo lights to not use self.device
* Fix Lifx to not use self.device
* Fix Radiotherm to not use self.device
* Fix Juicenet to not use self.device
* Fix Qwikswitch to not use self.device
* Fix Xiaomi miio to not use self.device
* Fix Nest to not use self.device
* Fix Tellduslive to not use self.device
* Fix Knx to not use self.device
* Clean up a small mistake in soundtouch
* Fix comment from Ballob
* Fix bad indentation
* Fix indentatin
* Lint
* Remove unused variable
* Lint
* Add turn_on/off to camera
* Add turn_on/off supported features to camera.
Add turn_on/off service implementation to camera, add turn_on/off
supported features and services to Demo camera.
* Add camera supported_features tests
* Resolve code review comment
* Fix unit test
* Use async_add_executor_job
* Address review comment, change DemoCamera to local push
* Rewrite tests/components/camera/test_demo
* raise HTTPError instead return response
* Added push camera
* add camera.push
* Address comments and add tests
* auff auff
* trip time made no sense
* travis lint
* Mock dependency
* hound
* long line
* long line
* better mocking
* remove blank image
* no more need to mock dependency
* remove import
* cleanup
* no longer needed
* unused constant
* address @pvizeli review
* add force_update
* Revert "add force_update"
This reverts commit e203785ea8.
* rename parameter
* Added support for Xiaofang Camera
* Added entry for Xiaofang 1080p camera
* Code fix
* Minor comment fix
* Updated coveragerc for Xiaomi cameras
* Added Xiaomi Camera
Added Xiaomi Camera to accommodate multiple models like Yi, Xiaofang, etc.
* Minor code fix
* Minor code fix
* Added model property
* Update xiaomi.py
* Minor code fix
* Update xiaomi.py
* Update xiaomi.py
* Minor code fix
* Package requirement fix due to Version conflict
* To fix conflicts
* Update package_constraints.txt
* Minor fix
* Update xiaomi.py
* Update xiaomi.py
Changes made per comment
* Update xiaomi.py
* Don't update on add.
* start arlo refactoring
* Refactored Arlo Hub to avoid uncessary and duplicated GETs to Arlo API
* Refactored Arlo camera component to avoid duplicate queries
* Added debug and error messages when video is not found
* Transformed Arlo Control Panel to Sync
* Makes linter happy
* Uses total_seconds() for scan_interval
* Added callback and fixed scan_interval issue
* Disable multiple tries and supported custom modes set in Arlo
* Bump PyArlo version to 0.1.4
* Makes lint happy
* Removed ArloHub object and added some tweaks
* Fixed hub_refresh method
* Makes lint happy
* Ajusted async syntax and added callbacks decorators
* Bump PyArlo version to 0.1.6 to include some enhacements
* Refined code
* fixed tests: using correct camera configuration now and error handling tests must be separated out to ensure that the setup_component call is actually executed
* better error handling during setup; raising PlatformNotReady in likely recoverable cases; added tests
* add familyhub.py camera
* fix import and REQUIREMENTS
* add to coveragerc
* fix formatting to make houndci-bot happy
* ran scripts/gen_requirements_all.py
* use CONF_IP_ADDRESS
* Revert "ran scripts/gen_requirements_all.py"
This reverts commit 3a38681d8a.
* fix library name
* add missing docstrings and enable polling
* Sort imports
* allow to set a desired update interval for camera_proxy_stream view
* lint
* refactor into a seperate method.
Keep the handle_async_mjpeg_stream method to be overridden by platforms
so they can keep proxying the direct streams from the camera
* change descriptions
* consolidate
* lint
* travis
* async/await and force min stream interval for fallback stream.
* guard clause. Let the method raise error on interval.
* is is not =
* what to except when you're excepting
* raise ValueError, remove unnecessary 500 response
* 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
* 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
* 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
* 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
* 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
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
* 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
* 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
* 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
* 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…
* 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