Better support for Nuki devices to the Home Assistant

Overview

Another attempt to add a better support for Nuki devices to the Home Assistant

Features:

  • Lock interface implementation
  • Uses local webhook from bridge to receive real-time updates
  • Exposes all available information from bridge via sensors
  • Optionally, if web API and token is enabled, exposes authorization objects (keypad codes, accounts) as entities

Installation:

  • Checkout/clone the contents of this repo to ~.homeassistant/custom_components/nuki_ng/
  • Restart your Home Assistant
  • Add new integration (search for Nuki Lock in the list)
  • Input bridge API token (mandatory) and web API token (optional, if you have it enabled)

Screenshots:

Screenshot 2021-10-11 at 14 02 42

Comments
  • Hybrid mode not working

    Hybrid mode not working

    Hi,

    I've installed the latest version 0.3.8 and provided the bridge and web token. The new sensors are missing and it seems that the integration is only using the bridge.

    2022-08-26 12:21:11.720 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration nuki_ng which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-08-26 12:21:19.609 DEBUG (MainThread) [custom_components.nuki_ng] async_setup_entry: {'address': '192.168.86.47', 'hass_url': 'http://192.168.86.40:8123', 'token': 'XXXXXX', 'web_token': 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'update_seconds': 30, 'name': '', 'use_hashed': True} 2022-08-26 12:21:20.230 DEBUG (MainThread) [custom_components.nuki_ng.nuki] bridge_check_callback: {'callbacks': [{'id': 0, 'url': 'http://192.168.86.40:8123/api/webhook/nuki_ng_bridge_hook_9efd9716119438cd15408086768fa200'}]}, http://192.168.86.40:8123/api/webhook/nuki_ng_bridge_hook_9efd9716119438cd15408086768fa200 2022-08-26 12:21:20.230 DEBUG (MainThread) [custom_components.nuki_ng.nuki] Callback is set 2022-08-26 12:21:23.379 DEBUG (MainThread) [custom_components.nuki_ng.nuki] _update: {"devices": {"XXXXXXXXX": {"deviceType": 2, "nukiId": XXXXXXXXX, "name": "Haust\u00fcr", "firmwareVersion": "1.8.1", "lastKnownState": {"mode": 2, "state": 1, "stateName": "online", "batteryCritical": false, "ringactionTimestamp": "2022-08-23T11:09:03+00:00", "ringactionState": false, "timestamp": "2022-08-26T06:47:45+00:00"}, "web_auth": {}, "last_log": {}, "config": null, "advancedConfig": null, "openerAdvancedConfig": null, "bridge_info": {"deviceType": 2, "nukiId": XXXXXXXXX, "name": "Nuki_Opener_XXXXXXXX", "rssi": -63, "paired": true}}, "XXXXXXXXX": {"deviceType": 4, "nukiId": XXXXXXXXX, "name": "Wohnungst\u00fcr ", "firmwareVersion": "3.3.5", "lastKnownState": {"mode": 2, "state": 3, "stateName": "unlocked", "batteryCritical": false, "batteryCharging": false, "batteryChargeState": 44, "keypadBatteryCritical": false, "doorsensorState": 240, "doorsensorStateName": "tampered", "timestamp": "2022-08-26T06:47:47+00:00"}, "web_auth": {}, "last_log": {}, "config": null, "advancedConfig": null, "openerAdvancedConfig": null, "bridge_info": {"deviceType": 4, "nukiId": XXXXXXXXX, "name": "Nuki_XXXXXXXX", "rssi": -60, "paired": true}}}, "bridge_info": {"bridgeType": 1, "ids": {"hardwareId": XXXXXXXXX, "serverId": XXXXXXXXX}, "versions": {"firmwareVersion": "2.14.0", "wifiFirmwareVersion": "2.3.0"}, "uptime": 790481, "currentTime": "2022-08-26T10:21:23+00:00", "wlanConnected": true, "serverConnected": true, "scanResults": [{"deviceType": 4, "nukiId": XXXXXXXXX, "name": "Nuki_XXXXXXXXNuki_XXXXXXXX", "rssi": -60, "paired": true}, {"deviceType": 2, "nukiId": XXXXXXXXX, "name": "Nuki_Opener_XXXXXXXX", "rssi": -63, "paired": true}], "callbacks_list": [{"id": 0, "url": "http://192.168.86.40:8123/api/webhook/nuki_ng_bridge_hook_9efd9716119438cd15408086768fa200"}]}} 2022-08-26 12:21:23.379 DEBUG (MainThread) [custom_components.nuki_ng.nuki] Finished fetching nuki_ng data in 3.769 seconds (success: True) 2022-08-26 12:21:59.081 DEBUG (MainThread) [custom_components.nuki_ng.nuki] bridge_check_callback: {'callbacks': [{'id': 0, 'url': 'http://192.168.86.40:8123/api/webhook/nuki_ng_bridge_hook_9efd9716119438cd15408086768fa200'}]}, http://192.168.86.40:8123/api/webhook/nuki_ng_bridge_hook_9efd9716119438cd15408086768fa200 2022-08-26 12:21:59.081 DEBUG (MainThread) [custom_components.nuki_ng.nuki] Callback is set 2022-08-26 12:22:00.504 DEBUG (MainThread) [custom_components.nuki_ng.nuki] _update: {"devices": {"XXXXXXXXX": {"deviceType": 2, "nukiId": XXXXXXXXX, "name": "Haust\u00fcr", "firmwareVersion": "1.8.1", "lastKnownState": {"mode": 2, "state": 1, "stateName": "online", "batteryCritical": false, "ringactionTimestamp": "2022-08-23T11:09:03+00:00", "ringactionState": false, "timestamp": "2022-08-26T06:47:45+00:00"}, "web_auth": {}, "last_log": {}, "config": null, "advancedConfig": null, "openerAdvancedConfig": null, "bridge_info": {"deviceType": 2, "nukiId": XXXXXXXXX, "name": "Nuki_Opener_XXXXXXXX", "rssi": -73, "paired": true}}, "XXXXXXXXX": {"deviceType": 4, "nukiId": XXXXXXXXX, "name": "Wohnungst\u00fcr ", "firmwareVersion": "3.3.5", "lastKnownState": {"mode": 2, "state": 3, "stateName": "unlocked", "batteryCritical": false, "batteryCharging": false, "batteryChargeState": 44, "keypadBatteryCritical": false, "doorsensorState": 240, "doorsensorStateName": "tampered", "timestamp": "2022-08-26T06:47:47+00:00"}, "web_auth": {}, "last_log": {}, "config": null, "advancedConfig": null, "openerAdvancedConfig": null, "bridge_info": {"deviceType": 4, "nukiId": XXXXXXXXX, "name": "Nuki_XXXXXXXX", "rssi": -70, "paired": true}}}, "bridge_info": {"bridgeType": 1, "ids": {"hardwareId": XXXXXXXXX, "serverId": XXXXXXXXX}, "versions": {"firmwareVersion": "2.14.0", "wifiFirmwareVersion": "2.3.0"}, "uptime": 790520, "currentTime": "2022-08-26T10:22:02+00:00", "wlanConnected": true, "serverConnected": true, "scanResults": [{"deviceType": 4, "nukiId": XXXXXXXXX, "name": "Nuki_XXXXXXXX", "rssi": -70, "paired": true}, {"deviceType": 2, "nukiId": XXXXXXXXX, "name": "Nuki_Opener_XXXXXXXX", "rssi": -73, "paired": true}], "callbacks_list": [{"id": 0, "url": "http://192.168.86.40:8123/api/webhook/nuki_ng_bridge_hook_9efd9716119438cd15408086768fa200"}]}} 2022-08-26 12:22:00.504 DEBUG (MainThread) [custom_components.nuki_ng.nuki] Finished fetching nuki_ng data in 1.504 seconds (success: True) 2022-08-26 12:22:30.103 DEBUG (MainThread) [custom_components.nuki_ng.nuki] bridge_check_callback: {'callbacks': [{'id': 0, 'url': 'http://192.168.86.40:8123/api/webhook/nuki_ng_bridge_hook_9efd9716119438cd15408086768fa200'}]}, http://192.168.86.40:8123/api/webhook/nuki_ng_bridge_hook_9efd9716119438cd15408086768fa200 2022-08-26 12:22:30.103 DEBUG (MainThread) [custom_components.nuki_ng.nuki] Callback is set 2022-08-26 12:22:31.639 DEBUG (MainThread) [custom_components.nuki_ng.nuki] _update: {"devices": {"XXXXXXXXX": {"deviceType": 2, "nukiId": XXXXXXXXX, "name": "Haust\u00fcr", "firmwareVersion": "1.8.1", "lastKnownState": {"mode": 2, "state": 1, "stateName": "online", "batteryCritical": false, "ringactionTimestamp": "2022-08-23T11:09:03+00:00", "ringactionState": false, "timestamp": "2022-08-26T06:47:45+00:00"}, "web_auth": {}, "last_log": {}, "config": null, "advancedConfig": null, "openerAdvancedConfig": null, "bridge_info": {"deviceType": 2, "nukiId": XXXXXXXXX, "name": "Nuki_Opener_XXXXXXXX", "rssi": -63, "paired": true}}, "XXXXXXXXX": {"deviceType": 4, "nukiId": XXXXXXXXX, "name": "Wohnungst\u00fcr ", "firmwareVersion": "3.3.5", "lastKnownState": {"mode": 2, "state": 3, "stateName": "unlocked", "batteryCritical": false, "batteryCharging": false, "batteryChargeState": 44, "keypadBatteryCritical": false, "doorsensorState": 240, "doorsensorStateName": "tampered", "timestamp": "2022-08-26T06:47:47+00:00"}, "web_auth": {}, "last_log": {}, "config": null, "advancedConfig": null, "openerAdvancedConfig": null, "bridge_info": {"deviceType": 4, "nukiId": XXXXXXXXX, "name": "Nuki_XXXXXXXX", "rssi": -69, "paired": true}}}, "bridge_info": {"bridgeType": 1, "ids": {"hardwareId": XXXXXXXXX, "serverId": XXXXXXXXX}, "versions": {"firmwareVersion": "2.14.0", "wifiFirmwareVersion": "2.3.0"}, "uptime": 790552, "currentTime": "2022-08-26T10:22:34+00:00", "wlanConnected": true, "serverConnected": true, "scanResults": [{"deviceType": 4, "nukiId": XXXXXXXXX, "name": "Nuki_XXXXXXXX", "rssi": -69, "paired": true}, {"deviceType": 2, "nukiId": XXXXXXXXX, "name": "Nuki_Opener_XXXXXXXX", "rssi": -63, "paired": true}], "callbacks_list": [{"id": 0, "url": "http://192.168.86.40:8123/api/webhook/nuki_ng_bridge_hook_9efd9716119438cd15408086768fa200"}]}} 2022-08-26 12:22:31.639 DEBUG (MainThread) [custom_components.nuki_ng.nuki] Finished fetching nuki_ng data in 1.637 seconds (success: True) 2022-08-26 12:23:01.157 DEBUG (MainThread) [custom_components.nuki_ng.nuki] bridge_check_callback: {'callbacks': [{'id': 0, 'url': 'http://192.168.86.40:8123/api/webhook/nuki_ng_bridge_hook_9efd9716119438cd15408086768fa200'}]}, http://192.168.86.40:8123/api/webhook/nuki_ng_bridge_hook_9efd9716119438cd15408086768fa200 2022-08-26 12:23:01.158 DEBUG (MainThread) [custom_components.nuki_ng.nuki] Callback is set 2022-08-26 12:23:02.685 DEBUG (MainThread) [custom_components.nuki_ng.nuki] _update: {"devices": {"XXXXXXXXX": {"deviceType": 2, "nukiId": XXXXXXXXX, "name": "Haust\u00fcr", "firmwareVersion": "1.8.1", "lastKnownState": {"mode": 2, "state": 1, "stateName": "online", "batteryCritical": false, "ringactionTimestamp": "2022-08-23T11:09:03+00:00", "ringactionState": false, "timestamp": "2022-08-26T06:47:45+00:00"}, "web_auth": {}, "last_log": {}, "config": null, "advancedConfig": null, "openerAdvancedConfig": null, "bridge_info": {"deviceType": 2, "nukiId": XXXXXXXXX, "name": "Nuki_Opener_XXXXXXXX", "rssi": -71, "paired": true}}, "XXXXXXXXX": {"deviceType": 4, "nukiId": XXXXXXXXX, "name": "Wohnungst\u00fcr ", "firmwareVersion": "3.3.5", "lastKnownState": {"mode": 2, "state": 3, "stateName": "unlocked", "batteryCritical": false, "batteryCharging": false, "batteryChargeState": 44, "keypadBatteryCritical": false, "doorsensorState": 240, "doorsensorStateName": "tampered", "timestamp": "2022-08-26T06:47:47+00:00"}, "web_auth": {}, "last_log": {}, "config": null, "advancedConfig": null, "openerAdvancedConfig": null, "bridge_info": {"deviceType": 4, "nukiId": XXXXXXXXX, "name": "Nuki_XXXXXXXX", "rssi": -60, "paired": true}}}, "bridge_info": {"bridgeType": 1, "ids": {"hardwareId": XXXXXXXXX, "serverId": XXXXXXXXX}, "versions": {"firmwareVersion": "2.14.0", "wifiFirmwareVersion": "2.3.0"}, "uptime": 790583, "currentTime": "2022-08-26T10:23:05+00:00", "wlanConnected": true, "serverConnected": true, "scanResults": [{"deviceType": 4, "nukiId": XXXXXXXXX, "name": "Nuki_XXXXXXXX", "rssi": -60, "paired": true}, {"deviceType": 2, "nukiId": XXXXXXXXX, "name": "Nuki_Opener_XXXXXXXX", "rssi": -71, "paired": true}], "callbacks_list": [{"id": 0, "url": "http://192.168.86.40:8123/api/webhook/nuki_ng_bridge_hook_9efd9716119438cd15408086768fa200"}]}} 2022-08-26 12:23:02.685 DEBUG (MainThread) [custom_components.nuki_ng.nuki] Finished fetching nuki_ng data in 1.685 seconds (success: True) 2022-08-26 12:23:32.087 DEBUG (MainThread) [custom_components.nuki_ng.nuki] bridge_check_callback: {'callbacks': [{'id': 0, 'url': 'http://192.168.86.40:8123/api/webhook/nuki_ng_bridge_hook_9efd9716119438cd15408086768fa200'}]}, http://192.168.86.40:8123/api/webhook/nuki_ng_bridge_hook_9efd9716119438cd15408086768fa200 2022-08-26 12:23:32.087 DEBUG (MainThread) [custom_components.nuki_ng.nuki] Callback is set 2022-08-26 12:23:33.622 DEBUG (MainThread) [custom_components.nuki_ng.nuki] _update: {"devices": {"XXXXXXXXX": {"deviceType": 2, "nukiId": XXXXXXXXX, "name": "Haust\u00fcr", "firmwareVersion": "1.8.1", "lastKnownState": {"mode": 2, "state": 1, "stateName": "online", "batteryCritical": false, "ringactionTimestamp": "2022-08-23T11:09:03+00:00", "ringactionState": false, "timestamp": "2022-08-26T06:47:45+00:00"}, "web_auth": {}, "last_log": {}, "config": null, "advancedConfig": null, "openerAdvancedConfig": null, "bridge_info": {"deviceType": 2, "nukiId": XXXXXXXXX, "name": "Nuki_Opener_XXXXXXXX", "rssi": -63, "paired": true}}, "XXXXXXXXX": {"deviceType": 4, "nukiId": XXXXXXXXX, "name": "Wohnungst\u00fcr ", "firmwareVersion": "3.3.5", "lastKnownState": {"mode": 2, "state": 3, "stateName": "unlocked", "batteryCritical": false, "batteryCharging": false, "batteryChargeState": 44, "keypadBatteryCritical": false, "doorsensorState": 240, "doorsensorStateName": "tampered", "timestamp": "2022-08-26T06:47:47+00:00"}, "web_auth": {}, "last_log": {}, "config": null, "advancedConfig": null, "openerAdvancedConfig": null, "bridge_info": {"deviceType": 4, "nukiId": XXXXXXXXX, "name": "Nuki_XXXXXXXX", "rssi": -60, "paired": true}}}, "bridge_info": {"bridgeType": 1, "ids": {"hardwareId": XXXXXXXXX, "serverId": XXXXXXXXX}, "versions": {"firmwareVersion": "2.14.0", "wifiFirmwareVersion": "2.3.0"}, "uptime": 790614, "currentTime": "2022-08-26T10:23:36+00:00", "wlanConnected": true, "serverConnected": true, "scanResults": [{"deviceType": 4, "nukiId": XXXXXXXXX, "name": "Nuki_XXXXXXXX", "rssi": -60, "paired": true}, {"deviceType": 2, "nukiId": XXXXXXXXX, "name": "Nuki_Opener_XXXXXXXX", "rssi": -63, "paired": true}], "callbacks_list": [{"id": 0, "url": "http://192.168.86.40:8123/api/webhook/nuki_ng_bridge_hook_9efd9716119438cd15408086768fa200"}]}} 2022-08-26 12:23:33.622 DEBUG (MainThread) [custom_components.nuki_ng.nuki] Finished fetching nuki_ng data in 1.622 seconds (success: True)

    opened by mluecke09 37
  • Cannot configure the Web Api mode (no bridge)

    Cannot configure the Web Api mode (no bridge)

    Hello,

    I've got a Smart Lock V3.0 PRO which is working normally. I wanted to add it into home assistant. After adding the integration, create an Web Api Token in Nuki web with success: Capture d’écran 2022-06-25 à 00 25 38

    Then I'm stuck in the configuration window of the integration: Capture d’écran 2022-06-25 à 00 24 32

    The error message "User Input malformed..." seems indicating the URL or hostname of the bridge is mandatory, but I don't have any bridge and I want only to use the Cloud mode.

    Any clues on what I'm doing wrong ?

    opened by jmcollin78 28
  • Callback not working (only polling)

    Callback not working (only polling)

    Hi,

    my understanding was that the mentioned callback should update the sensors states (e.g. door state sensor) immediately after the door is open/closed.

    Unfortunately, even though the callback is listed in callbacks and the state is updated via polling (e.g. if I keep the door open for >30 secs - the default polling interval - the door state sensor is changed), the update isn't immediate (which is what I would like to achieve).

    Is there a way how to get "immediate" updates of sensors?

    opened by hnykda 14
  • Error code

    Error code "User input malformed" when seting up Nuki Lock 3.0 Pro without bridge

    I'm using home assistant version 2021.10.6 as a container. When I try to install a Nuki 3.0 Pro without a bridge but with web access and web token as described in your tutorial, I receive the following error message:

    image image

    Can you advise what to do?

    regards

    opened by rectangular-starchaser 14
  • change the exception name to HomeAssistantError

    change the exception name to HomeAssistantError

    this will allow HA to use the continue on error in the automation and scripts, now we can not use the "continue on error" and when the the bridge is busy and return 503 code.

    ConnectionError: Http response for http://xx.xxx.xx.xx:8080/lockAction?token=HXXXXXXXX&action=3&nukiId=XXXXXXX&deviceType=4: 503 Service Unavailable
    

    in HA there is a "if" function that only allow HomeAssistant Error to continue on error

            # Only Home Assistant errors and can be ignored.
            if not isinstance(exception, exceptions.HomeAssistantError):
                raise exception
    
    opened by leranp 11
  • query open state?

    query open state?

    Hello, great work I have one question though. Is it possible to query the open state? I would like to turn on the light in the hall when it is dark outside and the door is opened. Unfortunately I haven't found anything suitable yet. Greetings from the "Nordsee"

    opened by lordnikon6 10
  • Cannot set up integration as I use a different port than 8080.

    Cannot set up integration as I use a different port than 8080.

    Hi, When I try to set up this integration, I got the error:

    Failed to get list of devices from bridge: Failed to parse: http://192.168.178.22:9090:8080/list?token=XXXXXXXX

    In fact I've set up my NUKI API on the port 9090 as the 8080 is already used for something else in the network.

    Is it possible to have an input for the port to be used in the integration set up?

    opened by deam0n 9
  • Failed to get latest data: Http response: 503

    Failed to get latest data: Http response: 503

    From HA (2021.11.5) with the last version of this custom_components, i've several errors :

    Logger: custom_components.nuki_ng.nuki
    Source: custom_components/nuki_ng/nuki.py:40
    Integration: Nuki Lock (documentation, issues)
    First occurred: 22 novembre 2021 à 06:22:34 (197 occurrences)
    Last logged: 09:39:43
    Failed to get latest data: Http response: 503
    
    Traceback (most recent call last):
      File "/config/custom_components/nuki_ng/nuki.py", line 208, in _update
        info = await self.api.bridge_info()
      File "/config/custom_components/nuki_ng/nuki.py", line 66, in bridge_info
        return await self.async_json(lambda r: r.get(self.bridge_url("/info")))
      File "/config/custom_components/nuki_ng/nuki.py", line 40, in async_json
        raise ConnectionError(f"Http response: {response.status_code}")
    ConnectionError: Http response: 503
    

    I've a physical bridge

    opened by chpego 9
  • High number of HA errors due to 503 Service Unavailable

    High number of HA errors due to 503 Service Unavailable

    Is this due to poor design of the bridge? Is there something I can do on my end to improve this? Maybe ditch the bridge and go for a custom bridge on Pi?

    Home Assistant 2022.11.4 Nuki Bridge FW 1.23.0

    Thanks!

    2022-11-29 18:38:22.751 ERROR (MainThread) [homeassistant.components.webhook] Error processing webhook nuki_ng_bridge_hook_7d07fd866f13463a97b7839d1202d693 Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 129, in async_handle_webhook response = await webhook["handler"](hass, webhook_id, request) File "/config/custom_components/nuki_ng/nuki.py", line 449, in _hook_handler self._add_update(body.get("nukiId"), body) File "/config/custom_components/nuki_ng/nuki.py", line 368, in _add_update self.async_set_updated_data(data) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in async_set_updated_data self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 110, in async_update_listeners update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 348, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 551, in _stringify_state if (state := self.state) is None: File "/config/custom_components/nuki_ng/sensor.py", line 98, in state return self.native_value File "/config/custom_components/nuki_ng/sensor.py", line 94, in native_value return self.data.get("bridge_info", {}).get("rssi") AttributeError: 'NoneType' object has no attribute 'get' 2022-11-29 18:38:39.869 ERROR (MainThread) [homeassistant.components.webhook] Error processing webhook nuki_ng_bridge_hook_7d07fd866f13463a97b7839d1202d693 Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 129, in async_handle_webhook response = await webhook["handler"](hass, webhook_id, request) File "/config/custom_components/nuki_ng/nuki.py", line 449, in _hook_handler self._add_update(body.get("nukiId"), body) File "/config/custom_components/nuki_ng/nuki.py", line 368, in _add_update self.async_set_updated_data(data) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in async_set_updated_data self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 110, in async_update_listeners update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 348, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 551, in _stringify_state if (state := self.state) is None: File "/config/custom_components/nuki_ng/sensor.py", line 98, in state return self.native_value File "/config/custom_components/nuki_ng/sensor.py", line 94, in native_value return self.data.get("bridge_info", {}).get("rssi") AttributeError: 'NoneType' object has no attribute 'get' 2022-11-29 23:42:52.341 ERROR (MainThread) [custom_components.nuki_ng.nuki] Failed to get latest data: Http response for http://192.168.25.130:8080/list?token=9jquj0: 503 Service Unavailable Traceback (most recent call last): File "/config/custom_components/nuki_ng/nuki.py", line 400, in _update device_list = await self.api.bridge_list() File "/config/custom_components/nuki_ng/nuki.py", line 71, in bridge_list data = await self.async_json(lambda r: r.get(self.bridge_url("/list"), timeout=BRIDGE_TIMEOUT)) File "/config/custom_components/nuki_ng/nuki.py", line 39, in async_json raise ConnectionError(f"Http response for {response.request.url}: {response.status_code} {response.reason}") ConnectionError: Http response for http://192.168.25.130:8080/list?token=9jquj0: 503 Service Unavailable 2022-11-29 23:42:52.343 ERROR (MainThread) [custom_components.nuki_ng.nuki] Error fetching nuki_ng data: 2022-11-30 02:30:25.252 ERROR (MainThread) [custom_components.nuki_ng.nuki] Failed to get latest data: Http response for http://192.168.25.130:8080/info?token=9jquj0: 503 Service Unavailable Traceback (most recent call last): File "/config/custom_components/nuki_ng/nuki.py", line 396, in _update bridge_info = await self.api.bridge_info() File "/config/custom_components/nuki_ng/nuki.py", line 78, in bridge_info return await self.async_json(lambda r: r.get(self.bridge_url("/info"), timeout=BRIDGE_TIMEOUT)) File "/config/custom_components/nuki_ng/nuki.py", line 39, in async_json raise ConnectionError(f"Http response for {response.request.url}: {response.status_code} {response.reason}") ConnectionError: Http response for http://192.168.25.130:8080/info?token=9jquj0: 503 Service Unavailable 2022-11-30 02:30:25.253 ERROR (MainThread) [custom_components.nuki_ng.nuki] Error fetching nuki_ng data: 2022-11-30 03:27:51.337 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 151, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 110, in async_update_listeners update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 348, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 551, in _stringify_state if (state := self.state) is None: File "/config/custom_components/nuki_ng/sensor.py", line 98, in state return self.native_value File "/config/custom_components/nuki_ng/sensor.py", line 94, in native_value return self.data.get("bridge_info", {}).get("rssi") AttributeError: 'NoneType' object has no attribute 'get' 2022-11-30 04:20:05.333 ERROR (MainThread) [custom_components.nuki_ng.nuki] Failed to get latest data: Http response for http://192.168.25.130:8080/list?token=9jquj0: 503 Service Unavailable Traceback (most recent call last): File "/config/custom_components/nuki_ng/nuki.py", line 400, in _update device_list = await self.api.bridge_list() File "/config/custom_components/nuki_ng/nuki.py", line 71, in bridge_list data = await self.async_json(lambda r: r.get(self.bridge_url("/list"), timeout=BRIDGE_TIMEOUT)) File "/config/custom_components/nuki_ng/nuki.py", line 39, in async_json raise ConnectionError(f"Http response for {response.request.url}: {response.status_code} {response.reason}") ConnectionError: Http response for http://192.168.25.130:8080/list?token=9jquj0: 503 Service Unavailable 2022-11-30 04:20:05.335 ERROR (MainThread) [custom_components.nuki_ng.nuki] Error fetching nuki_ng data: 2022-11-30 05:45:01.251 ERROR (MainThread) [custom_components.nuki_ng.nuki] Failed to get latest data: Http response for http://192.168.25.130:8080/info?token=9jquj0: 503 Service Unavailable Traceback (most recent call last): File "/config/custom_components/nuki_ng/nuki.py", line 396, in _update bridge_info = await self.api.bridge_info() File "/config/custom_components/nuki_ng/nuki.py", line 78, in bridge_info return await self.async_json(lambda r: r.get(self.bridge_url("/info"), timeout=BRIDGE_TIMEOUT)) File "/config/custom_components/nuki_ng/nuki.py", line 39, in async_json raise ConnectionError(f"Http response for {response.request.url}: {response.status_code} {response.reason}") ConnectionError: Http response for http://192.168.25.130:8080/info?token=9jquj0: 503 Service Unavailable 2022-11-30 05:45:01.253 ERROR (MainThread) [custom_components.nuki_ng.nuki] Error fetching nuki_ng data: 2022-11-30 09:41:52.402 ERROR (MainThread) [custom_components.nuki_ng.nuki] Failed to update callback http://192.168.25.9:8123/api/webhook/nuki_ng_bridge_hook_7d07fd866f13463a97b7839d1202d693 Traceback (most recent call last): File "/config/custom_components/nuki_ng/nuki.py", line 391, in _update callbacks_list = await self.api.bridge_check_callback( File "/config/custom_components/nuki_ng/nuki.py", line 154, in bridge_check_callback callbacks = await self.async_json( File "/config/custom_components/nuki_ng/nuki.py", line 39, in async_json raise ConnectionError(f"Http response for {response.request.url}: {response.status_code} {response.reason}") ConnectionError: Http response for http://192.168.25.130:8080/callback/list?token=9jquj0: 503 Service Unavailable 2022-11-30 09:41:52.611 ERROR (MainThread) [custom_components.nuki_ng.nuki] Failed to get latest data: Http response for http://192.168.25.130:8080/info?token=9jquj0: 503 Service Unavailable Traceback (most recent call last): File "/config/custom_components/nuki_ng/nuki.py", line 396, in _update bridge_info = await self.api.bridge_info() File "/config/custom_components/nuki_ng/nuki.py", line 78, in bridge_info return await self.async_json(lambda r: r.get(self.bridge_url("/info"), timeout=BRIDGE_TIMEOUT)) File "/config/custom_components/nuki_ng/nuki.py", line 39, in async_json raise ConnectionError(f"Http response for {response.request.url}: {response.status_code} {response.reason}") ConnectionError: Http response for http://192.168.25.130:8080/info?token=9jquj0: 503 Service Unavailable 2022-11-30 09:41:52.612 ERROR (MainThread) [custom_components.nuki_ng.nuki] Error fetching nuki_ng data: 2022-11-30 10:13:58.259 ERROR (MainThread) [custom_components.nuki_ng.nuki] Failed to get latest data: Http response for http://192.168.25.130:8080/info?token=9jquj0: 503 Service Unavailable Traceback (most recent call last): File "/config/custom_components/nuki_ng/nuki.py", line 396, in _update bridge_info = await self.api.bridge_info() File "/config/custom_components/nuki_ng/nuki.py", line 78, in bridge_info return await self.async_json(lambda r: r.get(self.bridge_url("/info"), timeout=BRIDGE_TIMEOUT)) File "/config/custom_components/nuki_ng/nuki.py", line 39, in async_json raise ConnectionError(f"Http response for {response.request.url}: {response.status_code} {response.reason}") ConnectionError: Http response for http://192.168.25.130:8080/info?token=9jquj0: 503 Service Unavailable 2022-11-30 10:13:58.261 ERROR (MainThread) [custom_components.nuki_ng.nuki] Error fetching nuki_ng data:

    opened by anthonws 8
  • Entity for Doorbell

    Entity for Doorbell

    Hello,

    thanks for the great Integration for the Nuki System.

    Do u know, how to add, a Trigger in Homassistant for a doorbell? That i can automate some things, if the doorbell rings?

    that will be great.

    Greetings

    opened by 0znn 8
  • Lock not functioning since version 0.3.7

    Lock not functioning since version 0.3.7

    Since 0.3.7 the lock doesn't loads on startup. Downgrading to 0.3.6 solves the issue. Attaching the logs:

    2022-08-26 11:37:51.432 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration nuki_ng which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-08-26 11:38:00.516 ERROR (MainThread) [custom_components.nuki_ng.nuki] Failed to get latest data: Http response for https://api.nuki.io/smartlock: 401 Unauthorized File "/config/custom_components/nuki_ng/nuki.py", line 386, in _update File "/config/custom_components/nuki_ng/nuki.py", line 265, in web_list File "/config/custom_components/nuki_ng/nuki.py", line 181, in web_async_json File "/config/custom_components/nuki_ng/nuki.py", line 38, in async_json 2022-08-26 11:38:00.517 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Home Lock' for nuki_ng integration not ready yet; Retrying in background 2022-08-26 11:38:25.950 ERROR (MainThread) [custom_components.nuki_ng.nuki] Failed to get latest data: Http response for https://api.nuki.io/smartlock: 401 Unauthorized File "/config/custom_components/nuki_ng/nuki.py", line 386, in _update File "/config/custom_components/nuki_ng/nuki.py", line 265, in web_list File "/config/custom_components/nuki_ng/nuki.py", line 181, in web_async_json File "/config/custom_components/nuki_ng/nuki.py", line 38, in async_json 2022-08-26 11:38:36.645 ERROR (MainThread) [custom_components.nuki_ng.nuki] Failed to get latest data: Http response for https://api.nuki.io/smartlock: 401 Unauthorized File "/config/custom_components/nuki_ng/nuki.py", line 386, in _update File "/config/custom_components/nuki_ng/nuki.py", line 265, in web_list File "/config/custom_components/nuki_ng/nuki.py", line 181, in web_async_json File "/config/custom_components/nuki_ng/nuki.py", line 38, in async_json

    opened by ShayGus 6
  • Slow state update (10-12 seconds) via bridge API

    Slow state update (10-12 seconds) via bridge API

    First of all, thanks a lot for the plugin!

    My current issue is that it takes long to update the status of the lock in home assistant when I unlock/lock it manually/keypad/homekit, in average 10-12 seconds, is it normal? Screenshot 2023-01-07 at 00 45 51

    opened by cpvbruno 0
  • Plugin triggers HomeKit (via HA)

    Plugin triggers HomeKit (via HA) "locked" notification several times

    I just installed the plugin today and it works very well, but the entity "lock" goes "unavailable" once in a while and also triggers "locked" notification in HomeKit every time it recovers from "unavailable", is this a known issue?

    opened by cpvbruno 1
  • Add doorbell suppression select

    Add doorbell suppression select

    This is a very quick and dirty, untested, first go at the code.

    I don't have a full HA dev environment set up yet. I'll try to do that in the next days, but if there's someone else who wants to test this or correct obvious beginner's errors, have at it!

    opened by moeffju 2
  • Need to know what issued the lock/unlock

    Need to know what issued the lock/unlock

    On the IFTTT triggers, it is possible to see the full granularity about who/what issued the lock/unlock.

    My specific use-case, I want to switch my Google Nest thermostat to Eco when locked, and back out of Eco when unlocked. The problem is, I cannot distinguish between locking the door using my keypad outside (i.e. someone is really leaving the house) versus someone locking the door from the inside for security.

    So, particularly for 'lock', I need to know if it was done 'manually' or via the keypad. Per-user would be interesting, but it is mainly the device I need.

    opened by timgaywood 1
  • Integration for Nuki Box

    Integration for Nuki Box

    First of all: Thanks a lot for the integration it works very stable for me. Great work!

    Is there any change to also support the Nuki Box with this integration? https://shop.nuki.io/en/access-solutions/nuki-box/

    It seems not to be supported yet. Right?

    I tried to connect it directly via the web API but wasn't successful.

    Cheers, Florian

    opened by Flo1H 0
  • [Opener] Improvements for continuous mode

    [Opener] Improvements for continuous mode

    • Actually when continuous mode is activated, the opener "lock" control and "locked" sensor shows as "locked". This PR check also continuous mode to determine the lock state
    • Add configuration switch in opener to activate/deactivate continuous mode
    opened by alucar-d 1
