openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.86k stars 3.58k forks source link

[mqtt.homeassistant] Unsupported Device https://github.com/technyon/nuki_hub #17375

Open adielsa opened 1 week ago

adielsa commented 1 week ago

There is amazing nuki_hub over esp32 that send mqtt i tried to connet it to OpenHAb. Its even send homeassisnt mqtt message but its doesnt get register.

Which config topic should i use?

I see that MQTT got connected from nuki_hub to openhab

OpenHab side: image image

NukiHub ESP: image image

adielsa commented 1 week ago

I fixed missing config of topic. And i see now the following topic+message on the broker but they are not been consume by the add-on image

adielsa commented 1 week ago

using openhab-cli showlogs i manage to discover:

openhabian@openhabian:~ $ openhab-cli showlogs

==> /var/log/openhab/events.log <==
2024-09-06 10:39:11.325 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:homeassistant:c4b5e522c7:c6ebc32482' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2024-09-06 10:39:11.424 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:homeassistant:c4b5e522c7:c6ebc32482' changed from INITIALIZING to UNKNOWN
2024-09-06 10:39:32.424 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:homeassistant:c4b5e522c7:c6ebc32482' changed from UNKNOWN to UNINITIALIZED
2024-09-06 10:39:32.595 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:homeassistant:c4b5e522c7:c6ebc32482' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2024-09-06 10:39:33.611 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:homeassistant:c4b5e522c7:c6ebc32482' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2024-09-06 10:39:33.728 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:homeassistant:c4b5e522c7:c6ebc32482' changed from INITIALIZING to UNKNOWN
2024-09-06 10:40:28.825 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:homeassistant:c4b5e522c7:c6ebc32482' changed from UNKNOWN to UNINITIALIZED
2024-09-06 10:40:28.978 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:homeassistant:c4b5e522c7:c6ebc32482' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2024-09-06 10:40:30.369 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:homeassistant:c4b5e522c7:c6ebc32482' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2024-09-06 10:40:30.471 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:homeassistant:c4b5e522c7:c6ebc32482' changed from INITIALIZING to UNKNOWN

==> /var/log/openhab/openhab.log <==
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) [bundleFile:9.4.54.v20240208]
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [bundleFile:9.4.54.v20240208]
    at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) [bundleFile:9.4.54.v20240208]
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) [bundleFile:9.4.54.v20240208]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) [bundleFile:9.4.54.v20240208]
    at java.lang.Thread.run(Thread.java:840) [?:?]
2024-09-06 10:40:27.368 [WARN ] [nal.discovery.HomeAssistantDiscovery] - HomeAssistant discover error: invalid configuration of thing smartlock component lock: Cannot parse channel configuration JSON
2024-09-06 10:40:27.391 [WARN ] [ssistant.internal.DiscoverComponents] - HomeAssistant discover error: invalid configuration of thing smartlock component lock: Cannot parse channel configuration JSON
2024-09-06 10:40:30.529 [WARN ] [nal.discovery.HomeAssistantDiscovery] - HomeAssistant discover error: invalid configuration of thing smartlock component lock: Cannot parse channel configuration JSON
2024-09-06 10:40:30.563 [WARN ] [ssistant.internal.DiscoverComponents] - HomeAssistant discover error: invalid configuration of thing smartlock component lock: Cannot parse channel configuration JSON
ccutrer commented 6 days ago

Can you post the full value of the homeassistant/lock/3a855b25/smartlock/config topic from MQTT? And I assume you're on 4.3.0.M1 (or a recent snapshot)?

adielsa commented 6 days ago

nuki>configuration>basicjson {"nukiID":"3a855b25","name":"F1","autoUnlatch":0,"pairingEnabled":1,"buttonEnabled":1,"ledEnabled":1,"ledBrightness":3,"currentTime":"2024-09-10 06:39:22","timeZoneOffset":0,"dstMode":0,"hasFob":0,"fobAction1":"Intelligent","fobAction2":"Unlock","fobAction3":"Lock","singleLock":0,"advertisingMode":"Automatic","hasKeypad":0,"hasKeypadV2":0,"firmwareVersion":"4.3.10","hardwareRevision":"8.3","homeKitStatus":"Not Available","timeZone":"Asia/Jerusalem"}

nuki>configuration>advancesjson {"totalDegrees":0,"unlockedPositionOffsetDegrees":0,"lockedPositionOffsetDegrees":0,"singleLockedPositionOffsetDegrees":0,"unlockedToLockedTransitionOffsetDegrees":0,"lockNgoTimeout":20,"singleButtonPressAction":"Intelligent","doubleButtonPressAction":"Lock n Go","detachedCylinder":0,"batteryType":"Accumulators","automaticBatteryTypeDetection":1,"unlatchDuration":3,"autoLockTimeOut":300,"autoUnLockDisabled":0,"nightModeEnabled":0,"nightModeStartTime":"22:00","nightModeEndTime":"06:00","nightModeAutoLockEnabled":1,"nightModeAutoUnlockDisabled":1,"nightModeImmediateLockOnStart":1,"autoLockEnabled":1,"immediateAutoLockEnabled":1,"autoUpdateEnabled":1}

nuki>lock>json {"lock_state":"locked","lockngo_state":0,"trigger":"autoLock","currentTime":"2024-09-10 07:07:06","timeZoneOffset":0,"nightModeActive":0,"last_lock_action":"Unlock","last_lock_action_trigger":"autoLock","lock_completion_status":"success","door_sensor_state":"unavailable","auth_id":0,"auth_name":""}

image

ccutrer commented 6 days ago

Those are all values about the device itself, and not the discovery information from the topic I requested.