Avoid unhandled exception and stack trace when server closes connection by changing from handle ClientDisconnectedError to DisconnectedError. Also added HttpProcessingError, which was missing.
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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>
* 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
* 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
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.
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.
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.
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.
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.
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.