core/homeassistant/components/amcrest
Phil Bruckner 233bc1a108 Improve amcrest error handling and bump amcrest package to 1.5.3 (#24262)
* Improve amcrest error handling and bump amcrest package to 1.5.3

amcrest package update fixes command retry, especially with Digest Authentication, and allows sending snapshot command without channel parameter.

Get rid of persistent_notification.

Errors at startup, other than login errors, are no longer fatal.

Display debug messages about how many times an error has occurred in a row.

Remove initial communications test. If camera is off line at startup this just delays the component setup.

Handle urllib3 errors when getting data from commands that were sent with stream=True.

If errors occur during camera update, try repeating until it works or the camera is determined to be off line.

Drop channel parameter in snapshot command which allows camera to use its default channel, which is different in different camera models and firmware versions.

Make entities unavailable if too many errors occur in a row.

Add new configuration variables to control how many errors in a row should be interpreted as camera being offline, and how frequently to "ping" camera to see when it becomes available again.

Add online binary_sensor option to indicate if camera is available (i.e., responding to commands.)

* Update per review comments

Remove max_errors and recheck_interval configuration variables and used fixed values instead.

Move definition of AmcrestChecker class to module level.

Change should_poll in camera.py to return a fixed value of True and move logic to update method.
2019-06-07 21:46:49 -07:00
..
__init__.py Improve amcrest error handling and bump amcrest package to 1.5.3 (#24262) 2019-06-07 21:46:49 -07:00
binary_sensor.py Improve amcrest error handling and bump amcrest package to 1.5.3 (#24262) 2019-06-07 21:46:49 -07:00
camera.py Improve amcrest error handling and bump amcrest package to 1.5.3 (#24262) 2019-06-07 21:46:49 -07:00
const.py Improve amcrest error handling and bump amcrest package to 1.5.3 (#24262) 2019-06-07 21:46:49 -07:00
helpers.py Improve amcrest error handling and bump amcrest package to 1.5.3 (#24262) 2019-06-07 21:46:49 -07:00
manifest.json Improve amcrest error handling and bump amcrest package to 1.5.3 (#24262) 2019-06-07 21:46:49 -07:00
sensor.py Improve amcrest error handling and bump amcrest package to 1.5.3 (#24262) 2019-06-07 21:46:49 -07:00
services.yaml Add amcrest camera services and deprecate switches (#22949) 2019-04-24 22:39:49 -07:00
switch.py Improve amcrest error handling and bump amcrest package to 1.5.3 (#24262) 2019-06-07 21:46:49 -07:00