HomeKit 2.5 SNAPSHOT

Can you confirm that it works with 4.1.34.Final for all bundles?`That simplifies everything very much, I’ll update the feature then.

Hi Jan,
can you give me a hint to identify it works with all bundles?
The only I’ve seen was that netty is not binary compatible between versions, so I tried to update the single bundle. The bundle netty.codec.http was installed beside the Homekit Bundle… what other depends on it?

        <bundle dependency="true">mvn:io.netty/netty-common/4.0.32.Final</bundle>
        <bundle dependency="true">mvn:io.netty/netty-buffer/4.0.32.Final</bundle>
        <bundle dependency="true">mvn:io.netty/netty-transport/4.0.32.Final</bundle>
        <bundle dependency="true">mvn:io.netty/netty-handler/4.0.32.Final</bundle>
        <bundle dependency="true">mvn:io.netty/netty-codec/4.0.32.Final</bundle>
        <bundle dependency="true">mvn:io.netty/netty-codec-http/4.0.32.Final</bundle>

This is what the feature defines. If you have all these bundles installed and they are 4.1.34.Final and see no errors, it‘s fine.

openhab> bundle:list -s|grep netty
215 x Active x  80 x 4.1.34.Final          x io.netty.buffer
216 x Active x  80 x 4.1.34.Final          x io.netty.codec
218 x Active x  80 x 4.1.34.Final          x io.netty.codec-mqtt
219 x Active x  80 x 4.1.34.Final          x io.netty.common
220 x Active x  80 x 4.1.34.Final          x io.netty.handler
221 x Active x  80 x 4.1.34.Final          x io.netty.resolver
222 x Active x  80 x 4.1.34.Final          x io.netty.transport
304 x Active x  80 x 4.1.34.Final          x io.netty.codec-http

and yes, homekit is running and in my log seems all ok…

1 Like

Hi Daniel,
many thanks for the hint.
I have the same older version 4.0.32 running.
I uninstalled the bundles as you explained.

However I’m not sure what exactly to download. Do I need to complete .jar file to be added to the add-on folder?

I only got the codec-http updated

openhab>                                                                                                                                                                                                  
openhab> bundle:list -s|grep netty
283 │ Installed │  80 │ 4.1.34.Final          │ io.netty.codec-http
openhab>    

Hi Stefan,
I think you need all @J-N-K mentioned above

I my system all other netty-bundles already was present.

Hi Daniel,

I downloaded all the files I uninstalled before.

Just wondering some are “active” but some are “Installed”?!
Before all files were showing “Active” state.

openhab> bundle:list -s|grep netty                                                                                                                                                                        
284 │ Installed │  80 │ 4.1.34.Final          │ io.netty.codec
285 │ Installed │  80 │ 4.1.34.Final          │ io.netty.codec-http
286 │ Installed │  80 │ 4.1.34.Final          │ io.netty.transport
287 │ Active    │  80 │ 4.1.34.Final          │ io.netty.buffer
288 │ Active    │  80 │ 4.1.34.Final          │ io.netty.common
289 │ Installed │  80 │ 4.1.34.Final          │ io.netty.handler
openhab>                                                                                                                                                                                                  
openhab>   

Maybe bundle:start?

Starting doesn’t work - its seems some dependencies are not fulfilled:
I suppose this is the reason the status is not “Active”
Did I miss anything?

openhab> bundle:start io.netty.codec
Error executing command: Error executing command on bundles:
        Error starting bundle 284: Could not resolve module: io.netty.codec [284]
  Unresolved requirement: Import-Package: com.google.protobuf; version="[2.6.0,3.0.0)"; resolution:="optional"
  Unresolved requirement: Import-Package: com.google.protobuf.nano; resolution:="optional"
  Unresolved requirement: Import-Package: com.jcraft.jzlib; resolution:="optional"
  Unresolved requirement: Import-Package: com.ning.compress; version="[1.0.0,2.0.0)"; resolution:="optional"
  Unresolved requirement: Import-Package: com.ning.compress.lzf; version="[1.0.0,2.0.0)"; resolution:="optional"
  Unresolved requirement: Import-Package: com.ning.compress.lzf.util; version="[1.0.0,2.0.0)"; resolution:="optional"
  Unresolved requirement: Import-Package: io.netty.channel; version="[4.1.0,5.0.0)"
    -> Export-Package: io.netty.channel; bundle-symbolic-name="io.netty.transport"; bundle-version="4.1.34.Final"; version="4.1.34"; uses:="io.netty.bootstrap,io.netty.buffer,io.netty.util,io.netty.util.concurrent"
       io.netty.transport [286]
         Unresolved requirement: Import-Package: io.netty.resolver; version="[4.1.0,5.0.0)"
  Unresolved requirement: Import-Package: io.netty.channel.socket; version="[4.1.0,5.0.0)"
    -> Export-Package: io.netty.channel.socket; bundle-symbolic-name="io.netty.transport"; bundle-version="4.1.34.Final"; version="4.1.34"; uses:="io.netty.buffer,io.netty.channel,io.netty.util"

openhab>   
openhab> bundle:start io.netty.handler
Error executing command: Error executing command on bundles:
        Error starting bundle 289: Could not resolve module: io.netty.handler [289]
  Unresolved requirement: Import-Package: sun.security.util; resolution:="optional"
  Unresolved requirement: Import-Package: sun.security.x509; resolution:="optional"
  Unresolved requirement: Import-Package: org.eclipse.jetty.npn; version="[1.0.0,2.0.0)"; resolution:="optional"
  Unresolved requirement: Import-Package: org.eclipse.jetty.alpn; version="[1.0.0,2.0.0)"; resolution:="optional"
  Unresolved requirement: Import-Package: io.netty.handler.codec.base64; version="[4.1.0,5.0.0)"
    -> Export-Package: io.netty.handler.codec.base64; bundle-symbolic-name="io.netty.codec"; bundle-version="4.1.34.Final"; version="4.1.34"; uses:="io.netty.buffer,io.netty.channel,io.netty.handler.codec"
       io.netty.codec [284]
         Unresolved requirement: Import-Package: com.google.protobuf; version="[2.6.0,3.0.0)"; resolution:="optional"
         Unresolved requirement: Import-Package: com.google.protobuf.nano; resolution:="optional"
         Unresolved requirement: Import-Package: com.jcraft.jzlib; resolution:="optional"
         Unresolved requirement: Import-Package: com.ning.compress; version="[1.0.0,2.0.0)"; resolution:="optional"
         Unresolved requirement: Import-Package: com.ning.compress.lzf; version="[1.0.0,2.0.0)"; resolution:="optional"
         Unresolved requirement: Import-Package: com.ning.compress.lzf.util; version="[1.0.0,2.0.0)"; resolution:="optional"
         Unresolved requirement: Import-Package: io.netty.channel; version="[4.1.0,5.0.0)"
           -> Export-Package: io.netty.channel; bundle-symbolic-name="io.netty.transport"; bundle-version="4.1.34.Final"; version="4.1.34"; uses:="io.netty.bootstrap,io.netty.buffer,io.netty.util,io.netty.util.concurrent"
              io.netty.transport [286]
                Unresolved requirement: Import-Package: io.netty.resolver; version="[4.1.0,5.0.0)"
  Unresolved requirement: Import-Package: io.netty.handler.codec; version="[4.1.0,5.0.0)"
    -> Export-Package: io.netty.handler.codec; bundle-symbolic-name="io.netty.codec"; bundle-version="4.1.34.Final"; version="4.1.34"; uses:="io.netty.buffer,io.netty.channel,io.netty.channel.socket,io.netty.util"
  Unresolved requirement: Import-Package: io.netty.channel; version="[4.1.0,5.0.0)"
    -> Export-Package: io.netty.channel; bundle-symbolic-name="io.netty.transport"; bundle-version="4.1.34.Final"; version="4.1.34"; uses:="io.netty.bootstrap,io.netty.buffer,io.netty.util,io.netty.util.concurrent"
openhab> bundle:start io.netty.transport
Error executing command: Error executing command on bundles:
        Error starting bundle 286: Could not resolve module: io.netty.transport [286]
  Unresolved requirement: Import-Package: io.netty.resolver; version="[4.1.0,5.0.0)"

openhab>  

Could you please import my complete list from above? I think Error Message says that Unresolved requirement: Import-Package: io.netty.resolver is missing

1 Like

Exactly. Since netty 4.1 you also need the netty-resolver bundle. But there is nothing wrong with the 4.0 bundles. Just don‘t mix versions.

Resolver was the issue indeed - you are genius :slight_smile:

openhab> bundle:list -s|grep netty                                                                                                                                                                        
284 │ Active │  80 │ 4.1.34.Final          │ io.netty.codec
285 │ Active │  80 │ 4.1.34.Final          │ io.netty.codec-http
286 │ Active │  80 │ 4.1.34.Final          │ io.netty.transport
287 │ Active │  80 │ 4.1.34.Final          │ io.netty.buffer
288 │ Active │  80 │ 4.1.34.Final          │ io.netty.common
289 │ Active │  80 │ 4.1.34.Final          │ io.netty.handler
290 │ Active │  80 │ 4.1.34.Final          │ io.netty.resolver
openhab>  

Do I need below as well? It is listed in your update but wasn’t installed before.

io.netty.codec-mqtt

Unfortunately Homekit is still not working :frowning:

Maybe something else is wrong.

Please post the logs.

Hello Jan,
logging doesn’t show any errors as far as I see.

I stopped OH 2.5.0.M2 in the Docker Container and run it again.
Below is the output I directly after connecting to the console.

                                                                                                                                                                                              
openhab>                                                                                                                                                                                                  
openhab> log:set TRACE com.beowulfe.hap                                                                                                                                                                   
openhab> log:tail com.beowulfe.hap                                                                                                                                                                        
11:54:16.606 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory openHAB
11:54:16.629 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Vitrinen
11:54:16.641 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Temperatur Heizung
11:54:16.657 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Temperatur Schlafen
11:54:16.675 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Stehlampe
11:54:16.685 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Luftentfeuchter
11:54:16.699 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Stern
11:54:16.706 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Temperatur Aussen
11:54:16.731 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Kugel
11:54:16.743 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Lampe Lautsprecher
11:54:16.768 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Lampe Flur
11:54:16.789 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Temperatur Wohnen
11:54:16.879 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Stehlampe
11:54:18.351 [INFO ] [mpl.http.impl.NettyHomekitHttpService] - Bound homekit listener to /10.0.5.1:9124
11:54:18.370 [INFO ] [hap.impl.jmdns.JmdnsHomekitAdvertiser] - Advertising accessory openHAB
11:54:18.382 [INFO ] [hap.impl.jmdns.JmdnsHomekitAdvertiser] - Registering _hap._tcp.local. on port 9124

That looks good. I would suspect a problem with the docker container and the network settings. Unfortunately I can‘t help there.

Hello Jan,

the issue is not with the Docker Container. I performed several tests, running different containers.

OH 2.2.0 is running in a Docker Container without issues.

I run OH 2.4.0 in a new Docker Container, using the old configuration files used in OH2.2.
Homekit is working without any issue.

I run OH 2.5.0.M2 in another new Docker Container, using again the old configuration from OH2.2.
Homekit is NOT working - I checked again with Netty version 4.0 and 4.1.34.
Both times Homekit failed.

As you can see below, in OH2.4 it is running fine.
I start all containers always using the same script, hence the same network settings, etc.
The issue is somehow with OH2.5.0.M2. (Same with M1 or snapshot)
Do you have any idea what else I can debug?
many thanks for any hint :slight_smile:

                         __  _____    ____      
  ____  ____  ___  ____  / / / /   |  / __ )     
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  | 
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /      
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/     
    /_/                        2.4.0
                               Release Build   

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.

openhab>                                                                                                                                                                                                  
openhab>                                                                                                                                                                                                  
openhab> log:set TRACE com.beowulfe.hap
openhab> log:tail com.beowulfe.hap                                                                                                                                                                        
13:08:03.591 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory openHAB
13:08:04.236 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Vitrinen
13:08:04.263 [INFO ] [mpl.http.impl.NettyHomekitHttpService] - Bound homekit listener to /0.0.0.0:9124
13:08:04.279 [INFO ] [mpl.http.impl.NettyHomekitHttpService] - Resetting connections
13:08:04.317 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Stern
13:08:04.329 [INFO ] [mpl.http.impl.NettyHomekitHttpService] - Resetting connections
13:08:04.344 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Temperatur Schlafen
13:08:04.370 [INFO ] [mpl.http.impl.NettyHomekitHttpService] - Resetting connections
13:08:04.378 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Temperatur Heizung
13:08:04.396 [INFO ] [mpl.http.impl.NettyHomekitHttpService] - Resetting connections
13:08:04.399 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Stehlampe
13:08:04.423 [INFO ] [hap.impl.jmdns.JmdnsHomekitAdvertiser] - Advertising accessory openHAB
13:08:04.427 [INFO ] [hap.impl.jmdns.JmdnsHomekitAdvertiser] - Registering _hap._tcp.local. on port 9124
13:08:04.445 [INFO ] [mpl.http.impl.NettyHomekitHttpService] - Resetting connections
13:08:04.450 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Temperatur Wohnen
13:08:04.457 [INFO ] [mpl.http.impl.NettyHomekitHttpService] - Resetting connections
13:08:04.460 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Lampe Lautsprecher
13:08:04.466 [INFO ] [mpl.http.impl.NettyHomekitHttpService] - Resetting connections
13:08:04.469 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Stehlampe
13:08:04.479 [INFO ] [mpl.http.impl.NettyHomekitHttpService] - Resetting connections
13:08:04.482 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Luftentfeuchter
13:08:04.500 [INFO ] [mpl.http.impl.NettyHomekitHttpService] - Resetting connections
13:08:04.506 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Vitrine groß
13:08:04.518 [INFO ] [mpl.http.impl.NettyHomekitHttpService] - Resetting connections
13:08:04.524 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Kugel
13:08:04.545 [INFO ] [mpl.http.impl.NettyHomekitHttpService] - Resetting connections
13:08:04.573 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Vitrine klein
13:08:04.603 [INFO ] [mpl.http.impl.NettyHomekitHttpService] - Resetting connections
13:08:04.612 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Lampe Flur
13:08:04.639 [INFO ] [mpl.http.impl.NettyHomekitHttpService] - Resetting connections
13:08:04.643 [INFO ] [com.beowulfe.hap.HomekitRoot         ] - Added accessory Temperatur Aussen
13:08:04.663 [INFO ] [mpl.http.impl.NettyHomekitHttpService] - Resetting connections

13:08:08.788 [INFO ] [e.hap.impl.http.impl.AccessoryHandler] - New homekit connection from /192.168.5.115:49201
13:08:08.788 [INFO ] [e.hap.impl.http.impl.AccessoryHandler] - New homekit connection from /192.168.5.132:64946
13:08:08.903 [DEBUG] [.impl.pairing.PairVerificationManager] - Starting pair verification for openHAB
13:08:08.908 [DEBUG] [.impl.pairing.PairVerificationManager] - Starting pair verification for openHAB
13:08:09.516 [INFO ] [hap.impl.http.HomekitClientConnection] - 200 /pair-verify
13:08:09.516 [INFO ] [hap.impl.http.HomekitClientConnection] - 200 /pair-verify

:frowning: seems I’m blacklisted now. Even with OH 2.2 Homekit is not working anymore.
I suppose this happened when I tested the different OH versions.

Update:
I did below steps in OH 2.4 and OH2.5.0.M2.
When doing the last step (pairing in IOS device), the device “OpenHab” is automatically listed when I run OH2.4.
However, this is now working when running OH2.5.0.M2.

I only use three different tags for all my items (Lighting, Switchable and CurrentTemperature).
As far as I can see, the syntax hasn’t been changed between 2.4 and 2.5 for those tags, only for Thermostat.

Steps I took:

  • Delete pairing from the IOS home app
  • Uninstall Homekit Integration
  • Delete /var/lib/openhab/jsondb/homekit.json
  • Install homekit integration addon and configure
  • Restart openhab and check to see if /var/lib/openhab/jsondb/homekit.json has the mac address entry.
  • Pair on IOS
1 Like