Commit Graph
86 Commits
Author SHA1 Message Date
Jason HunterandGitHub f1bb7b4a0f attempt to renew subscription immediately to stop endless loop if it fails after setup (#42651) 2020-10-31 09:15:11 -04:00
Jason HunterandGitHub 2a795c0397 Add guppy3 memory profile to Profiler integration (#42435)
* add guppy memory profile to profiler integration

* add output path to notification

* create new service for memory profile

* address review comments
2020-10-28 21:05:16 -04:00
Jason HunterandGitHub 6f2b0c756a Remove title string from Xbox translations (#42431) 2020-10-26 22:10:30 +01:00
Jason HunterandGitHub 33f0bf4c4a Do not guess app state in Xbox integration (#42067) 2020-10-18 23:30:44 -04:00
Jason HunterandGitHub 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 HunterandGitHub d5bf27427c Fix media source for Xbox integration (#41959)
* fix media content type

* fix comments
2020-10-16 15:02:24 -04:00
Jason HunterandGitHub c10fe4f723 Add sensors to Xbox integration (#41868)
* favorited friends binary sensors

* add binary_sensor to .coveragerc

* fix copy/paste comments...

* make sensor entities instead of attributes

* address PR review comments

* default state to None
2020-10-15 19:11:05 -04:00
Jason HunterandPaulus Schoutsen 303b7efd4b Bump ONVIF and pin Zeep (#41907) 2020-10-15 20:30:49 +00:00
Jason HunterandGitHub 32675e0e38 Bump ONVIF and pin Zeep (#41907) 2020-10-15 22:24:33 +02:00
Jason HunterandGitHub 2b1fc90de7 Add Media Source to Xbox Integration (#41833)
* initial implementation of xbox media source

* minor fixes

* fix lint

* add media class map to remove multi-line ternary
2020-10-14 15:02:08 -04:00
Jason HunterandGitHub 3013f39191 Add Remote entity to Xbox Integration (#41809) 2020-10-13 21:00:44 -04:00
c3ccea52a5 Add Browse Media to Xbox (#41776)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-13 17:51:51 +02:00
9877e8e25b Add Xbox Integration (#41697)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-13 15:37:01 +02:00
59daab9434 Fix camera play stream (#40641)
Co-authored-by: Justin Wong <46082645+uvjustin@users.noreply.github.com>
2020-09-28 12:28:44 +00:00
8bc62f3678 Fix camera play stream (#40641)
Co-authored-by: Justin Wong <46082645+uvjustin@users.noreply.github.com>
2020-09-28 14:24:30 +02:00
Jason HunterandPaulus Schoutsen 578c1b283a Sort Local Media Source and fix media class (#39858) 2020-09-09 20:34:13 +00:00
Jason HunterandGitHub 9358b5089e Sort Local Media Source and fix media class (#39858) 2020-09-09 22:19:30 +02:00
Jason HunterandGitHub 1a78d96014 allow creating directories from camera snapshot, stream record, and tensorflow file out (#39728) 2020-09-06 18:54:24 -04:00
Jason HunterandGitHub 3b88452b2f Upgrade TensorFlow to 2.3 (#39673) 2020-09-06 10:12:36 +02:00
706f1f8a66 Register media browser panel (#39655)
* register media browser panel

* Apply suggestions from code review.

Co-authored-by: Zack Arnett <arnett.zackary@gmail.com>

* Update homeassistant/components/media_source/__init__.py

Co-authored-by: Zack Arnett <arnett.zackary@gmail.com>

Co-authored-by: Zack Arnett <arnett.zackary@gmail.com>
2020-09-05 00:28:53 +02:00
f2b3e63ff6 Media Source implementation for Chromecast (#39305)
* Implement local media finder and integrate into cast

* update to media source as a platform

* Tweak media source design

* fix websocket and local source

* fix websocket schema

* fix playing media

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Add resolve_media websocket

* Register that shit

* Square brackets

* Sign path

* add support for multiple media sources and address PR review

* fix lint

* fix tests from auto whitelisting config/media

* allow specifying a name on the media source

* add tests

* fix for python 3.7

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* add http back to cast and remove guess_type from executor as there is no i/o

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-04 11:16:29 -04:00
f0f112ff42 Upgrade to TensorFlow 2 (#38384)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-08-07 08:42:37 +00:00
3546a82cfb Upgrade to TensorFlow 2 (#38384)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-08-07 08:56:28 +02:00
Jason HunterandGitHub 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
Jason HunterandGitHub 94d8e77f8c Add non-root dev container user (#34984)
* add non-root container user

* fix dockerfile and homeassistant editable install

* just install in home directory

* less impactful default changes

* separate RUN for better layer caching

* use vscode-remote base image
2020-06-03 09:55:25 +02:00
Jason HunterandPaulus Schoutsen c710f9994c Fix empty preset element in ONVIF response (#36182) 2020-05-28 15:51:16 -07:00
Jason HunterandGitHub cb2821b512 Fix empty preset element in ONVIF response (#36182) 2020-05-26 21:16:15 -07:00
Jason HunterandFranck Nijhof ef3019f922 fix preset warning (#36110) 2020-05-26 12:11:45 +02:00
Jason HunterandFranck Nijhof 79ed8b03dc guard against missing topic (#36108) 2020-05-26 12:11:41 +02:00
Jason HunterandFranck Nijhof 179e601966 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-26 12:11:08 +02:00
Jason HunterandGitHub 5dfae0eb7c fix preset warning (#36110) 2020-05-25 13:38:57 +02:00
Jason HunterandGitHub b0012bd5a6 guard against missing topic (#36108) 2020-05-25 13:37:47 +02:00
Jason HunterandGitHub 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 HunterandFranck Nijhof cf6cc6c07c 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-24 11:28:02 +02:00
Jason HunterandFranck Nijhof 9e1c35cfd7 Bump pyAV and close unclosed outputs (#35960)
* bump pyAV and close unclosed outputs

* skip stream from coverage for now

* fix divide by zero error
2020-05-24 11:27:37 +02:00
Jason HunterandFranck Nijhof 8a9ba7e72d Fix ONVIF Transport (#35932)
* allow lib to create AsyncTransport

* fix transport close issue
2020-05-24 11:27:22 +02:00
Jason HunterandGitHub 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 HunterandGitHub 0e83cfade1 Fix ONVIF Transport (#35932)
* allow lib to create AsyncTransport

* fix transport close issue
2020-05-22 19:46:11 -04:00
Jason HunterandGitHub 8cd905487e Bump pyAV and close unclosed outputs (#35960)
* bump pyAV and close unclosed outputs

* skip stream from coverage for now

* fix divide by zero error
2020-05-22 18:13:37 +02:00
Jason HunterandPascal Vizeli ae66f4250c fix mjpeg issue along with some cameras not returning event capabilities properly (#35885) 2020-05-21 08:46:42 +00:00
Jason HunterandGitHub a82900ae27 fix mjpeg issue along with some cameras not returning event capabilities properly (#35885) 2020-05-20 21:26:27 -04:00
Jason HunterandBram Kragten d629a55134 Fix ONVIF subscription renewal (#35792)
* fix subscription renewal

* catch ValueError for #35762
2020-05-19 20:11:20 +02:00
Jason HunterandGitHub aeae4edb74 Fix ONVIF subscription renewal (#35792)
* fix subscription renewal

* catch ValueError for #35762
2020-05-18 23:02:23 -04:00
Jason HunterandFranck Nijhof 316d44cf33 ONVIF: Add check around media capabilities (#35667) 2020-05-16 11:05:07 +02:00
Jason HunterandGitHub 3a3f39b642 ONVIF: Add check around media capabilities (#35667) 2020-05-15 20:05:32 +02:00
Jason HunterandFranck Nijhof 05778ad307 additional log info and strings fix (#35622) 2020-05-14 23:26:13 +02:00
Jason HunterandFranck Nijhof b83adad417 Additional checks for ONVIF event capabilities (#35599)
catch any exceptions when pulling event capabilities and assume it is not supported
2020-05-14 23:25:51 +02:00
Jason HunterandGitHub b7ab07c987 additional log info and strings fix (#35622) 2020-05-14 11:25:58 -04:00
Jason HunterandGitHub 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
Jason HunterandGitHub 132bb4e890 ONVIF Event Implementation (#35406)
Initial implementation of ONVIF event sensors
2020-05-11 13:12:12 -04:00
Jason HunterandGitHub 19734e7b2c Refactor ONVIF (#35222) 2020-05-06 09:29:59 -07:00
Jason HunterandGitHub 850b5cb02b Config flow for ONVIF (#34520) 2020-04-30 23:15:40 -07:00
Jason HunterandGitHub 40d3d64027 Fix recording duration flag (#34648) 2020-04-24 14:18:58 -07:00
Jason HunterandPaulus Schoutsen 04720175b9 fix onvif wsdl import - take 2 (#23807) 2019-05-14 07:19:29 +02:00
Jason HunterandPaulus Schoutsen 03cd4480df fix onvif wsdl import - take 2 (#23807) 2019-05-10 23:15:21 -07:00
Jason HunterandPascal Vizeli d5533cc10f Beta Fix: ONVIF (#23787)
* bump package to include wsdl

* update requirements all
2019-05-10 06:16:02 +00:00
Jason HunterandPaulus Schoutsen df6846344d Beta Fix: ONVIF (#23787)
* bump package to include wsdl

* update requirements all
2019-05-09 20:17:55 -07:00
Jason HunterandPaulus Schoutsen e7102eaf30 only preload when stream is setup (#23134) 2019-04-15 22:36:57 -07:00
Jason HunterandPaulus Schoutsen 43487aa0d6 Stream Timestamp Fixes (#22912)
* reset timestamps for streams that do not do so when first requested

* update inline comments to be more descriptive
2019-04-08 23:24:51 -07:00
Jason HunterandPascal Vizeli f51e8c3012 coerce duration and lookback to int so they can be used in template automation (#22819) 2019-04-08 07:59:01 +00:00
Jason HunterandCharles Garwood 3fde1d3bab coerce duration and lookback to int so they can be used in template automation (#22819) 2019-04-07 13:08:08 -04:00
Jason HunterandPaulus Schoutsen 5252c92670 use the input stream codec as the template for the output streams (#22747) 2019-04-04 23:49:12 -07:00
Jason HunterandPaulus Schoutsen 8c657d4254 use the input stream codec as the template for the output streams (#22747) 2019-04-04 23:40:22 -07:00
Jason HunterandPaulus Schoutsen a75b151dfa fix flaky test (#22748) 2019-04-04 23:39:19 -07:00
Jason HunterandPaulus Schoutsen 26726af689 Stream Record Service (#22456)
* Initial commit of record service for live streams

* fix lint

* update service descriptions

* add tests

* fix lint
2019-03-27 21:47:07 -07:00
Jason HunterandPaulus Schoutsen 8a6d9cc0e4 reset unsub to None on timeout (#22404) 2019-03-26 07:39:59 -07:00
Jason HunterandPaulus Schoutsen 24a55834f9 Prefer TCP for RTSP streams (#22338)
## Description:

For RTSP streams, set the `prefer_tcp` FFMPEG flag.  This should resolve some of the "green feed" issues that some users are reporting, likely due to packets being lost over UDP on their network.

Resources: [FFMPEG protocols documentation](https://ffmpeg.org/ffmpeg-protocols.html#rtsp)

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.
2019-03-26 07:39:55 -07:00
Jason HunterandGitHub 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
Jason HunterandPascal Vizeli baa4945944 reset unsub to None on timeout (#22404) 2019-03-26 08:39:09 +01:00
Jason HunterandRobbie Trencheny 0ae38aece8 Prefer TCP for RTSP streams (#22338)
## Description:

For RTSP streams, set the `prefer_tcp` FFMPEG flag.  This should resolve some of the "green feed" issues that some users are reporting, likely due to packets being lost over UDP on their network.

Resources: [FFMPEG protocols documentation](https://ffmpeg.org/ffmpeg-protocols.html#rtsp)

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.
2019-03-24 17:13:20 -07:00
Jason HunterandGitHub 49b92b5349 fix where PLATFORM_SCHEMA gets pulled from (#22334) 2019-03-23 23:49:44 -04:00
Jason HunterandPaulus Schoutsen 56cbe8a73f Stream fixes (#22238)
* fix issues with out of order packets, and empty first packet on some IP camera models

* do not skip the first packet
2019-03-21 13:05:09 -07:00
Jason HunterandPaulus Schoutsen 07dc23a0e3 Stream fixes (#22238)
* fix issues with out of order packets, and empty first packet on some IP camera models

* do not skip the first packet
2019-03-21 07:31:55 -07:00
Jason HunterandPaulus Schoutsen 1c9b750e36 Fix resetting access token on streams with keepalive (#22148) 2019-03-18 17:04:41 -07:00
Jason HunterandCharles Garwood ce5cf5803c Fix resetting access token on streams with keepalive (#22148) 2019-03-18 09:27:34 -04:00
Jason HunterandPaulus Schoutsen f218564185 delete previously removed service option from services yaml (#22123) 2019-03-16 23:26:17 -07:00
Jason HunterandPaulus Schoutsen 54489a3514 delete previously removed service option from services yaml (#22123) 2019-03-16 23:16:05 -07:00
Jason HunterandPaulus Schoutsen 7a88c58ffa Beta Fix: FFMPEG and Stream component (#22091)
* remove stream_source from ffmpeg and onvif and add to generic ip cam

* fix tests
2019-03-15 23:19:52 -07:00
Jason HunterandPaulus Schoutsen f396de623b Beta Fix: FFMPEG and Stream component (#22091)
* remove stream_source from ffmpeg and onvif and add to generic ip cam

* fix tests
2019-03-15 23:19:32 -07:00
Jason HunterandPaulus Schoutsen 7ccd0bba9a Live Streams Component (#21473)
* 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
2019-03-11 19:57:10 -07:00
Jason HunterandPaulus Schoutsen f65e57bf7b Add automation and script events to logbook event types (#19219) 2018-12-12 17:18:37 +01:00
Jason HunterandPaulus Schoutsen 7de509dc76 Add automation and script events to logbook event types (#19219) 2018-12-12 15:54:25 +01:00
Jason HunterandPaulus Schoutsen b900005d1e New Events and Context Fixes (#18765)
* Add new events for automation trigger and script run, fix context for image processing, add tests to ensure same context

* remove custom logbook entry for automation and add new automation event to logbook

* code review updates
2018-12-04 09:45:17 +01:00
Jason HunterandPaulus Schoutsen 466d3a5ef8 catch key error when saving image (#18365) 2018-11-15 13:56:12 +01:00
Jason HunterandPaulus Schoutsen 9cb6464c58 catch key error when saving image (#18365) 2018-11-11 17:44:41 +01:00
Jason HunterandPaulus Schoutsen 45484ba569 TensorFlow image_processing component (#17795)
* initial tensorflow image_processing component

* linting fixes

* make displayed attribute a summary of objects

* fix missed merge conflict and add warning supression back in for CPU type

* restructure tensorflow component to install on the fly, remove from Docker

* add both matches and summary as attributes

* address review comments

* do not use deps folder as default, as it should only be managed by HA.  Update to have tensorflow in root config directory
2018-11-02 21:57:03 +01:00