Releases(0.3.11)
  • 0.3.11(Sep 11, 2022)

    What's Changed

    • Do not covert IDs in web API-only mode by @kvj in https://github.com/kvj/hass_nuki_ng/pull/99

    Full Changelog: https://github.com/kvj/hass_nuki_ng/compare/0.3.10...0.3.11

    Source code(tar.gz)
    Source code(zip)
  • 0.3.10(Aug 28, 2022)

    What's Changed

    • Add connection timeout to bridge calls by @kvj in https://github.com/kvj/hass_nuki_ng/pull/91
    • Generate special web IDs for Web API calls by @kvj in https://github.com/kvj/hass_nuki_ng/pull/92

    Full Changelog: https://github.com/kvj/hass_nuki_ng/compare/0.3.9...0.3.10

    Source code(tar.gz)
    Source code(zip)
  • 0.3.9(Aug 26, 2022)

    What's Changed

    • Suppress Web API call exception, to continue entry setup by @kvj in https://github.com/kvj/hass_nuki_ng/pull/87
    • Fix device discovery using Web API by @kvj in https://github.com/kvj/hass_nuki_ng/pull/90

    Full Changelog: https://github.com/kvj/hass_nuki_ng/compare/0.3.8...0.3.9

    Source code(tar.gz)
    Source code(zip)
  • 0.3.8(Aug 26, 2022)

    What's Changed

    • Expose last lock/open user as a sensor (Web API) by @kvj in https://github.com/kvj/hass_nuki_ng/pull/84
    • Fix device enumeration during discovery by @kvj in https://github.com/kvj/hass_nuki_ng/pull/85

    Full Changelog: https://github.com/kvj/hass_nuki_ng/compare/0.3.7...0.3.8

    Source code(tar.gz)
    Source code(zip)
  • 0.3.7(Aug 25, 2022)

    What's Changed

    • Fix new switches that were added in 0.3.6
    • support software bridge type by @regevbr in https://github.com/kvj/hass_nuki_ng/pull/72

    Full Changelog: https://github.com/kvj/hass_nuki_ng/compare/0.3.6...0.3.7

    Source code(tar.gz)
    Source code(zip)
  • 0.3.6(Aug 24, 2022)

    What's Changed

    • Add Auto lock and Ring suppression configuration switches (Web API)

    Full Changelog: https://github.com/kvj/hass_nuki_ng/compare/0.3.5...0.3.6

    Source code(tar.gz)
    Source code(zip)
  • 0.3.5(Jun 28, 2022)

    What's Changed

    • add unavailable door sensor state by @regevbr in https://github.com/kvj/hass_nuki_ng/pull/70
    • Add Brazilian Portuguese Translation by @LeandroIssa in https://github.com/kvj/hass_nuki_ng/pull/65
    • Add workaround about the empty address field when auto-discovery fails

    New Contributors

    • @regevbr made their first contribution in https://github.com/kvj/hass_nuki_ng/pull/70
    • @LeandroIssa made their first contribution in https://github.com/kvj/hass_nuki_ng/pull/65

    Full Changelog: https://github.com/kvj/hass_nuki_ng/compare/0.3.4...0.3.5

    Source code(tar.gz)
    Source code(zip)
  • 0.3.4(Apr 16, 2022)

  • 0.3.2(Apr 15, 2022)

    What's Changed

    • Add Spanish translation by @ricanbm in https://github.com/kvj/hass_nuki_ng/pull/53

    Full Changelog: https://github.com/kvj/hass_nuki_ng/compare/0.3.1...0.3.2

    Source code(tar.gz)
    Source code(zip)
  • 0.3.1(Apr 15, 2022)

  • 0.3.0(Apr 6, 2022)

  • 0.2.1(Jan 12, 2022)

  • 0.2.0(Dec 26, 2021)

