Fixing foscam library dependency/requirements (#9387)

* Added support to enable/disable motion detection for foscam cameras. This support was added in 0.48.1 as a generic service for cameras. Motion detection can be enabled/disabled for foscam cameras with this code-set.

* Fixed the violation identified by hound-bot

* Fixed the comment posted by HoundCI-Bot regarding using imperative mood statement for pydocstyle

* Fixed the error that travis-ci bot found.

* As per comment from @balloob, Instead of directly using the URL to talk to foscam, used a 3rd party foscam library to communicate with it. This library already has support to enable/disable motion detection and also APIs to change the motion detection schedule etc. Need to add more support in the pyfoscam 3rd party library for checking if motion was detected or even if sound was detected. Once that is done, we can add that into HASS as well.

* Lint

* Removed the requests library import which is not used anymore

* Updating requirements_all.txt based on the code-base of home assistant that i have. Generated using the gen_requirements_all.py script

* Updating requirements_all.txt and requirements_test_all.txt generated by gen_requirements_all.py after latest pull from origin/dev

* Updated requirements_all.txt with script

* Updated the foscam camera code to fix lint errors

* Fixed houndci violation

* Updating the foscam library dependency/requirements.

* Fixing the requirements_all file. Somehow when i generated, it generated duplicate entry for the same dependency
pull/9395/head
viswa-swami 2017-09-12 00:43:55 -04:00 committed by Paulus Schoutsen
parent 804d06d0d3
commit 2a8620f806
2 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@ from homeassistant.helpers import config_validation as cv
_LOGGER = logging.getLogger(__name__)
REQUIREMENTS = ['pyfoscam==1.2']
REQUIREMENTS = ['libpyfoscam==1.0']
CONF_IP = 'ip'
@ -53,7 +53,7 @@ class FoscamCam(Camera):
self._name = device_info.get(CONF_NAME)
self._motion_status = False
from foscam.foscam import FoscamCamera
from libpyfoscam import FoscamCamera
self._foscam_session = FoscamCamera(ip_address, port, self._username,
self._password, verbose=False)

View File

@ -368,6 +368,9 @@ libnacl==1.5.2
# homeassistant.components.dyson
libpurecoollink==0.4.2
# homeassistant.components.camera.foscam
libpyfoscam==1.0
# homeassistant.components.device_tracker.mikrotik
librouteros==1.0.2
@ -599,9 +602,6 @@ pyfido==1.0.1
# homeassistant.components.climate.flexit
pyflexit==0.3
# homeassistant.components.camera.foscam
pyfoscam==1.2
# homeassistant.components.ifttt
pyfttt==0.3