- Platform information:
- Hardware: pi3
- OS: Openhabian
- Java Runtime Environment: OpenJDK Client VM version 25.252-b225
- openHAB version:openHAB 2.5.5-1 (Release Build)
Hello All!
I can not add the items switches from OH2 HomeKit to the SmartHome on my Iphone.
Please help me understand what I’m doing wrong? Thanks!
These are the actions and commands I already did before writing here:
openhab> smarthome:homekit clearPairings
Cleared HomeKit pairings
openhab> smarthome:homekit allowUnauthenticated true
Enabled unauthenticated HomeKit access
sudo systemctl stop openhab2.service
cd $OPENHAB_USERDATA/jsondb/
rm homekit.json
Remove tmp files: sudo rm -rf /var/lib/openhab2/tmp/*
Remove cache files: sudo rm -rf /var/lib/openhab2/cache/*
Remove backup files: sudo rm -rf /var/lib/openhab2/jsondb/backup/*
Remove cache: sudo openhab-cli clean-cache
Restart OpenHab service: sudo reboot
As a result, SmatHome finds the device OpenHab requests a PIN code. After entering the pin code my phone gives an error in which it says that it can’t add the device.
in the log file we have the following:
I provide the following configuration information for my OH2:
2020-06-04 22:13:02.687 [WARN ] [ssories.AbstractHomekitAccessoryImpl] - State for characteristic ON_STATE at accessory 906600073 cannot be retrieved.
2020-06-04 22:13:02.716 [WARN ] [ssories.AbstractHomekitAccessoryImpl] - State for characteristic ON_STATE at accessory 906599980 cannot be retrieved.
2020-06-04 22:13:02.730 [WARN ] [ssories.AbstractHomekitAccessoryImpl] - State for characteristic ON_STATE at accessory 906599825 cannot be retrieved.
/etc/openhab2/services/homekit.cfg
org.openhab.homekit:port=9124
org.openhab.homekit:pin=022-22-222
org.openhab.homekit:useFahrenheitTemperature=true
org.openhab.homekit:thermostatTargetModeCool=CoolOn
org.openhab.homekit:thermostatTargetModeHeat=HeatOn
org.openhab.homekit:thermostatTargetModeAuto=Auto
org.openhab.homekit:thermostatTargetModeOff=Off
org.openhab.homekit:networkInterface=192.168.0.3
org.openhab.homekit:name=openHAB
org.openhab.homekit:minimumTemperature=-100
org.openhab.homekit:maximumTemperature=100
/etc/openhab2/items/default.items
// Anwesenheit
Group:Switch:OR(ON,OFF) Anwesenheitserkennung “Anwesenheitserkennung”
// Geräte
Switch Anwesenheit_AG “AG_Anwesenheit” (Anwesenheitserkennung) [“Switchable”]
Switch Anwesenheit_IG “IG_Anwesenheit” (Anwesenheitserkennung) [“Switchable”]
Switch Anwesenheit_FG “FG_Anwesenheit” [ “Switchable” ]
/etc/openhab2/sitemaps/default.sitemap
sitemap default label="My home automation"
{
Switch item=Anwesenheit_AG label="Anwesenheit_AG"
Switch item=Anwesenheit_IG label="Anwesenheit_IG"
Switch item=Anwesenheit_FG label="Anwesenheit_FG"
}
/etc/openhab2/rules - no files
openhab> shell:info
Karaf
Karaf version 4.2.7
Karaf home /usr/share/openhab2/runtime
Karaf base /var/lib/openhab2
OSGi Framework org.eclipse.osgi-3.12.100.v20180210-1608
JVM
Java Virtual Machine OpenJDK Client VM version 25.252-b225
Version 1.8.0_252
Vendor Azul Systems, Inc.
Pid 549
Uptime 20 minutes
Process CPU time 2 minutes
Process CPU load 0.03
System CPU load 0.04
Open file descriptors 235
Max file descriptors 102,642
Total compile time 21.823 seconds
Threads
Live threads 127
Daemon threads 62
Peak 225
Total started 1880
Memory
Current heap size 149,173 kbytes
Maximum heap size 316,800 kbytes
Committed heap size 190,208 kbytes
Pending objects 0
Garbage collector Name = ‘Copy’, Collections = 29, Time = 3.181 seconds
Garbage collector Name = ‘MarkSweepCompact’, Collections = 3, Time = 1.643 seconds
Classes
Current classes loaded 15,836
Total classes loaded 15,853
Total classes unloaded 17
Operating system
Name Linux version 4.19.118-v7+
Architecture arm
Processors 4
openhab> list
Pid: org.openhab.addons
BundleLocation: mvn:org.openhab.core.bundles/org.openhab.core.karaf/2.5.0
Properties:
binding = network,mqtt
misc = ,homekit
package = standard
service.pid = org.openhab.addons
ui = dashboard,basic,paper,habpanel,homebuilder
Pid: org.openhab.homekit
BundleLocation: null
Properties:
maximumTemperature = 100.0
minimumTemperature = -100.0
name = openHAB_1
networkInterface = 192.168.0.3
pin = 022-22-222
port = 9124
service.pid = org.openhab.homekit
thermostatCurrentModeCooling = Cooling
thermostatCurrentModeHeating = Heating
thermostatCurrentModeOff = Off
thermostatTargetModeAuto = Auto
thermostatTargetModeCool = CoolOn
thermostatTargetModeHeat = HeatOn
thermostatTargetModeOff = Off
useFahrenheitTemperature = true
openhab> smarthome:items list
Anwesenheit_AG (Type=SwitchItem, State=NULL, Label=AG_Anwesenheit, Category=null, Tags=[Switchable], Groups=[Anwesenheitserkennung])
Anwesenheitserkennung (Type=GroupItem, BaseType=SwitchItem, Members=2, State=NULL, Label=Anwesenheitserkennung, Category=group)
Anwesenheit_IG (Type=SwitchItem, State=NULL, Label=IG_Anwesenheit, Category=null, Tags=[Switchable], Groups=[Anwesenheitserkennung])
mqtt_topic_5bae512b_Test_DIM1 (Type=DimmerItem, State=NULL, Label=Test_DIM1, Category=null)
mqtt_topic_5bae512b_TestMQTT (Type=SwitchItem, State=NULL, Label=null, Category=null)
Anwesenheit_FG (Type=SwitchItem, State=NULL, Label=FG_Anwesenheit, Category=null, Tags=[Switchable])
openhab> smarthome:things list
mqtt:systemBroker:mqtt (Type=Bridge, Status=ONLINE, Label=MQTT Broker, Bridge=null)
mqtt:topic:5bae512b (Type=Thing, Status=ONLINE, Label=test MQTT Thing, Bridge=mqtt:systemBroker:mqtt)
openhab> smarthome:links list
mqtt_topic_5bae512b_Test_DIM1 -> mqtt:topic:5bae512b:Test_DIM1
mqtt_systemBroker_mqtt_max -> mqtt:systemBroker:mqtt:max
mqtt_topic_5bae512b_TestMQTT -> mqtt:topic:5bae512b:TestMQTT
openhab> bundle:list | grep Homekit
224 │ Active │ 80 │ 2.5.5 │ openHAB Add-ons :: Bundles :: IO :: Homekit
openhab> smarthome:homekit listAccessories
906599825 AG_Anwesenheit
906600073 IG_Anwesenheit
906599980 FG_Anwesenheit
openhab> smarthome:homekit printAccessory 906599825
906599825 AG_Anwesenheit
Services:
Service Type: 00000049-0000-1000-8000-0026BB765291
Characteristics:
: class io.github.hapjava.characteristics.impl.common.OnCharacteristic
openhab> smarthome:homekit printAccessory 906600073
906600073 IG_Anwesenheit
Services:
Service Type: 00000049-0000-1000-8000-0026BB765291
Characteristics:
: class io.github.hapjava.characteristics.impl.common.OnCharacteristic
openhab> smarthome:homekit printAccessory 906599980
906599980 FG_Anwesenheit
Services:
Service Type: 00000049-0000-1000-8000-0026BB765291
Characteristics:
: class io.github.hapjava.characteristics.impl.common.OnCharacteristic