I tried to connect my nuki 3.0 Pro with openhab, unfortunately this doesn’t work.
Here are my openhab settings:
Nuki.things
Thing http:url:nuki "nuki" [
baseURL="https://api.nuki.io/",
authMode="BASIC",
stateMethod="GET",
commandMethod="POST",
contentType="application/json",
headers="Authorization=Bearer <api token>", "key2=value2",
refresh=60] {
Channels:
Type string : state "Status" [stateExtension="smartlock/<XX0403921XX>", stateTransformation="JSONPATH:$.state.state" ]
Type switch : action "Aktion" [mode="WRITEONLY", stateExtension="smartlock/<XX0403921XX>/action", onValue="{\"action\": 2}", offValue="{\"action\": 1}"]
}
XX0403921XX - Smartlock ID
Nuki.itmes
String Nuki_Status "Nuki Status [MAP(Nuki.map):%s]" {channel="http:url:nuki:state"}
Switch Nuki_Action "Nuki Aktion" {channel="http:url:nuki:action"}
Nuki.rules
rule "nuki-test"
when
Item Anwesendheit received update
then
Nuki_Action.sendCommand(ON)
end
tail -f /var/log/openhab/openhab.log /var/log/openhab/events.log
2022-11-21 20:40:37.786 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘Nuki_Action’ received command ON
but my nuki device does not work …
Does anyone have an idea where my mistake is
Thanks Christoph