Closed georgo closed 1 year ago
Can confirm, on zulu's jdk 17, and no issues (in the 8 minutes since my last message)
https://github.com/ccutrer/openhab-addons/releases/tag/homekit-20221220-02 should work for 3.4.0+Java 11, but I have not tested it since I require the other unreleased features in my local environment.
update org.openhab.io.homekit https://github.com/ccutrer/openhab-addons/releases/download/homekit-20221220-02/org.openhab.io.homekit-3.4.0-SNAPSHOT.jar
Thanks for fixing this. It basically now works for me and my devices stay available. š Two points:
After clicking around in openhab a bit I had the 'no response' state one time again. Restarting the binding helped.
I still get the unknown user message in the logs.
2022-12-21 08:05:39.889 [INFO ] [er.impl.jmdns.JmdnsHomekitAdvertiser] - Registering _hap._tcp.local. on port 9123
2022-12-21 08:05:39.891 [INFO ] [mekit.internal.HomekitChangeListener] - Created 12 HomeKit items in instance 1.
2022-12-21 08:05:41.930 [WARN ] [erver.impl.pairing.PairVerifyManager] - Unknown user: 9C4F9D96-B222-4F9F-AF61-AFCBFF9C8876```
for me it works now with the Java11 version. KUDOS!
Noob question: How can I verify, the update command worked? In /var/lib/openhab/tmp/kar/openhab-addons-3.4.0/org/openhab/addons/bundles/org.openhab.io.homekit/3.4.0/ I still see the version from Dec-19.
Noob question: How can I verify, the update command worked?
In /var/lib/openhab/tmp/kar/openhab-addons-3.4.0/org/openhab/addons/bundles/org.openhab.io.homekit/3.4.0/ I still see the version from Dec-19.
The path you listed is just the temporary copy extracted from the kar distributed with openHAB. To see what's currently running, you use bundle:list | grep HomeKit
from the console. I believe they're stored at /var/lib/openhab/cache/org.eclipse.osgi/<bundle id>/<no idea>/bundleFile
, where bundle id is the the id shown from the bundle:list command.
Thanks for fixing this. It basically now works for me and my devices stay available. š
Two points:
After clicking around in openhab a bit I had the 'no response' state one time again. Restarting the binding helped.
I still get the unknown user message in the logs.
2022-12-21 08:05:39.889 [INFO ] [er.impl.jmdns.JmdnsHomekitAdvertiser] - Registering _hap._tcp.local. on port 9123 2022-12-21 08:05:39.891 [INFO ] [mekit.internal.HomekitChangeListener] - Created 12 HomeKit items in instance 1. 2022-12-21 08:05:41.930 [WARN ] [erver.impl.pairing.PairVerifyManager] - Unknown user: 9C4F9D96-B222-4F9F-AF61-AFCBFF9C8876```
Yup, that's okay to happen once (per additional user or hub) associated with your Home. Basically, these devices have a public/private key that's permanently associated with them, and when you pair a new HomeKit accessory they now just try to "login" to it to see if the accessory still has their information stored. All we have to do is respond "nope, no idea who you are", and then they'll go through the first device that paired asking it to ask the accessory to add them. Originally we were giving a 500 error instead of an auth error in this scenario.
As long as you're not seeing this warning repeatedly in the log, you're fine.
Hey @ccutrer thank you so much for the swift fix. I can confirm that it works now. š
However, I would like to give a hint to those using dockerhub container openhab/openhab:latest. Somehow, just updating jar from the console did not help. For my instance. Hence backuped all my things and item files, cleared the containers local storage and pulled a fresh image. After installing the homekit plugin, it gave be a pairing error (unknown user) - however, the update via console worked after pairing and all items are available now.
Again - thanks sooo much !
i have problems after updating to
update org.openhab.io.homekit https://github.com/ccutrer/openhab-addons/releases/download/homekit-20221220-02/org.openhab.io.homekit-3.4.0-SNAPSHOT.jar
everythinkg is working but my thermostat items are gone... probably because the TempSensor are gone ;)
[INFO ] [mekit.internal.HomekitChangeListener] - Created 13 HomeKit items in instance 1.
openjdk 11.0.9 2020-10-20 LTS OpenJDK Runtime Environment Zulu11.43+88-CA (build 11.0.9+11-LTS) OpenJDK Client VM Zulu11.43+88-CA (build 11.0.9+11-LTS, mixed mode) openhab: Version: 3.4.0.M4 (Build)
TempSensor group/items:
items.replaceItem({ type: 'Group', name: `gRoom${i}_TempSensor`, label: `Czujnik temperatury ${i}`, tags: [`Room${i}`], category: 'temperature', groups: [`gRoom${i}`], metadata: {homekit: `TemperatureSensor,Battery` } } );
items.replaceItem({ type: `Number`, name: `TempSensor${i}_CurrentTemp`, label: `Temperatura aktualna`, tags: [`Room${i}`], category: `temperature`, groups: [`gRoom${i}_TempSensor`,`gRoom${i}`,`gRoom${i}_termostat`], metadata: { homekit: `TemperatureSensor.CurrentTemperature,Thermostat.CurrentTemperature`, ga: { value: 'thermostatTemperatureAmbient', config: {roomHint: roomlabels[i], structureHint: roomlabels[0]}}, stateDescription: { value: ` `, config: { pattern: `%.1f Ā°C`} } }, channels: { [`mqtt:topic:mymqttbroker:Temp_${i}:temperature`]: {} } });
items.replaceItem({ type: `Switch`, name: `TempSensor${i}_BatteryLow`, label: `Niski poziom baterii`, tags: [`Room${i}`], category: `temperature`, groups: [`gRoom${i}_TempSensor`,`gRoom${i}`,`gRoom${i}_termostat`], metadata: { stateDescription: { value: ` `, config: { pattern: `%s`} }, homekit: {value: `TemperatureSensor.BatteryLowStatus,Battery.BatteryLowStatus`}} });
items.replaceItem({ type: `Number`, name: `TempSensor${i}_Battery`, label: `Poziom baterii`, tags: [`Room${i}`], category: `temperature`, groups: [`gRoom${i}`,`gRoom${i}_TempSensor`,`gRoom${i}_termostat`], metadata: { stateDescription: { value: ` `, config: { pattern: `%.1f %%`} }, homekit: {value: `Battery.BatteryLevel`} }, channels: { [`mqtt:topic:mymqttbroker:Temp_${i}:battery`]: {} } });
items.replaceItem({ type: `Switch`, name: `TempSensor${i}_FaultStatus`, label: `Czujnik temperatury`, tags: [`Room${i}`], category: ``, groups: [`gRoom${i}`,`gRoom${i}_TempSensor`,`gRoom${i}_termostat`], metadata: { stateDescription: { value: ` `, config: { pattern: `%s`} }, homekit: {value: `TemperatureSensor.FaultStatus`} }, channels: { [`mqtt:topic:mymqttbroker:Temp_${i}:availability`]: {} } });
2022-12-22 14:16:52.485 [WARN ] [.accessories.HomekitAccessoryFactory] - Cannot instantiate accessory implementation for accessory TemperatureSensor
java.lang.reflect.InvocationTargetException: null
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
at org.openhab.io.homekit.internal.accessories.HomekitAccessoryFactory.create(HomekitAccessoryFactory.java:192) ~[?:?]
at org.openhab.io.homekit.internal.HomekitChangeListener.createRootAccessories(HomekitChangeListener.java:457) ~[?:?]
at java.util.Optional.ifPresent(Optional.java:183) ~[?:?]
at org.openhab.io.homekit.internal.HomekitChangeListener.applyUpdates(HomekitChangeListener.java:297) ~[?:?]
at org.openhab.io.homekit.internal.Debouncer.tryActionOrPostpone(Debouncer.java:102) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.NoSuchMethodError: 'org.openhab.core.library.types.QuantityType org.openhab.core.library.types.QuantityType.toUnitRelative(javax.measure.Unit)'
at org.openhab.io.homekit.internal.HomekitTaggedItem.getConfigurationAsQuantity(HomekitTaggedItem.java:430) ~[?:?]
at org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory.getTemperatureStep(HomekitCharacteristicFactory.java:306) ~[?:?]
at org.openhab.io.homekit.internal.accessories.HomekitTemperatureSensorImpl.getMinStepCurrentTemperature(HomekitTemperatureSensorImpl.java:78) ~[?:?]
at io.github.hapjava.services.impl.TemperatureSensorService.<init>(TemperatureSensorService.java:30) ~[?:?]
at org.openhab.io.homekit.internal.accessories.HomekitTemperatureSensorImpl.<init>(HomekitTemperatureSensorImpl.java:41) ~[?:?]
... 15 more
2022-12-22 14:16:52.495 [WARN ] [mekit.internal.HomekitChangeListener] - Cannot create accessory Item:gRoom2_TempSensor (Type=GroupItem, Members=4, State=NULL, Label=Czujnik temperatury 2, Category=temperature, Tags=[Room2, _DYNAMIC_], Groups=[gRoom2]) HomeKit type: 'TemperatureSensor' characteristic: 'Empty'
2022-12-22 14:16:52.503 [WARN ] [.accessories.HomekitAccessoryFactory] - Cannot instantiate accessory implementation for accessory Thermostat
java.lang.reflect.InvocationTargetException: null
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
at org.openhab.io.homekit.internal.accessories.HomekitAccessoryFactory.create(HomekitAccessoryFactory.java:192) ~[?:?]
at org.openhab.io.homekit.internal.HomekitChangeListener.createRootAccessories(HomekitChangeListener.java:457) ~[?:?]
at java.util.Optional.ifPresent(Optional.java:183) ~[?:?]
at org.openhab.io.homekit.internal.HomekitChangeListener.applyUpdates(HomekitChangeListener.java:297) ~[?:?]
at org.openhab.io.homekit.internal.Debouncer.tryActionOrPostpone(Debouncer.java:102) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.NoSuchMethodError: 'org.openhab.core.library.types.QuantityType org.openhab.core.library.types.QuantityType.toUnitRelative(javax.measure.Unit)'
at org.openhab.io.homekit.internal.HomekitTaggedItem.getConfigurationAsQuantity(HomekitTaggedItem.java:430) ~[?:?]
at org.openhab.io.homekit.internal.accessories.HomekitCharacteristicFactory.getTemperatureStep(HomekitCharacteristicFactory.java:306) ~[?:?]
at org.openhab.io.homekit.internal.accessories.HomekitThermostatImpl.getMinStepCurrentTemperature(HomekitThermostatImpl.java:137) ~[?:?]
at io.github.hapjava.services.impl.ThermostatService.<init>(ThermostatService.java:53) ~[?:?]
at org.openhab.io.homekit.internal.accessories.HomekitThermostatImpl.<init>(HomekitThermostatImpl.java:84) ~[?:?]
... 15 more
2022-12-22 14:16:52.513 [WARN ] [mekit.internal.HomekitChangeListener] - Cannot create accessory Item:gRoom3_termostat (Type=GroupItem, Members=22, State=NULL, Label=Termostat 3, Category=heating, Tags=[_DYNAMIC_, Room3], Groups=[gRoom3]) HomeKit type: 'Thermostat' characteristic: 'Empty'
2022-12-22 14:16:52.521 [WARN ] [.accessories.HomekitAccessoryFactory] - Cannot instantiate accessory implementation for accessory Thermostat
java.lang.reflect.InvocationTargetException: null
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
at org.openhab.io.homekit.internal.accessories.HomekitAccessoryFactory.create(HomekitAccessoryFactory.java:192) ~[?:?]
at org.openhab.io.homekit.internal.HomekitChangeListener.createRootAccessories(HomekitChangeListener.java:457) ~[?:?]
at java.util.Optional.ifPresent(Optional.java:183) ~[?:?]
The toUnitRelative method missing is indicative that you're not actually running 3.4.0. That method was introduced in core about two months ago.
Hi all,
I moved the error to hang off of the accessory instead of in storedValues. My b_unresponsive branch in GitHub is up to date. I'm still unsure of the homebridge update function with an error condition as per the docs. It really does not seem to do anything. Also 'self' is supposed to be used within an exec. There really was no affect. My testing shows this works though there are way too many log messages and they need to be cleaned up. I'll do more testing tomorrow. Everything was submitted with no-verify so tests are also screwed up because of the excess logs. ttyl, John
Expected Behavior
Homekit accessories are available in Home app.
Current Behavior
Hi,
today I upgraded all my devices (incl. my home hub - Apple TV) to iOS 16.2 - Home app asks to upgrade it self, so I did it. Since then, all openHAB accessories are in state "No response"
I tried completely remove homekit from openHAB, incl. deletion of
homekit.json
file injsondb
directory and calledclearPairings
After I try re-pair openHAB again in Home, it successfully find bridge, find all accessories, but all of them remains in "No response" state.
What I noticed in
homekit.json
is user:But during pairing, my log i flooded with following error:
^^ where it appears to be more user ids in logs
Possible Solution
I have no idea, what changed in 16.2 in technical terms, but here is some article about it: https://9to5mac.com/2022/10/25/ios-16-2-new-architecture-home-app/ and https://www.homekithelper.net/tips/ios-16-matter-thread-new-architecture
Steps to Reproduce (for Bugs)
Environment
Running openHAB 3.4.0.M6 (but it didn't work in 3.4.0.M4 either) in docker on Raspberry Pi, with host network mode This is my homekit.cfg:
Before upgrade to iOS 16.2 everything works perfect.