Commit Graph

151 Commits

Author SHA1 Message Date
Cody Cutrer
93672ce16b [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>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:10 +02:00
Cody Cutrer
7861ccfd59 [homekit] Support multiple values per enum mapping (#17144)
* [homekit] Support multiple values per enum mapping

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:07 +02:00
Cody Cutrer
476a37544a [homekit] allow linking GarageDoorOpener directly to a Rollershutter (#17150)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:06 +02:00
Cody Cutrer
23c6db92f4 [homekit] Fix invertedness of GarageDoorOpener characteristics (#17181)
In #17137, CurrentDoorState and TargetDoorState were moved from being part
of the accessory itself, to using the CharacteristicFactory, but they lost the
flag that default-inverts them. So make sure to pass that flag in the new location
that the mapping is created.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:06 +02:00
Cody Cutrer
180a78e461 [homekit] Fix duplicate name characteristic errors (#17151)
Depending on how the accessory initializes, optional characteristics
may be added before or after the service. For IrrigationSystem, it's
added before optional characteristics.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:05 +02:00
Cody Cutrer
2ee75a6b79 [homekit] Support lock optional characteristics on GarageDoorOpener (#17141)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:05 +02:00
Cody Cutrer
a21ee9de6f [homekit] don't pre-fill enums from switches if metadata has enum values (#17142)
this is especially important when linking a many-valued enum (such as
CurrentHeatingCoolingState) to a switch, and you want to use a value
beyond 0 and 1 (i.e. OFF (0) and COOL (2)).

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:04 +02:00
Cody Cutrer
83026e555f [homekit] Support UP/DOWN for WindowCoverings (#17138)
* [homekit] Support UP/DOWN for WindowCoverings

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:04 +02:00
Cody Cutrer
01cc4ff172 [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>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:04 +02:00
Cody Cutrer
8eff7c88cd [homekit] fix thermostats with auto mode and only target temperature (#17136)
allow configuring such an accessory, and it's up to the user to be okay
with how the Home app deals with it

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:04 +02:00
Cody Cutrer
c20b0a6304 [homekit] Fix linking a Lighting to a Group:Dimmer (#17139)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:04 +02:00
Cody Cutrer
f697cc6c5c [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>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:04 +02:00
Cody Cutrer
665729437f [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>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:04 +02:00
Cody Cutrer
da77566eec [homekit] use java, not xtend, for code fences in README (#17128)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:04 +02:00
Cody Cutrer
9241a76e9c [homekit] alphabetize lists in code (#17127)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:04 +02:00
Cody Cutrer
cee789c75f [homekit] Synthesize Thermostat.TargetTemperature in some cases (#17060)
* [homekit] synthesize Thermostat.TargetTemperature in some cases

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:04 +02:00
Cody Cutrer
f5f08a58f1 [homekit] use characteristic factory for TemperatureSensor (#17084)
so that it automatically gets the proper unit handling

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:03 +02:00
Cody Cutrer
43aa43ded0 [homekit] Fix temperature unit conversion for min/max/step (#17059)
* [homekit] fix temperature unit conversion for min/max/step
use the item's unit if it has one. or allow explicit units

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:02 +02:00
lolodomo
f00cb2f5ff Fix i18n entry matching the add-on name for io add-ons (#17062)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:02 +02:00
Cody Cutrer
bf661d2464 [homekit] Allow configuring thermostat modes via metadata (#17056)
* [homekit] allow configuring thermostat modes via metadata

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:02 +02:00
Cody Cutrer
468b29549b [homekit] fix optional characteristics (#17038)
* [homekit] fix optional characteristics

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:02 +02:00
lsiepel
e407382bef Update lastnpe EEA to 2.4.0 (#16875)
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:01 +02:00
Cody Cutrer
24f66af5d9 [homekit] sort characteristics in HomekitCharacteristicFactory (#17033)
there are so many shared characteristics now, and so many accessories they belong
to, there is no longer any groupings that make sense. so just sort solely by
characteristic/method name

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:01 +02:00
Cody Cutrer
8be79d4791 [homekit] implement all AccessoryInformationService characteristics (#17031)
mostly as metadata static characteristics

fixes #9595

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:01 +02:00
lsiepel
90da4e40cc Apply Spotless after release (#17016)
* Spotless

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:00 +02:00
openhab-bot
5fa59d316f [unleash-maven-plugin] Preparation for next development cycle.
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:49:00 +02:00
Wouter Born
ef59934e9c Use diamond operator and remove redundant type arguments (#16249)
Signed-off-by: Wouter Born <github@maindrain.net>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:48:25 +02:00
Wouter Born
9c6c475a1c Remove unnecessary semicolons (#16214)
This helps with stopping the proliferation of unnecessary semicolons.

Signed-off-by: Wouter Born <github@maindrain.net>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:48:25 +02:00
Wouter Born
d1d6e817af Remove redundant feature dependencies (#16204)
* Remove redundant feature dependencies

The following features are already dependencies of openhab-runtime-base:

* openhab-core-base
* openhab-core-model-item
* openhab-core-model-script
* openhab-transport-mdns

See also: https://github.com/openhab/openhab-addons/pull/16202#issuecomment-1876875456

* Remove redundant openhab.tp-jackson and openhab.tp-jaxb feature dependencies

Signed-off-by: Wouter Born <github@maindrain.net>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:48:25 +02:00
Jacob Laursen
92145428df Update license headers to 2024 (#16168)
* Update copyright year in configuration
* Update license headers
* Manually update nibeheatpump headers (.cpp/.h/.ino)
* Manually update smsmodem header
* Manually update hueemulation header
* Manually update addon-header.xml header

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
2025-01-02 09:48:23 +02:00
Wouter Born
c58d894bf0
Use OnOffType.from to reduce code (#16101)
You can create an `OnOffType` using a boolean nowadays which reduces the amount of code.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-12-23 19:06:21 +01:00
Holger Friedrich
533cc666ab
Apply spotless after release (#16097)
* Apply spotless after release
* itests: resolve bundles

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-22 23:30:38 +01:00
openhab-bot
83e0485219 [unleash-maven-plugin] Preparation for next development cycle. 2023-12-22 14:37:48 +00:00
Holger Friedrich
f24a4305b8
Improve javadoc for some addons (#15701)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-10-08 00:25:04 +02:00
Holger Friedrich
cbf4411034
Improve javadoc for all addons (#15667)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-09-30 21:49:12 +02:00
Holger Friedrich
5b42c4b071
Java 17 features (#15493)
- add missing @override
- Java style array syntax
- remove redundant modifiers
- always move String constants to left side in comparisons
- simplify lambda expressions and return statements
- use replace instead of replaceAll w/o regex

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-08-26 08:52:11 +02:00
Holger Friedrich
56e7daf898
[io] Use Java 17 features (#15485)
* instanceof matching and multiline strings
* use Map/Set/List.of instead of Collections

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-08-24 06:44:56 +02:00
lsiepel
a1b79b6b7b
[homekit] Checkstyle cleanup (#15450)
* Remove package
* java 17 instanceofpattern
* EqualsAvoidNullCheck
* NoEmptyLineSeparatorCheck
* ConstantNameCheck

Signed-off-by: lsiepel <leosiepel@gmail.com>
2023-08-21 20:12:49 +02:00
Kai Kreuzer
72607d3bee Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-07-24 01:20:31 +02:00
openhab-bot
809fceaff3 [unleash-maven-plugin] Preparation for next development cycle. 2023-07-23 19:19:01 +00:00
Holger Friedrich
96d0293913
Declare missing connection attribute (#15016)
* Declare missing connection attribute
* change mactts, marytts, and picotts to none for consistency

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-05-23 21:38:13 +02:00
Holger Friedrich
8a9ac6eccc
Upgrade SAT to 0.14 (#14981)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-05-13 19:04:36 +02:00
openhab-bot
4f533710ff
New translations homekit.properties (German) (#14655) 2023-03-22 22:57:28 +01: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
J-N-K
8e902f6324
Bump spotless to 2.35 and Eclipse Java Formatter to 4.26 (#14645)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-21 21:03:05 +01:00
openhab-bot
a3c621fffc
New Crowdin updates (#14541)
* New translations iCloud.properties (German)
* New translations miele.properties (German)
* New translations jruby.properties (German)
* New translations mqtt.properties (German)
* New translations influxdb.properties (German)
* New translations homekit.properties (German)
* New translations amazonechocontrol.properties (German)
* New translations amazonechocontrol.properties (German)
2023-03-05 20:25:51 +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
0312e687ba
[homekit] fix restarted on network interface change (#14226)
a regression caused during the final changes of #13877

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2023-01-28 00:39:19 +01:00
J-N-K
5f8214f08a
Adapt to core changes (addon.xml) (#13289)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-15 20:31:42 +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