Commit Graph

205 Commits (dfac9c5e039e90f85c43bfa93b50f94311721631)

Author SHA1 Message Date
HomeAssistant Azure 492874c4a0 [ci skip] Translation update 2020-06-06 00:03:33 +00:00
HomeAssistant Azure 08e85696c1 [ci skip] Translation update 2020-06-04 00:04:15 +00:00
HomeAssistant Azure 763ab79e6c [ci skip] Translation update 2020-06-03 00:03:00 +00:00
J. Nick Koston 5f4fdaa171
Remove zeroconf options from homekit (#35687)
* Remove zeroconf options from homekit

homekit uses the system shared zeroconf instance which
made the interface choice option controlled by the
zeroconf integration setting.

* change to cv.deprecated

* adj

* fix remaining tests from original merge conflict

* remove invalidation_version
2020-06-02 17:47:39 -05:00
J. Nick Koston 1c663dc179
Mark homekit accessories unavailable if the underlying entity is unavailable (#35685)
* Mark homekit accessories unavailable if the underlying entity is unavailable.

* bump pyhap to 2.9.0

* bump hap

* Update homeassistant/components/homekit/accessories.py

Co-authored-by: Franck Nijhof <git@frenck.dev>

Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-06-01 10:11:48 -05:00
J. Nick Koston 879e2d1afd
Improve stability of homekit accessory ids (#35691) 2020-05-26 22:15:00 -07:00
J. Nick Koston 8cbee76929
Add support for homekit camera motion notification (#35994)
* Add support for homekit camera motion notification

A motion sensor can now be linked to the cameras.

* Increase coverage
2020-05-25 18:05:38 -05:00
J. Nick Koston 3dfeec5033
Implement async_get_stream_source in the camera integration (#35704) 2020-05-25 15:41:50 -07:00
J. Nick Koston 4313d4b26b
Ensure homekit bridge state is restored before creating devices (#36098)
* Ensure homekit bridge state is restored before creating devices

* Tests to ensure homekit device registry entry is stable

* remove stray continue
2020-05-25 11:17:30 -05:00
J. Nick Koston 80de233276
Ensure homekit functions if numpy is unavailable (#35931) 2020-05-23 02:52:33 +02:00
J. Nick Koston b57cabfce7
Homekit should skip devices that are missing in device registry (#35857)
* Homekit should skip devices that are missing in device registry

* Add test for this failure state
2020-05-21 10:30:18 +02:00
Nick Whyte a51372f7b3
Fire events on homekit TV remote key press (#29588)
* Fire events on homekit TV remote key press

* Changes from code review

* black

* isort

* flake8

* Update tests/components/homekit/test_type_media_players.py

Co-authored-by: J. Nick Koston <nick@koston.org>

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-19 08:11:04 -05:00
J. Nick Koston 8eb7777561
Ensure homekit version strings conform to spec (#35741)
HomeKit requires all version strings to be in the
format MAJOR.MINOR.REVISION
2020-05-17 15:51:51 -05: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
HomeAssistant Azure 9586e9ebef [ci skip] Translation update 2020-05-15 00:02:56 +00:00
Paulus Schoutsen 0efeefe3b2 Update translations 2020-05-13 11:27:21 -07:00
J. Nick Koston 1bb01dccf5
Update HAP-python to 2.8.4 (#35541)
Fix race condition that causes pairing and unpairing failures. ikalchev/HAP-python#246
Fix loop on dropped connections that causes temporary stalls and connection loss. ikalchev/HAP-python#249
Fix exception on missing video fields. ikalchev/HAP-python#245
2020-05-12 10:03:12 -05:00
J. Nick Koston 751529feca
Use system zeroconf singleton for homekit (#35502)
Zeroconf instances are expensive so we share a single instance
instead of running multiple.
2020-05-11 13:21:16 -05:00
J. Nick Koston 0a9b373edb
Show device details in homekit accessory service info (#35100)
* Show device info in homekit accessory service info

* fix conflict
2020-05-11 09:09:48 -05:00
J. Nick Koston 31ee54c133
Ensure homekit camera stream can be restarted after failure (#35384)
* Ensure camera stream can be restarted after failure

* If ffmpeg failed to start, was killed, or the iOS device
closed the stream right away, the stream could never
be started until the HomeKit bridge was restarted.

* watch ffmpeg instead of checking only once

* handle forceful shutdowns gracefully

* Increase coverage
2020-05-11 08:17:10 -05:00
J. Nick Koston 742e36ba26
Reduce context switching in homekit state updates (#35147) 2020-05-10 22:10:08 -07:00
J. Nick Koston 2e018ad841
Make homekit camera snapshots HAP spec compliant (#35299) 2020-05-10 22:09:05 -07:00
J. Nick Koston 497c01c651
Make homekit TV media players aware of STATE_STANDBY (#35282)
This was previously added to non-TV media players.
2020-05-10 17:35:54 -05:00
stickpin a38bb5b33b
Add Homekit cameras codecs (#35238)
* Homekit cameras - Add codecs support

* Add valid_codecs + move audio application parameter

* Increase video bufsize

* Increase audio bufsize

* Update config flow to be aware of the copy option

* Add tests for copy video and audio codec

* remove unused from test

* remove unused from test

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-07 09:55:09 -05:00
Greg Thornton dd715fcc3a
Add homekit camera support (#32527)
* Add homekit camera support

* Cleanup pyhapcamera inheritance

* Add camera to homekit manifest

* Use upstream pyhap server handler in homekit

* Remove unused homekit constants

* Fix lint errors in homekit camera

* Update homekit camera log messages

* Black after conflict fixes

* More conflict fixes

* missing srtp

* Allow streaming retry when ffmpeg fails to connect

* Fix inherit of camera config, force kill ffmpeg on failure

* Fix audio (Home Assistant only comes with OPUS)

* Fix audio (Home Assistant only comes with OPUS)

* Add camera to the list of supported domains.

* add a test for camera creation

* Add a basic test (still needs more as its only at 44% cover)

* let super handle reconfigure_stream

* Remove scaling as it does not appear to be needed and causes artifacts

* Some more basic tests

* make sure no exceptions when finding the source from the entity

* make sure the bridge forwards get_snapshot

* restore full coverage to accessories.py

* revert usage of super for start/stop stream

* one more test

* more mocking

* Remove -tune zerolatency, disable reconfigure_stream

* Restore -tune zerolatency

Co-authored-by: John Carr <john.carr@unrouted.co.uk>
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-04 19:03:46 -05:00
HomeAssistant Azure 78f846d532 [ci skip] Translation update 2020-05-03 00:02:26 +00:00
J. Nick Koston 4de30ca2ce
Improve stability of homekit media players (#35080) 2020-05-02 14:15:44 -07:00
J. Nick Koston 842e09923a
Cleanup homekit strings spacing (#35056) 2020-05-01 22:34:43 -05:00
HomeAssistant Azure f4f2aff5b6 [ci skip] Translation update 2020-05-02 00:04:57 +00:00
J. Nick Koston e6be297fba
Bump HAP-python to 2.8.3 (#35023)
* Fixes camera support
2020-05-01 11:03:20 -05:00
J. Nick Koston 793592b2b8
Config flow for homekit (#34560)
* Config flow for homekit

Allows multiple homekit bridges to run

HAP-python state is now stored at .storage/homekit.{entry_id}.state
aids is now stored at .storage/homekit.{entry_id}.aids

Overcomes 150 device limit by supporting
multiple bridges.

Name and port are now automatically allocated
to avoid conflicts which was one of the main
reasons pairing failed.

YAML configuration remains available in order to offer entity
specific configuration.

Entries created by config flow can add and remove
included domains and entities without having to restart

* Fix services as there are multiple now

* migrate in executor

* drop title from strings

* Update homeassistant/components/homekit/strings.json

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

* Make auto_start advanced mode only, add coverage

* put back title

* more references

* delete port since manual config is no longer needed

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-04-30 23:05:06 -05:00
J. Nick Koston 799d98eaf0
Cleanup homekit callbacks and jobs (#34975) 2020-04-30 15:49:16 -07:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
J. Nick Koston bf5cc22bef
Fix preservation of homekit fan speed on toggle (#34971) 2020-04-30 11:34:25 -07:00
J. Nick Koston e01ceb1a57
Fix handling homekit thermostat states (#34905) 2020-04-30 00:09:33 -07:00
J. Nick Koston fcd58b7c9b
Avoid error when battery appears after homekit has started (#34906) 2020-04-30 00:08:56 -07:00
J. Nick Koston 6ce0819287
Prevent homekit fans from going to 100% than speed when turning on (#34875) 2020-04-29 14:00:31 -07:00
J. Nick Koston 7ff196d043
Restore ability to overwrite homekit max temp bound (#34612) 2020-04-23 13:53:31 -07:00
J. Nick Koston a7e8446454
Remember homekit aids for entities without a unique id (#34587)
* Remember homekit aids for entities without a unique id

* add backwards compat

* increase cover
2020-04-23 12:07:55 -05:00
J. Nick Koston 6c3ea2a904
Fix zeroconf interface being ineffective in HomeKit (#34516) 2020-04-21 20:46:19 -07:00
J. Nick Koston 96649a7e27
Use registry to find linked batteries for homekit (#33519) 2020-04-21 17:43:49 -07:00
J. Nick Koston d06fce6997
Display Homekit QR code when pairing (#34449)
* Display a QR code for homekit pairing

This will reduce the failure rate with HomeKit
pairing because there is less chance of entry
error.

* Add coverage

* Test that the qr code is created

* I cannot spell

* Update homeassistant/components/homekit/__init__.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/homekit/__init__.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-04-21 17:38:43 -05:00
Paulus Schoutsen 19be31d13a
Migrate HomeKit to use describe_event for logbook support (#34485) 2020-04-20 17:48:09 -07:00
J. Nick Koston f0d553514d
Add vacuum support to homekit (#34386) 2020-04-20 08:00:52 -07:00
Jc2k a80ce60e75
Store HomeKit generated accessory id against unique_id where possible (#33109)
* HomeKit: Store generated aid against unique_id where possible

* Fix conflict

* Fix max accessories check

* homekit counts the bridge as an accessory

* Add coverage for aidmanager

* prepare for merge

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-04-19 13:51:09 -05:00
J. Nick Koston 4e095e9fff
Eliminate homekit media_player event storms on startup (#34399)
This is the final event storm reduction as a followup
to #34245
2020-04-19 08:34:32 -05:00
J. Nick Koston 591845ce23
Add missing services to Homekit services yaml (#34349)
* Add missing services to homekit services.yaml

* Add missing services to homekit services.yaml
2020-04-17 14:28:58 -05:00
J. Nick Koston b87b618c94
Resolve homekit not updating motion sensors (#34282)
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
2020-04-16 16:15:37 -07:00
J. Nick Koston 5e3e4bda28
Prevent a single accessory setup failure from breaking all HomeKit accessories (#34263)
* Prevent a single accessory setup failure from breaking all HomeKit accessories

Raise the max devices to 150 as the spec allows for this
many.  Previously 100 made sense because of the event
storms when homekit started would sometimes break pairing,
as these have largely been fixed in 0.109 (still a few
to cleanup) using the HAP spec limit of 150 is now possible.

* Handle both failure states
2020-04-15 21:40:38 -05:00