1
mirror of https://github.com/home-assistant/core synced 2024-09-06 10:29:55 +02:00
Commit Graph

45 Commits

Author SHA1 Message Date
Penny Wood
84e6813779 Rename via_hub to via_device (#24360)
* Rename via_hub to via_device

* Fixed registry interactions
2019-06-10 09:10:44 -07:00
Jc2k
bcee3f9570 homekit_controller no longer logs with transient network errors causing crypto failures as it will auto recover (#24193) 2019-05-30 09:40:38 -07:00
Jc2k
5b0d1415ad Have homekit_controller use device registry (#23874)
* Add device registry support

* HK doesn't use mac as a connection id
2019-05-17 08:41:20 +02:00
Jc2k
b8cbd39985 HomeKit Controller: Adopt config entries for pairing with homekit accessories (#23825)
* Fix user initiated pairing + show more user friendly name

* Add lock around async_refresh_entity_map

* Migrate homekit_controller to config entries.

* Improve docstring

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* Add dummy async_setup_platform

* add_service -> async_add_service

* Add missing returns

* Enable coverage checks for homekit_controller
2019-05-12 23:56:05 -07:00
Jc2k
21a194f9d8 Review feedback from #23191 (#23233) 2019-04-19 08:39:06 -04:00
Jc2k
4ac9a2e9de Add storage for cacheable homekit entity maps. (#23191) 2019-04-18 08:55:34 -07:00
Jc2k
f7afd9d6bc Fix handling of homekit_controler zeroconf c# changes (#22995) 2019-04-17 10:02:51 -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
Jc2k
16e0953f26 Fix racy homekit_controller platform setup caused by #22368 (#22655) 2019-04-02 09:57:58 +02:00
Jason Hu
8d86722c0e Fix dev branch (#22493) 2019-03-28 11:09:12 +01:00
Paulus Schoutsen
92457ca5ca
Fix syntax error 2019-03-27 20:16:00 -07:00
Jc2k
8bf5e57b7f Move HKDevice into connection (#22430) 2019-03-27 20:01:10 -07:00
Jc2k
d8817bb127 Remove homekit_controller duplicate legacy pairing loader code (#22442) 2019-03-28 00:36:50 +01:00
Jc2k
133ae63ed0 Add missing append (#22414) 2019-03-26 07:39:05 -07:00
Jc2k
a62c116959 Remove get_serial helper that is no longer needed. (#22368) 2019-03-25 23:49:51 -07:00
Jc2k
f997957054 Remove unused const (#22383) 2019-03-25 16:28:34 +01:00
Jc2k
0344c761fc Better handling of HomeKit accessory-information service (#22171)
* HomeKit controller: Better handling of accessory-information service

* Changes from review
2019-03-19 15:04:20 -04:00
Jc2k
c0b859d8da Set homekit controller entity as unavailable if new connections fail (#21901)
* Set entity as unavailable if new connections fail

* Fix docstring
2019-03-12 18:45:34 -07:00
Jc2k
2b1b47bfdd homekit_controller: Bump homekit to 0.13.0 (#21965)
* Bump homekit to 0.13.0

* Update gen_requirements_all.py

* Escape values used in TESTS_REQUIREMENTS
2019-03-12 21:54:08 +01:00
Jc2k
5e2302e469 Add an asyncio Lock around pairing, which cant be used concurrently (#21933) 2019-03-11 11:59:41 -07:00
Jc2k
dbf129dfdd Start preparing for homekit_controller config entries (#21564)
* Start preparing for homekit_controller config entries

* Review feedback

* Review feedback

* Only use the vol.strip validator for pairing_code

* CV not required now

* Changes from review

* Changes after review
2019-03-06 19:44:52 -08:00
cpopp
84b84559a4 Add support for homekit controller sensors (#21535)
Adds support for homekit devices with temperature, humidity, and
light level characteristics (such as the iHome iSS50)
2019-02-28 10:09:04 -08:00
koreth
3e9376c418 Handle capitalized HomeKit property names (#21382)
The Velux ACTIVE gateway uses `C#` rather than `c#` as the name of
the property that holds the count of accessories. Apple's HomeKit docs
suggest that properties should be case-insensitive, so update the
code to not assume the property names are lower case.
2019-02-24 13:56:52 +01:00
Fabian Affolter
3736120c6a
Update file header (#21061)
* Update file header

* Fix lint issue

* Fix lint issue
2019-02-14 16:01:46 +01:00
Jc2k
ee3631e93e Fix homekit_controller non-standard hk characteristics (#20824) 2019-02-08 11:00:51 +01:00
Jc2k
e22802a4d4 Add support for HomeKit motion sensor devices (#20555) 2019-01-28 20:30:56 -08:00
Jc2k
abeb875c61 Homekit controller BLE groundwork (part 2) (#20548)
* Only fetch values of characteristics we are tracking.

* Use callbacks on subclasses to update individual values

* Update alarm_control_panel to use update callbacks

* Update climate to use update callbacks

* Update cover to use update callbacks

* Update light to use update callbacks

* Update lock to use update callbacks

* Update switch to use update callbacks

* Remove compatibility code as all entities migrated

* pylint by name rather than code
2019-01-28 21:27:26 +01:00
Jc2k
41c1997b88 Homekit controller BLE groundwork (#20538)
* Define the characteristics to poll (or subscribe to) up front

* Configure characteristics immediately instead of during first poll

* Do as much cover configuration upfront as possible

* Remove test workaround as no longer needed

* Remove switch code that is already handled by HomeKitEntity

* Remove lock code already handled by HomeKitEntity

* Remove light code already handled by HomeKitEntity

* Remove alarm code already handled by HomeKitEntity

* Remove climate code already handled by HomeKitEntity
2019-01-28 17:21:20 +01:00
Jc2k
a396ee2cb5 Bump homekit==0.12.2 + improve controller reliability (#20325)
Sessions were timing out and requiring a HA restart in order to restore
functionality. Network disconnects are now handled and sessions will be
automatically recovered after they fail.
2019-01-23 20:44:21 +01:00
Austin Drummond
3b83a64f7c Add support for HomeKit Controller covers (#19866)
* Added support for HomeKit Controller covers

* removed copied code

* more linting fixes

* added device type to service info

* added checks for value in characteristics

* added state stopped parsing

* removed logger

* removed unused args

* fixed inits

* removed unused imports

* fixed lint issues

* fixed lint issues

* remove state_unknown

* remove validation of kwargs in homekit controller covers

* guarantee tilt position is not none before setting
2019-01-13 19:09:47 +01:00
Austin Drummond
7676b3fbe8 Add support for HomeKit Controller Locks (#19867)
* Added HomeKit Controller Lock

* cleaned up code according to standards

* fixed lint issues

* added private constant for jammed state

* removed state_unknown
2019-01-12 03:48:28 +01:00
Austin Drummond
bf40bea965 Support for Homekit controller/alarm control panel (#19612)
* added support for homekit security systems

* fixed linting issues

* fixed indentation issues

* simplifired logic on homekit_controller alarm controller panel

* cleaned up battery level const on homekit controller alarm control panel
2019-01-04 12:54:37 -07:00
Jc2k
855274e354 Fix homekit_controller pairing regression (#19654)
* Fix homekit_controller pairing regression

* Use constant for pairing file name
2018-12-30 14:44:26 -05:00
Jc2k
e0f50a9e54 Update homekit controller to homekit==0.12.0 (#19549) 2018-12-24 22:13:17 +01:00
Filip Bednárik
9329ec2486 Add support for switches in homekit controller (#17916) 2018-11-06 15:32:32 +01:00
Ville Skyttä
707b7c202d Narrow scope of various pylint inline disables (#15364)
* Narrow scope of various pylint inline disables

* Whitespace tweaks
2018-10-10 12:17:11 +02:00
Adam Mills
3abdf217bb Homekit controller reconnect (#17060)
* Add threaded call_later helper

* Reconnect to device when connection fails

* Consolidate connection logs and warn on first
2018-10-04 09:25:05 +02:00
Matthew Garrett
db3cdb288e Update HomeKit module code (#15502)
This fixes a bunch of bugs, including issues with concurrency in devices
that present multiple accessories, devices that insist on the TLV entries
being in the order that Apple use, and handling devices that send headers
and data in separate chunks. This should improve compatibility with
a whole bunch of HomeKit devices.
2018-07-17 10:06:06 +02:00
Matthew Garrett
c587536547 Ignore some HomeKit devices (#15316)
There are some devices that speak HomeKit that we shouldn't expose. Some
bridges (such as the Hue) provide reduced functionality over HomeKit and
have a functional native API, so should be ignored. We also shouldn't
offer to configure the built-in Home Assistant HomeKit bridge.
2018-07-12 11:52:37 +02:00
Ville Skyttä
b92350fb55 Lint cleanup (#15103)
* Remove unneeded inline pylint disables

* Remove unneeded noqa's

* Use symbol names instead of message ids in inline pylint disables
2018-06-25 13:05:07 -04:00
Adam Mills
038168c417
Support for Homekit Controller climate devices (#15057)
* Support for Homekit Controller climate devices

* Handle stale state when operating mode off
2018-06-25 09:45:26 -04:00
Ville Skyttä
cb646e48d0 Upgrade pylint to 1.9.2 (#14916) 2018-06-13 07:08:39 -04:00
Matthew Garrett
ef48a7ca2c Fix Python 3.6 compatibility for HomeKit controller (#14160)
Python 3.6's http client passes an additional argument to _send_output,
so add that to the function definition.
2018-04-29 09:46:36 +02:00
Matthew Garrett
e4cb3af76d Handle HomeKit configuration failure more cleanly (#14041)
* Handle HomeKit configuration failure more cleanly

Add support for handling cases where HomeKit configuration fails, and give
the user more information about what to do.

* Don't consume the exception for a homekit.UnknownError

If we get an UnknownError then we should alert the user but also still
generate the backtrace so there's actually something for them to file in
a bug report.
2018-04-22 16:38:01 -04:00
Matthew Garrett
ac2298189e Add support for controlling homekit lights and switches (#13346)
* Add support for controlling homekit lights and switches

This adds support for controlling lights and switches that expose a HomeKit
control interface, avoiding the requirement to implement protocol-specific
components.

* Comment out the homekit requirement

This needs to build native code, so leave it commented for now

* Review updates

* Make HomeKit auto-discovery optional

Add an "enable" argument to the discovery component and add a list of
optional devices types (currently just HomeKit) to discover

* Further review comments

* Update requirements_all.txt

* Fix houndci complaints

* Further review updates

* Final review fixup

* Lint fixups

* Fix discovery tests

* Further review updates
2018-04-13 19:25:35 +02:00