Commit Graph

58 Commits

Author SHA1 Message Date
Cody Cutrer
df365dc9a8
[homekit] Add (partial) Doorbell Service (#17130)
* [homekit] add Doorbell Service 
this is _not_ sufficient for HomeKit to present a doorbell.
it just shows as an unsupported accessory with the house icon,

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-10-28 21:44:53 +01:00
lsiepel
1a42353cc9
Multiple binding markdown fixes (#17422)
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
2024-09-28 17:46:53 +02:00
Cody Cutrer
a03056d30a
[homekit] Make Thermostat.CurrentHeatingCoolingMode optional (#17191)
Just default it to OFF if it's not linked. The experience in Home
app is still decent - it says "Cool to X", "Heat to X", or
"Set to X", instead of "Cooling to X", "Heating to X" if it was
actually running. I thought about defaulting it to "HEAT" or "COOL"
depending on the current target mode, but if it's set to "AUTO",
that's not a valid state for the current mode.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-08-20 15:30:47 +02:00
Cody Cutrer
01488dd5fb
[homekit] Support multiple values per enum mapping (#17144)
* [homekit] Support multiple values per enum mapping

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-08-06 08:11:41 +02:00
Cody Cutrer
213a0b7d51
[homekit] allow linking GarageDoorOpener directly to a Rollershutter (#17150)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-08-01 09:31:43 +02:00
Cody Cutrer
9a8baf464b
[homekit] Support lock optional characteristics on GarageDoorOpener (#17141)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-07-25 16:26:32 +02:00
Cody Cutrer
9362fcccdc
[homekit] Support UP/DOWN for WindowCoverings (#17138)
* [homekit] Support UP/DOWN for WindowCoverings

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-07-24 20:45:19 +02:00
Cody Cutrer
bb26e978c2
[homekit] Automatically assume valid enum values when linking to Switch/Contact (#17134)
this allows using switches and contacts for enums without additional configuration
if they already line up well with the first two values (such as they do for a
thermostat, when it represents a simple heater)

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-07-24 09:22:42 +02:00
Cody Cutrer
730333193d
[homekit] Make GarageDoorOpener.ObstructionStatus optional (#17137)
To simplify linking to "simple" things that don't have it.
It will just always return "not obstructed" if not linked

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-07-24 09:02:58 +02:00
Cody Cutrer
cbbc36697c
[homekit] implement StatelessProgrammableSwitch (#17129)
also supports adding multiple of them in a group, by supporting ServiceIndex
as an optional characteristic

refs #9969

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-07-23 08:22:27 +02:00
Cody Cutrer
9a19eaa0fa
[homekit] use java, not xtend, for code fences in README (#17128)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-07-22 21:09:46 +02:00
Cody Cutrer
6b54480dac
[homekit] Synthesize Thermostat.TargetTemperature in some cases (#17060)
* [homekit] synthesize Thermostat.TargetTemperature in some cases

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-07-22 20:16:47 +02:00
Cody Cutrer
3af703cfef
[homekit] Allow configuring thermostat modes via metadata (#17056)
* [homekit] allow configuring thermostat modes via metadata

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-07-15 00:18:10 +02:00
Cody Cutrer
344b653b85
[homekit] implement all AccessoryInformationService characteristics (#17031)
mostly as metadata static characteristics

fixes #9595

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-07-09 20:01:14 +02:00
Cody Cutrer
d9ceb63b82
[homekit] Unify all enum handling (#14036)
* [homekit] unify all enum handling

regardless of if it's a required or optional characteristic,
or even "boolean" enums

then allow number or switch items to be linked with enums

then update the docs listing the numeric value for enums

as part of this, global configuration of thermostat enum values
is no longer supported; you must use metadata.
in particular, for GarageDoorOpener, the global settings didn't
even actually work, so they should work now.

Fixes #13595

* [homekit] default-invert boolean items for garage door states

this was previously handled explicitly by the switch statement.
so need to set the inverted flag now that we're building a
mapping instead

* [homekit] document that CurrentDoorState can be linked to a Contact item
* [homekit] improve docs on invert param to createMapping

also fix a new helper method not properly passing through the inverted
param

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-03-22 13:58:12 +01:00
Jonas Bötsch
2ec097d529
[homekit] Update README.md (#14521)
Tilted blinds do not work when using the documented config. 
Changed it to a working example.
Refer here: https://community.openhab.org/t/homekit-addon-adjustable-blinds-not-working-anymore/144869
2023-03-03 15:12:44 +01:00
Cody Cutrer
0de87b15d2
[homekit] Implement IrrigationSystem Accessory (#14209)
* [homekit] Implement IrrigationSystem

Fairly trivial now, except that a ServiceLabelService has to be added
to the accessory.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-01-13 20:25:06 +01:00
Cody Cutrer
32909fa237
[homekit] Add support for TV accessory (#14055)
* [homekit] TV accessory

Now possible since we support multiple secondary services. Just need to explicitly
declare that InputSource is a linked service to a Television, not just a secondary
service.

Note also that since TV and related services have so many mandatary characteristics
that are often static, I introduced a new way to declare characteristics -
via metadata on the service's item. Honestly, I feel like it's a lot cleaner to
have a factory create the mandatory characteristics the same way as the optional
characteristics, and then construct the service ourselves instead of basing the
service on the specific accessory interface. But this commit is already big enough,
I didn't want to go refactoring _all_ of the accessories to do it that way just
yet. This is why I have "unused" metadata characteristic factory methods for
AirQuality, HeaterCooler, and Thermostat - I started to make those configurable
via metadata, then realized they were mandatory characteristics that couldn't
be found from metadata via the current infrastructure.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-01-12 15:29:50 +01:00
Holger Friedrich
0304d74f87
Fix Markdown warnings in README.md (#14187)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-01-09 17:51:12 +01:00
Tim Harper
9c5ea29ae0
[homekit] Add additional troubleshooting steps for homekit (#14046)
* [homekit] Add additional troubleshooting steps for homekit

Signed-off-by: Tim Harper <timcharper@gmail.com>
2023-01-04 20:32:29 +01:00
Cody Cutrer
e39e69144b
[homekit] support Rollershutter items for HoldPosition (#14045)
* [homekit] support Rollershutter items for HoldPosition

just send STOP to them

* [homekit] log a warning for incompatible HoldPosition items

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-12-27 11:55:12 +01:00
Cody Cutrer
b62e1455ff
[homekit] Allow configuring secondary services as members of a group (#13879)
* [homekit] allow configuring secondary services as members of a group

Required introduction of AccessoryGroup to represent the base
AccessoryInformationService for ease of configuring multiple of the
same service.

This is also "breaking" in that someone who previously had HomeKit
accessories nested directly inside of a group that was itself a
HomeKit accessory will now have those items grouped within the Home
app.

* [homekit] combine multiple readme sections on complex accessories

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-12-23 23:41:44 +01:00
Cody Cutrer
a079603aab
[homekit] allow configuring min/max light level (#14034)
since the default is weirdly 0.0001, yet my sensors can report a
straight 0.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-12-22 00:37:26 +01:00
Cody Cutrer
1dbcaf8f0c
[homekit] delay starting until a particular StartLevel (#13877)
* [homekit] delay starting until a particular StartLevel

instead of a blind "delay by seconds", the new default won't even
attempt to start until items are loaded (both file-based and UI-based),
with an additional config to let the user delay it any further (in
case they have items coming from JSR223 scripts that can't run until
at least SL20 anyway).

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-12-11 15:54:10 +01:00
Cody Cutrer
108c48dda5
[homekit] add BasicFan accessory (#13564)
* [homekit] add BasicFan accessory

This is Fan v1. It's a subset of FanV2, except that Home allows you
to customize the icon to show a ceiling fan.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-12-09 19:17:51 +01:00
Cody Cutrer
6a16c889f2
[homekit] persist all known accessories, to prevent loss of homekit information (#13484)
* [homekit] persist all known accessories, to prevent loss of homekit information

See the readme for more details, but basically this keeps track of every
accessory we've ever created, and if it no longer exists, presents a dummy
accessory instead. If the accessory comes back, nothing is lost in the Home
app; if you meant to prune it permanently, you have to run a console command.

there are also several fixes to prevent presenting the device with missing data -
such as when the bundle stops, _don't_ explicitly remove the accessories until
the server has stopped.

we also don't increment the configuration version unless the configuration
has _actually_ changed (so removing and re-adding the exact same thing
won't trigger the device to reconnect). this even works across restarts
of the bundle, because we're persisting all the accessory information
for dummy information anyway.

* [homekit] Address review comments for accessory persistence

* update hap-java to 2.0.4
* remove unused local variable
* [homekit] ensure accessories are replaced in a batch

so that HAP-Java can maintain subscriptions with the new objects

* [homekit] log individual dummy accessories up to 5
* [homekit] Tweak readme for dummy accessories slightly.

 * Be consistent with proper usage of useDummyAccessories.
 * Make the sentence more clear about the effects of having dummy accessories.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-12-08 13:52:30 +01:00
eugen
5c5b3c29c9
[homekit] support stop for blinds (#13788)
* implement new blinds logic
* fix NPE, improve emulated state

Signed-off-by: Eugen <eugen@relotrust.com>
2022-11-27 23:39:50 +01:00
eugen
54e934be3d
[homekit] simplify settings page, resize doc images (#13741)
* simplify config, resize images

Signed-off-by: Eugen <eugen@relotrust.com>
2022-11-20 20:07:45 +01:00
Cody Cutrer
66c7211b26
[homekit] increase flexibility of ColorTemperature (#13538)
* [homekit] increase flexibility of ColorTemperature

allow Number or Dimmer items, and mired or Kelvin units.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-22 20:24:51 +02:00
Cody Cutrer
507e714dd0
[homekit] fix BooleanItemReader to work with DimmerItems (#13507)
* [homekit] fix BooleanItemReader to work with DimmerItems

DimmerItems have a PercentType state, which is easily convertible
to OnOffType, but is not inherited from it. So take that into account.

i.e. a variable speed fan can use a single DimmerItem for both
ActiveStatus and RotationSpeed.

* [homekit] Document that Dimmer is a possible item type for several booleans

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-10 13:36:23 +02:00
Cody Cutrer
d83c32cd24
[homekit] allow configuring maxValue on VOCDensity (#13508)
* [homekit] allow configuring maxValue on VOCDensity

the default of 1000 is quite low in reality. tested and confirmed
working with iOS 16

* [homekit] allow step value to be configured for VOCDensity

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-10 13:30:13 +02:00
Cody Cutrer
0409484c2e
[homekit] allow RelativeHumidity as an optional characteristic on Thermostat (#13504)
also support QuantityType as a valid state type for double characteristics
(such as RelativeHumidity).

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-09 11:01:25 +02:00
Hans-Jörg Merk
31820ad740
Update README.md (#13497) 2022-10-06 23:15:55 +02:00
Cody Cutrer
64d97374ad
[homekit] allow NumberItems for BatteryLowStatus (#13449)
* [homekit] allow NumberItems for BatteryLowStatus

use a lowThreshold metadata config to infer if it's low

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-10-03 12:13:39 +02:00
Cody Cutrer
e4c9a40d03
[homekit] allow multiple bridge instances to break the 150 limit (#13226)
fixes #11508, #12927

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-08-12 09:55:39 +02:00
Cody Cutrer
f4fef5f6df
[homekit] support actual booleans in metadata config (#13228)
as well as strings, too.

reduces confusion, if someone doesn't know it needed to be a string

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-08-08 20:50:42 +02:00
eugen
6f3cb286d9
[homekit] Target Fan state - add support for Switch Item (#12985)
* add support for SwitchItem for target fan state

Signed-off-by: Eugen Freiter <freiter@gmx.de>
2022-07-25 21:47:21 +02:00
eugen
565dc19508
[homekit] fix for battery charging state (#12959)
* fix for battery charging state

Signed-off-by: Eugen Freiter <freiter@gmx.de>
2022-06-22 11:20:36 +02:00
eugen
f310cf7ca0
[homekit] add support for additional homekit accessories (#12536)
Signed-off-by: Eugen Freiter <freiter@gmx.de>
2022-04-26 19:37:54 +02:00
JacekKac
cc2cde2ace
typo in valve accessorie (#12616) 2022-04-18 13:50:22 +02:00
eugen
f1176a062b
[homekit] add support for complex accessories (#12346)
* Add complex accessories

Signed-off-by: Eugen Freiter <freiter@gmx.de>
2022-03-28 00:11:44 +02:00
Cody Cutrer
d4fb20d529
[homekit] use quantity type conversions for temperature characteristics (#12083)
if an Item associated with a temperature characteristic has a QuantityType
(of dimension Temperature) as its state, regardless of current unit,
use that to convert to celsius instead of any other configuration.

Note that this is only for supply values to HomeKit; commands coming from
HomeKit will still send a DecimalType with units according to the HomeKit-wide
useFahrenheit configuration.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-01-23 13:40:14 +01:00
eugen
b89ae048e2
[homekit] make min/max values for Color Temperature configurable (#11717)
* make min/max values for ColorTemprature configurable

Signed-off-by: Eugen Freiter <freiter@gmx.de>
2021-12-10 00:20:28 +01:00
eugen
1d65e10bba
[homekit] add setting to block homekit user/pairing deletion (#11731)
* add setting to block homekit user deletion and unpairing
* add logging
* remove . from settings label

Signed-off-by: Eugen Freiter <freiter@gmx.de>
2021-12-08 12:14:44 +01:00
Christoph Weitkamp
a04cfd3389
Fixed SAT findings for new SAT 0.11.1 release (#10518)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-14 15:11:31 +02:00
eugen
e7950ddbd1
[homekit] make usage of mDNS configurable (#10286)
* make usage of mDNS configurable

Signed-off-by: Eugen Freiter <freiter@gmx.de>
2021-03-12 17:18:09 +01:00
eugen
23ff9a0221
[homekit] make use of openHAB mDNS service (#10076)
* make use of openHAB mdns service
* remove unnecessary null check
* add network configuration back

Signed-off-by: Eugen Freiter <freiter@gmx.de>
2021-02-25 15:51:07 -08:00
eugen
50a01b439d
[homekit] extend support of inverted flag to other accessories (#10212)
Signed-off-by: Eugen Freiter <freiter@gmx.de>
2021-02-25 10:28:34 -08:00
eugen
e828baccca
[homekit] add support for flag "inverted" to lock accessory (#10169)
* add support for inverted to lock
* run spotless

Signed-off-by: Eugen Freiter <freiter@gmx.de>
2021-02-16 10:19:37 -08:00
eugen
8a2ac82b07
[homekit] make min and max temperature units depedent on useFahrenheitTemperature setting (#10074)
Signed-off-by: Eugen Freiter <freiter@gmx.de>
2021-02-06 23:04:32 -08:00