technyon / nuki_hub

Use an ESP32 as a Hub between a NUKI Lock and your smarthome.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Locked status not getting updated in home assistant

adamlc opened this issue · comments

PROBLEM DESCRIPTION

After upgrading to 8.35 the lock state isn't updating in home assistant.

I had to do a factory reset during the install process for the lock state to how at all in either the nukihub webui or over MQTT.

You can see in the screenshot below that the lock state is actually published and correct over MQTT, but it is never updated in home assistant.

So I know MQTT is working. But for some reason home assistant never updates the status. Not sure if something has changed in the auto discovery or because I factory reset the ESP?

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

System Information
Nuki Hub version: 8.35
Nuki Hub build: 9596430697.1135.1 (release)
run: true
confVersion: 835
deviceId: 2009583351
deviceIdOp: 2009583351
nukiId: ***
nukidOp: 
mqttbroker: 192.168.68.140
mqttport: 1883
mqttuser: ***
mqttpass: ***
mqttlog: false
checkupdates: false
websrvena: false
lockena: true
lockpin: 1
mqttpath: nuki
openerena: false
openerpin: 
openercont: false
mqttoppath: 
maxkpad: 
opmaxkpad: 
maxtc: 
opmaxtc: 
enabtlprst: false
mqttca: 
mqttcrt: 
mqttkey: 
hassdiscovery: 
hassConfigUrl: 
buffsize: 
dhcpena: true
ipaddr: 
ipsub: 
ipgtw: 
dnssrv: 
nwhw: 1
nwwififb: false
rssipb: 60
hostname: nukihub
nwbestrssi: false
nettmout: -1
restdisc: false
rstbcn: 120
lockStInterval: 1800
tcPerEntry: false
kpPerEntry: false
configInterval: 3600
batInterval: 1800
kpInterval: 1800
kpCntrlEnabled: true
kpInfoEnabled: false
kpPubCode: false
tcCntrlEnabled: false
tcInfoEnabled: false
cnfInfoEnabled: true
regAsApp: false
regOpnAsApp: false
nrRetry: 3
rtryDelay: 100
crdusr: 
crdpass: 
disnonjson: false
pubAuth: false
pubdbg: false
prdtimeout: 60
offHybrid: false
hybridTimer: 600
hybridAct: false
hybridRtry: false
hasmac: false
macb0: 
macb1: 
macb2: 
latest: 
tsksznetw: 
tsksznuki: 
authmaxentry: 
kpmaxentry: 
tcmaxentry: 
MQTT connected: Yes
Lock firmware version: 3.9.5
Lock hardware version: 4.10
Lock paired: Yes
Lock valid PIN set: Yes
Lock has door sensor: No
Lock has keypad: No
Lock ACL (Lock): Allowed
Lock ACL (Unlock): Allowed
Lock ACL (Unlatch): Allowed
Lock ACL (Lock N Go): Allowed
Lock ACL (Lock N Go Unlatch): Allowed
Lock ACL (Full Lock): Allowed
Lock ACL (Fob Action 1): Allowed
Lock ACL (Fob Action 2): Allowed
Lock ACL (Fob Action 3): Allowed
Lock config ACL (Name): Disallowed
Lock config ACL (Latitude): Disallowed
Lock config ACL (Longitude): Disallowed
Lock config ACL (Auto Unlatch): Disallowed
Lock config ACL (Pairing enabled): Allowed
Lock config ACL (Button enabled): Allowed
Lock config ACL (LED flash enabled): Allowed
Lock config ACL (LED brightness): Disallowed
Lock config ACL (Timezone offset): Disallowed
Lock config ACL (DST mode): Disallowed
Lock config ACL (Fob Action 1): Disallowed
Lock config ACL (Fob Action 2): Disallowed
Lock config ACL (Fob Action 3): Disallowed
Lock config ACL (Single Lock): Allowed
Lock config ACL (Advertising Mode): Disallowed
Lock config ACL (Timezone ID): Disallowed
Lock config ACL (Unlocked Position Offset Degrees): Disallowed
Lock config ACL (Locked Position Offset Degrees): Disallowed
Lock config ACL (Single Locked Position Offset Degrees): Disallowed
Lock config ACL (Unlocked To Locked Transition Offset Degrees): Disallowed
Lock config ACL (Lock n Go timeout): Allowed
Lock config ACL (Single button press action): Disallowed
Lock config ACL (Double button press action): Disallowed
Lock config ACL (Detached cylinder): Disallowed
Lock config ACL (Battery type): Disallowed
Lock config ACL (Automatic battery type detection): Disallowed
Lock config ACL (Unlatch duration): Disallowed
Lock config ACL (Auto lock timeout): Disallowed
Lock config ACL (Auto unlock disabled): Allowed
Lock config ACL (Nightmode enabled): Disallowed
Lock config ACL (Nightmode start time): Disallowed
Lock config ACL (Nightmode end time): Disallowed
Lock config ACL (Nightmode auto lock enabled): Disallowed
Lock config ACL (Nightmode auto unlock disabled): Disallowed
Lock config ACL (Nightmode immediate lock on start): Disallowed
Lock config ACL (Auto lock enabled): Allowed
Lock config ACL (Immediate auto lock enabled): Disallowed
Lock config ACL (Auto update enabled): Disallowed
Network device: Built-in Wi-Fi
BSSID of AP: 50:D4:F7:CB:88:26
Uptime: 11 minutes
Heap: 79680
Stack watermarks: nw: 8180, nuki: 5388, pd: 8180
Restart reason FW: ConfigurationUpdated
Restart reason ESP: ESP_RST_SW: Software reset via esp_restart.

TO REPRODUCE

  1. Update to 8.35
  2. Factory reset
  3. Re-pair device
  4. Unlock from home assistant
  5. Home assistant triggers unlock but never updates it's status

EXPECTED BEHAVIOUR

When unlocking in home assistant, it should update to status unlocked.

SCREENSHOTS

Locked
image

Unlocking
image

Unlocked
image

Home Assistant
image

ADDITIONAL CONTEXT

Nothing to add

commented

As shown in your config, hassdiscovery: is empty. This needs to be set to homeassistant as explained in https://github.com/technyon/nuki_hub?tab=readme-ov-file#home-assistant-discovery-optional

Doh yes you're correct. Completely missed that! Think I was thrown slightly by the fact it was partially working.

All good now, thank you!