Owner
Konstantin
Konstantin
Sleep Functionality for Adafruit MacroPad RP2040

Adafruit-MacroPad-RP2040 Sleep Functionality for Adafruit MacroPad RP2040 Details This is a modification of AdaFruit project bundle found here specifi

9 Dec 18, 2022
Robo Arm :: Rigging is a rigging addon for Blender that helps animating industrial robotic arms.

Robo Arm :: Rigging Robo Arm :: Rigging is a rigging addon for Blender that helps animating industrial robotic arms. It construct serial links(a kind

2 Nov 18, 2021
This allows you to record keyboard and mouse input, and play it back using pynput.

Record and Play with Python! This allows you to record keyboard and mouse input, and play it back (with looping) using pynput. It allows for automatio

George Jensen 45 Jan 02, 2023
Home Assistant component to handle key atom

KeyAtome Home Assistant component to handle key atom, a Linky-compatible device made by Total/Direct-Energie. Installation Either use HACS (default),

18 Dec 21, 2022
Detic ros - A simple ROS wrapper for Detic instance segmentation using pre-trained dataset

Detic ros - A simple ROS wrapper for Detic instance segmentation using pre-trained dataset

Hirokazu Ishida 12 Nov 19, 2022
Shotgrid Toolkit Engine for Gaffer

Shotgun toolkit engine for Gaffer Contact : Diego Garcia Huerta Overview Implementation of a shotgun engine for Gaffer. It supports the classic bootst

Diego Garcia Huerta 12 May 21, 2022
A Macropad using the Raspberry Pi Pico, programmed with CircuitPython.

A Macropad using the Raspberry Pi Pico, programmed with CircuitPython.

15 Oct 14, 2022
Pihole-eink-display - A simple Python script to display PiHole statistics on an eInk Display

Pihole-eink-display - A simple Python script to display PiHole statistics on an eInk Display

Mark McIntyre 64 Oct 11, 2022
Designed a system that can efficiently sort recyclables and transfer them to corresponding bins using Python, a Raspberry Pi, and Quanser Labs.

System for Sorting and Recycling Containers - Project 3 Table of contents Overview The challenge Screenshot My process Built with Code snippets What I

Mit Patel 2 Dec 02, 2022
A Fast, Easy, and User Friendly way to control Robotics Actuators.

T-Motor Controller A Fast, Easy, and User Friendly way to control Robotics Actuators. View Demo · Report Bug · Request Feature Table of Contents About

26 Aug 23, 2022
Volta: A Virtual Assistant which increases your productivity with time as you use it…

Volta Official Documentation Overview & Purpose Volta: A Virtual Assistant which increases your productivity with time as you use it… Volta, developed

Abeer Joshi 1 Jan 14, 2022
Home-Assistant MQTT bridge for Panasonic Comfort Cloud

Panasonic Comfort Cloud MQTT Bridge Home-Assistant MQTT bridge for Panasonic Comfort Cloud. Note: Currently this brige is a one evening prototype proj

Santtu Järvi 2 Jan 04, 2023
Isaac Gym Environments for Legged Robots

Isaac Gym Environments for Legged Robots This repository provides the environment used to train ANYmal (and other robots) to walk on rough terrain usi

Robotic Systems Lab - Legged Robotics at ETH Zürich 372 Jan 08, 2023
Python application, displaying currently played track from Spotify on OLED display connected via I2C

RaspberryPi Spotify OLED Display This application will display currently played track on SSD1306 OLED display connected to RaspberryPi. Displayed stuf

Wojciech Olech 2 Dec 30, 2021
Hardware: CTWingSKIT_BC28 Development Toolkit

IoT Portal Monitor Tools hardware: CTWingSKIT_BC28 Development Toolkit serial port driver: ST-LINK hardware development environment: Keli 5 MDK IoT pl

Fengming Zhang 1 Nov 07, 2021
The robot is an autonomous small scale racing car using NVIDIA Jetson Nano.

The robot is an autonomous small scale racing car using NVIDIA Jetson Nano. This project utilizes deep learning neural network framework Keras/Tensorflow, together with computer vision library OpenCV

1 Dec 08, 2021
Switch predictor for Home Assistant with AppDeamon

Home Assistant AppDeamon - Event predictor WORK IN PROGRESS - CURRENTLY NOT COMPLETE AND NOT WORK This is an idea under development (when I have free

37 Dec 17, 2022
Pure micropython ESP32 SPI driver for sdcard and screen at the same SPI bus

micropython-esp32-spi-sdcard-and-screen-driver Proof of concept of Pure micropython espidf SPI driver for sdcard with screen at the same SPI bus (exam

Thomas Favennec 7 Mar 14, 2022
Baseline model for Augmented Home Assistant

Dataset Preparation Step 1. Rename the Virtual-Home output directory to 'vh.[name]', for example: 'vh.door' Make sure the directory contains 100+ fram

Stanford HCI 1 Aug 24, 2022
Yet another automation project because a smart light is more than just on or off.

Automate home Yet another home automation project because a smart light is more than just on or off. Overview When talking about home automation there

Maja Massarini 62 Oct 10, 2022