1
mirror of https://github.com/home-assistant/core synced 2024-09-09 12:51:22 +02:00
Commit Graph

225 Commits

Author SHA1 Message Date
HomeAssistant Azure
57c6bb96f4 [ci skip] Translation update 2020-11-07 00:04:02 +00:00
HomeAssistant Azure
9298fec345 [ci skip] Translation update 2020-11-05 00:10:11 +00:00
HomeAssistant Azure
b71e28dfac [ci skip] Translation update 2020-11-04 00:13:14 +00:00
Jason Hunter
f1bb7b4a0f
attempt to renew subscription immediately to stop endless loop if it fails after setup (#42651) 2020-10-31 09:15:11 -04:00
HomeAssistant Azure
b9d04b9304 [ci skip] Translation update 2020-10-30 00:02:45 +00:00
HomeAssistant Azure
026e0063fe [ci skip] Translation update 2020-10-29 00:09:16 +00:00
springstan
a967f689c7
Remove unnecessary instances of dict.keys() (#42518) 2020-10-28 20:43:48 +01:00
HomeAssistant Azure
f4cebfbb7e [ci skip] Translation update 2020-10-27 00:06:28 +00:00
HomeAssistant Azure
c2a9f2ae52 [ci skip] Translation update 2020-10-26 00:03:36 +00:00
Brett T. Warden
ab5e34a49f
Fix error strings for PTZ operations (#42231)
PTZ error strings for unsupported move operations were copied/pasted
from ContinuousMove. Fix the strings for AbsoluteMove and RelativeMove.
2020-10-25 14:52:32 +01:00
HomeAssistant Azure
ed232ac733 [ci skip] Translation update 2020-10-24 00:05:17 +00:00
HomeAssistant Azure
b102ad731f [ci skip] Translation update 2020-10-22 00:09:52 +00:00
HomeAssistant Azure
81296b2b70 [ci skip] Translation update 2020-10-20 00:08:00 +00:00
Rihan9
d01a96d1ce
Fix onvif sensor detection and onvif stop service call (#41949)
* Fix stop service call after movement, add new parser for topic: tns1:RuleEngine/MotionRegionDetector/Motion

* Fix PullMessages call and formatting Stop call

* Fix timeout on pullmessages call

* Fix black and flake8 detected issues

* add SetSynchronizationPoint with try/except block
2020-10-19 13:01:34 -04:00
Jason Hunter
5a397312e7
Update ONVIF to Zeep 4.0/httpx (#42020)
* convert to httpx and zeep 4.0

* fix tests

* add onvif-zeep-async to manifest

* pin zeep to fool CI cache

* address review comments
2020-10-18 23:29:53 -04:00
Jason Hunter
32675e0e38
Bump ONVIF and pin Zeep (#41907) 2020-10-15 22:24:33 +02:00
HomeAssistant Azure
994ae09f69 [ci skip] Translation update 2020-10-15 00:03:50 +00:00
HomeAssistant Azure
1417a4161f [ci skip] Translation update 2020-10-13 00:03:24 +00:00
HomeAssistant Azure
f787289ea0 [ci skip] Translation update 2020-10-12 00:03:31 +00:00
HomeAssistant Azure
80522f1bdc [ci skip] Translation update 2020-10-11 00:03:37 +00:00
HomeAssistant Azure
6ae12c3faf [ci skip] Translation update 2020-10-10 00:05:05 +00:00
HomeAssistant Azure
29aea5a66c [ci skip] Translation update 2020-10-09 00:04:33 +00:00
HomeAssistant Azure
d73d36d0cd [ci skip] Translation update 2020-10-08 00:06:03 +00:00
HomeAssistant Azure
486c0b644a [ci skip] Translation update 2020-10-07 00:06:20 +00:00
HomeAssistant Azure
bcfa4ac959 [ci skip] Translation update 2020-10-06 00:08:09 +00:00
Diefferson Koderer Môro
dde465da48
Use common strings for Onvif config flow (#41170)
* Use common strings for Onvif config flow

* Fix tests

* Update homeassistant/components/onvif/strings.json

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-10-05 15:27:48 +02:00
HomeAssistant Azure
8d1d585b40 [ci skip] Translation update 2020-10-05 00:04:23 +00:00
HomeAssistant Azure
f8c2d877aa [ci skip] Translation update 2020-10-04 00:05:05 +00:00
springstan
064a453604
Add already_in_progress to base strings for config flows (#40961) 2020-10-03 15:49:09 +02:00
springstan
04daa9a378
Add name to base strings for config flows (#40947)
* Add name to base strings for config flows

* Fix HA strings.json
2020-10-03 15:28:42 +02:00
HomeAssistant Azure
f28b7f2187 [ci skip] Translation update 2020-09-16 00:09:01 +00:00
springstan
db582bdc1b
Use http status constants more, add HTTP_ACCEPTED and HTTP_BAD_GATEWAY (#39993)
* Use http status codes and add HTTP_BAD_GATEWAY constant

* Address review comments:
 - using constants in tado integration
 - using constant in media_player init.py

* Add and use HTTP_ACCEPTED constant
2020-09-15 20:01:07 +03:00
HomeAssistant Azure
07d5af1969 [ci skip] Translation update 2020-09-08 00:04:13 +00:00
Ville Skyttä
f828cdcaef
Fix setup of ONVIF devices without snapshot capability (#39723)
* Fix setup of ONVIF devices without snapshot capability

* Unrelated debug message typo fix
2020-09-06 16:52:06 -04:00
HomeAssistant Azure
bfd6989c75 [ci skip] Translation update 2020-09-04 00:04:26 +00:00
On Freund
a87fedc0af
Automatically configure HTTP auth type in ONVIF snapshots (#38729)
* Allow selection of HTTP auth type in ONVIF snapshots

* Auto populate snapshot auth

* Fix no auth case

* Add missing return
2020-09-03 22:41:24 +02:00
HomeAssistant Azure
65b227126d [ci skip] Translation update 2020-09-03 00:06:16 +00:00
Aidan Timson
f7e6b060a7
Make onvif username optional (#39415) 2020-08-30 17:39:33 -04:00
HomeAssistant Azure
904f5c4346 [ci skip] Translation update 2020-08-30 00:03:17 +00:00
HomeAssistant Azure
195d4b6897 [ci skip] Translation update 2020-08-27 00:04:55 +00:00
Andrey Kupreychik
8500e3c5a8
Prefer mac for onvif device identifier (#38864) 2020-08-20 14:39:04 -04:00
Eric Severance
34cb12d3c9
Addressing feedback from #37711 (#38781) 2020-08-12 09:34:27 -04:00
Eric Severance
49b375ff94
Allow ONVIF devices to resume a PullPoint subscription when the camera reboots (#37711) 2020-08-11 17:53:30 -04:00
Eric Severance
61a911af41
Adapt the ONVIF Renewal termination_time for Amcrest cameras (#37750) 2020-08-11 16:59:26 -04:00
J. Nick Koston
8b06d1d4bd
Prevent onvif from blocking startup (#38256) 2020-07-27 08:51:53 +02:00
HomeAssistant Azure
8abdc2c969 [ci skip] Translation update 2020-07-27 00:02:58 +00:00
HomeAssistant Azure
e766a119d2 [ci skip] Translation update 2020-07-22 00:02:30 +00:00
Diefferson Koderer Môro
804cae02ee
Fix get profiles checking if has ptz capabilities (#37176) 2020-07-10 10:13:16 -04:00
HomeAssistant Azure
251a1d6619 [ci skip] Translation update 2020-07-09 00:05:04 +00:00
HomeAssistant Azure
7920c5e5e8 [ci skip] Translation update 2020-06-18 00:08:13 +00:00
HomeAssistant Azure
b15caf31a9 [ci skip] Translation update 2020-06-15 00:03:32 +00:00
HomeAssistant Azure
81355a0e23 [ci skip] Translation update 2020-06-08 00:02:43 +00:00
HomeAssistant Azure
f8e48a9230 [ci skip] Translation update 2020-06-05 00:05:36 +00:00
Jason Hunter
eb95c5cd2e
update renew logic to work better with cameras responding with invalid termination times by extending the duration (#36393) 2020-06-03 09:51:57 -06:00
Diefferson Koderer Môro
0e2e39a5f2
Fix Method GetNetworkInterfaces not implemented (#36243) 2020-06-02 19:45:20 -07:00
HomeAssistant Azure
a4d4e26fe5 [ci skip] Translation update 2020-06-02 00:05:54 +00:00
Jason Hunter
cb2821b512
Fix empty preset element in ONVIF response (#36182) 2020-05-26 21:16:15 -07:00
Minims
2375e00029
Fix onvif snapshot for Sricam SP009 (#36095) 2020-05-25 14:02:21 +02:00
Jason Hunter
5dfae0eb7c
fix preset warning (#36110) 2020-05-25 13:38:57 +02:00
Jason Hunter
b0012bd5a6
guard against missing topic (#36108) 2020-05-25 13:37:47 +02:00
Jason Hunter
bd8848e57a
Fix ONVIF config entry unique ID (#36008)
* fallback to device serial number if no mac available

* make password optional to fix #35904

* update tests to reflect new flow

* fix snake case and AsyncMock

* add comments around why weird things are being done
2020-05-24 21:50:50 +02:00
Jason Hunter
0514960bda
Fix ONVIF PTZ and profile encoding issues (#36006)
* allow lib to create AsyncTransport

* fix transport close issue

* fix zoom only cameras without PTZ presets

* catch profiles without encoding configuration

* also catch ServerDisconnectedError for ptz
2020-05-22 21:11:30 -04:00
Jason Hunter
0e83cfade1
Fix ONVIF Transport (#35932)
* allow lib to create AsyncTransport

* fix transport close issue
2020-05-22 19:46:11 -04:00
HomeAssistant Azure
973f66a974 [ci skip] Translation update 2020-05-22 00:05:00 +00:00
Jason Hunter
a82900ae27
fix mjpeg issue along with some cameras not returning event capabilities properly (#35885) 2020-05-20 21:26:27 -04:00
HomeAssistant Azure
b32ec950ac [ci skip] Translation update 2020-05-21 00:02:31 +00:00
Jason Hunter
aeae4edb74
Fix ONVIF subscription renewal (#35792)
* fix subscription renewal

* catch ValueError for #35762
2020-05-18 23:02:23 -04:00
HomeAssistant Azure
e94f44f294 [ci skip] Translation update 2020-05-17 00:02:56 +00:00
HomeAssistant Azure
f3bb370b3a [ci skip] Translation update 2020-05-16 00:03:50 +00:00
Jason Hunter
3a3f39b642
ONVIF: Add check around media capabilities (#35667) 2020-05-15 20:05:32 +02:00
HomeAssistant Azure
9586e9ebef [ci skip] Translation update 2020-05-15 00:02:56 +00:00
Jason Hunter
b7ab07c987
additional log info and strings fix (#35622) 2020-05-14 11:25:58 -04:00
Jason Hunter
7ab19bdfcc
Additional checks for ONVIF event capabilities (#35599)
catch any exceptions when pulling event capabilities and assume it is not supported
2020-05-13 22:24:38 -04:00
Paulus Schoutsen
0efeefe3b2 Update translations 2020-05-13 11:27:21 -07:00
Paulus Schoutsen
dd32324e01
Use config flow references for data (#35529) 2020-05-12 10:50:44 -07:00
Jason Hunter
132bb4e890
ONVIF Event Implementation (#35406)
Initial implementation of ONVIF event sensors
2020-05-11 13:12:12 -04:00
Jason Hunter
19734e7b2c
Refactor ONVIF (#35222) 2020-05-06 09:29:59 -07:00
HomeAssistant Azure
78f846d532 [ci skip] Translation update 2020-05-03 00:02:26 +00:00
HomeAssistant Azure
f4f2aff5b6 [ci skip] Translation update 2020-05-02 00:04:57 +00:00
Franck Nijhof
e1ae455f1d
Fix ONVIF YAML import (#35035) 2020-05-01 20:35:30 +02:00
Jason Hunter
850b5cb02b
Config flow for ONVIF (#34520) 2020-04-30 23:15:40 -07:00
Geronimo2015
d416029e82
Add onvif PTZ GotoPreset (#34420)
* Added PTZ GotoPreset support

* Update camera.py

Processed flake8 error

* Update services.yaml

Removed trailing spaces

* Update camera.py

black formatted code
2020-04-24 17:28:44 +02:00
Minims
7b9585cd8e
Fix Onvif Camera that does not have SnapshotUri such as Sricam (#33902) 2020-04-10 08:44:56 -07:00
Paulus Schoutsen
32499dc8fe
Fix onvif consistent return (#33898) 2020-04-09 09:51:23 -07:00
Paulus Schoutsen
1adb45f74e
Check status code on onvif snapshot (#33865) 2020-04-09 09:54:02 +02:00
springstan
eae21be5b9
Improve string formatting v6 (#33698) 2020-04-07 23:14:28 +02:00
Franck Nijhof
1fa996ed68
Fix ONVIF camera snapshot with auth (#33241) 2020-03-25 13:32:28 +01:00
roleo
aec2fe86e4
Add onvif snapshot uri (#33149)
* Add onvif snapshot uri

If the cam supports http snapshot uri, use it instead of ffmpeg.

* Code formatting

* Fix to pass pre-commit
2020-03-24 09:57:14 -07:00
Franck Nijhof
5893f6b14b
Fix Extend ONVIF unique ID with profile index (#33103) 2020-03-21 11:36:35 -07:00
Aidan Timson
628f77f8f2
Fix onvif error with non ptz cameras (#32783) 2020-03-13 23:58:14 +01:00
Rami Mosleh
e1cc2acdf9
Specify rtsp_transport for Onvif Camera (#31918)
* 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>
2020-03-06 09:59:57 -08:00
olijouve
0d667c1bd9
Add more onvif PTZ move modes (#30152)
* 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>
2020-03-06 15:14:01 +01:00
Franck Nijhof
2390a7f365
Pass in aiohttp session for onvif (#32045) 2020-02-28 11:46:06 +01:00
Franck Nijhof
edfb967b10
Add unique ID to ONVIF camera entities (#32093) 2020-02-22 22:29:49 +01:00
springstan
1ee7c483a7
Update file headers and outdated documentation links (#32022)
* Update documentation links

* Update file headers v2
2020-02-20 15:29:46 -08:00
Franck Nijhof
dc02c28891 Correct names in manifests (M-P) (#30541) 2020-01-07 13:28:35 +01:00
Franck Nijhof
a84741392b
Format all manifests with prettier (#30521) 2020-01-06 21:28:23 +01:00
olijouve
87de5db535 Fix Onvif setup error: premature end of connection on GetStreamURI (#26781)
* Fix Onvif setup error with a premature end of connection on GetStreamUri wsdl call

Reconnect to onvif camera after getting profiles to fix this error :

[homeassistant.components.onvif.camera] Retrieving stream uri                                                                                                                                 
[zeep.asyncio.transport] HTTP Post to http://192.168.1.15/onvif/Media:                                                                                                                        
b'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope"><soap-env:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecur
2019-09-20 01:08:51 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform onvif                                                                                                                       
Traceback (most recent call last):                                                                                                                                                                                                   
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 553, in write_bytes                                                                                                                                   
    await self.body.write(writer)                                                                                                                                                                                                    
  File "/usr/local/lib/python3.7/site-packages/aiohttp/payload.py", line 231, in write                                                                                                                                               
    await writer.write(self._value)                                                                                                                                                                                                  
  File "/usr/local/lib/python3.7/site-packages/aiohttp/http_writer.py", line 101, in write                                                                                                                                           
    self._write(chunk)                                                                                                                                                                                                               
  File "/usr/local/lib/python3.7/site-packages/aiohttp/http_writer.py", line 67, in _write                                                                                                                                           
    raise ConnectionResetError('Cannot write to closing transport')                                                                                                                                                                  
ConnectionResetError: Cannot write to closing transport                                                                                                                                                                              
                                                                                                                                                                                                                                     
The above exception was the direct cause of the following exception:                                                                                                                                                                 
                                                                                                                                                                                                                                     
Traceback (most recent call last):                                                                                                                                                                                                   
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform                                                                                                                         
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)                                                                                                                                                                
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for                                                                                                                                                            
    return fut.result()                                                                                                                                                                                                              
  File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 110, in async_setup_platform                                                                                                                          
    await hass_camera.async_initialize()                                                                                                                                                                                             
  File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 168, in async_initialize                                                                                                                              
    await self.async_obtain_input_uri()                                                                                                                                                                                              
  File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 266, in async_obtain_input_uri                                                                                                                        
    stream_uri = await media_service.GetStreamUri(req)                                                                                                                                                                               
  File "/usr/local/lib/python3.7/site-packages/zeep/asyncio/bindings.py", line 13, in send                                                                                                                                           
    options["address"], envelope, http_headers                                                                                                                                                                                       
  File "/usr/local/lib/python3.7/site-packages/zeep/asyncio/transport.py", line 107, in post_xml                                                                                                                                     
    response = await self.post(address, message, headers)                                                                                                                                                                            
  File "/usr/local/lib/python3.7/site-packages/zeep/asyncio/transport.py", line 95, in post                                                                                                                                          
    proxy=self.proxy,                                                                                                                                                                                                                
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 497, in _request                                                                                                                                             
    await resp.start(conn)                                                                                                                                                                                                           
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 844, in start                                                                                                                                         
    message, payload = await self._protocol.read()  # type: ignore  # noqa                                                                                                                                                           
  File "/usr/local/lib/python3.7/site-packages/aiohttp/streams.py", line 588, in read                                                                                                                                                
    await self._waiter                                                                                                                                                                                                               
aiohttp.client_exceptions.ClientOSError: [Errno None] Can not write request body for http://192.168.1.15/onvif/Media

* Add code comment

* Update camera.py

* Lint.
2019-11-25 17:56:17 -08:00
ZiroNL
5854eef47b Add services.yaml to onvif component (#28349) 2019-10-31 18:57:00 +01:00
Diefferson Koderer Môro
c96d4c978d Fix tzinfo type for onvif component (#28178) 2019-10-24 13:39:10 -07:00
Diefferson Koderer Môro
dd9ca70e96 Add onvif local datetime support (#26656)
* Update camera.py

* Add onvif local datetime support

* Correct capture TimeZone

* Replace one line if-statement by if-block
2019-10-23 21:03:24 -07:00
Diefferson Koderer Môro
9db07b2a41 Move imports in onvif component (#27969) 2019-10-20 20:46:51 +02:00
Sergio Conde Gómez
6cc71db385 Fix onvif PTZ service freeze (#27250) 2019-10-06 17:00:44 +02:00
Franck Nijhof
c7da781efc Update documentation link URL for integrations in all manifests (#27114) 2019-10-02 09:25:44 -07:00
Balazs Sandor
5e6840d8f4 fix onvif/camera setting up error (#26825) 2019-09-23 13:41:35 -04:00
definitio
9cd5c5471d Hide "PTZ is not available on this camera" warning (#26649)
* Hide "PTZ is not available" warning

* Change log level to "debug"
2019-09-18 09:00:12 -07:00
Franck Nijhof
1c5e0123c9 Use literal string interpolation in integrations N-Q (f-strings) (#26391) 2019-09-03 11:35:00 -07:00
Balazs Sandor
baa30aec9d Fix onvif camera setup error (#24585)
* fix: onvif setup error

* refactor: onvif camera init process

* onvif/camera: review fixes

* onvif/camera: review fixes

* onvif/camera: fix pydoc

* onvif: remove unrelated async-await

* Onvif review fix

* onvif/camera: remove log
2019-08-31 22:29:42 +02:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Paulus Schoutsen
1de0a0bbb9
Convert stream source to method (#23905)
* Convert stream source to method

* Use async with
2019-05-23 09:45:30 -07:00
Paulus Schoutsen
f995ab9d54
Don't pass in loop (#23984)
* Don't pass in loop

* Revert some changes

* Lint + Axis revert

* reinstate loop

* Fix a test

* Set loop

* Update camera.py

* Lint
2019-05-22 21:09:59 -07:00
karlkar
edf34eea94 Fix problem with cameras that don't support time (#23924)
Some onvif cameras don't support Date management. In that case None is returned and script crashes when trying to obtain date
2019-05-17 06:29:52 +02:00
Jason Hunter
03cd4480df fix onvif wsdl import - take 2 (#23807) 2019-05-10 23:15:21 -07:00
Jason Hunter
df6846344d Beta Fix: ONVIF (#23787)
* bump package to include wsdl

* update requirements all
2019-05-09 20:17:55 -07:00
Geert van Horrik
8fc30569a9 Fix bad request for some IP ONVIF camera (#22972)
* Onvif camera improvements using zeep

* Fix static code checks

* Make obtain_input_uri async

* Convert several methods to async

* Fix static checks

* Fix static checks

* Fix requirements_all.txt

* Lint improvements

* Async services

* Use onvif-zeep-async and check if PTZ service is available before creating it

* Remove some hacks that are now defined in onvif-zeep-async

* Don't log input, it might contain sensitive information

* Static code analysis fixes

* Run requirements stuff

* Fix

* Remove suds requirement

* Onvif camera improvements using zeep

* Fix static code checks

* Make obtain_input_uri async

* Convert several methods to async

* Fix static checks

* Fix static checks

* Fix requirements_all.txt

* Lint improvements

* Async services

* Use onvif-zeep-async and check if PTZ service is available before creating it

* Remove some hacks that are now defined in onvif-zeep-async

* Don't log input, it might contain sensitive information

* Static code analysis fixes

* Run requirements stuff

* Fix

* Remove suds requirement

* Use dt_util.utcnow

* Platform setup should not have a return value

* Remove explicit dependency to zeep[async]

* Bump onvif-zeep-async to 0.1.2

* Update requirements_all.txt

* Add exception handling

* Fix static checks

* Don't catch generic exceptions

* Update camera.py
2019-05-03 10:01:12 -07:00
Paulus Schoutsen
a52f96b23a
Add stub services.yaml and make validation mandatory (#23213) 2019-04-18 15:13:35 -07:00
cgtobi
2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Rohan Kapoor
6ba9ccf052 Load requirements and dependencies from manifests. Fallback to current REQUIREMENTS and DEPENDENCIES (#22717)
* Load dependencies from manifests. Fallback to current DEPENDENCIES

* Fix typing

* Ignore typing correctly

* Split out dependency processing to a new method

* Fix tests

* Only pull from manifest if dependencies is non empty

* Inline temporary function

* Fix light tests [skip ci]

* Fix tests/common

* Fix some mqtt tests [skip ci]

* Fix tests and component manifests which have only one platform

* Fix rflink tests

* Fix more tests and manifests

* Readability over shorthand format

* Fix demo/notify tests

* Load dependencies from manifests. Fallback to current DEPENDENCIES

* Load requirements from manifests. Fallback to current REQUIREMENTS

* Fix typing

* Ignore typing correctly

* Split out dependency processing to a new method

* Only pull from manifest if dependencies is non empty

* Inline temporary function

* Fix tests and component manifests which have only one platform

* Fix rflink tests

* Readability over shorthand format

* Clean up requirements

* Use integration to resolve deps/reqs

* Lint

* Lint

* revert a change

* Revert a test change

* Fix types

* Fix types

* Add back cache for load component

* Fix test_component_not_found

* Move light.test and device_tracker.test into test package instead with manifest to fix tests

* Fix broken device_tracker tests

* Add docstrings to __init__

* Fix all of the light tests that I broke earlier

* Embed the test.switch platform to fix other tests

* Embed and fix the test.imagimage_processing platform

* Fix tests for nx584

* Add dependencies from platform file's DEPENDENCIES

* Try to setup component when entity_platform is setting up

Fix tests in helpers folder

* Rewrite test_setup

* Simplify

* Lint

* Disable demo component if running in test

Temp workaround to unblock CI tests

* Skip demo tests

* Fix config entry test

* Fix repeat test

* Clarify doc

* One extra guard

* Fix import

* Lint

* Workaround google tts
2019-04-11 01:26:36 -07:00
Paulus Schoutsen
cfe4cf30ad
Add manifests (#22699)
* Add manifests

* Update auto name

* Update codeowners

* Add requirements from platforms

* Minor cleanup

* Incorporate changes from awarecan PR
2019-04-03 21:14:45 -07:00
Tobias Sauerwein
048b100eea Clean up docstrings (#22679)
* Clean up docstrings

* Fix long lines

* Fix more docstrings

* Fix more docstrings

* Fix more docstrings
2019-04-03 17:40:03 +02:00
Pascal Vizeli
7066fb0d10
Fix ffmpeg default extra options (#22682) 2019-04-03 13:46:41 +02:00
drjared88
e085383d2d Update ONVIF component to SUPPORT_STREAM (#22569)
* Update Onvif component to SUPPORT_STREAM

* Update camera.py

* Update camera.py

* Update camera.py

Remove extra spaces.

* lookup URL when camera is added to hass and add extra guards
2019-03-31 15:12:55 -07:00
Pascal Vizeli
a55afa8119 Update ha-ffmpeg 2.0 (#22427) 2019-03-27 07:55:05 +01:00
Jason Hunter
bad0a8b342
Camera Preferences + Preload Stream (#22339)
* 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
2019-03-26 08:31:29 -04:00
Paulus Schoutsen
f5076188ef
Consolidate all platforms that have no tests (#22096)
* Consolidate

* Fix tests

* Update imports

* Fix import

* Use importlib because integration and package share name

* Fix more tests

* Update .coveragerc and CODEOWNERS
2019-03-16 20:44:05 -07:00