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
Using a raspberry pi, we listen to the coffee machine and count the number of coffee consumption

A typical datarootsian consumes high-quality fresh coffee in their office environment. The board of dataroots had a very critical decision by the end of 2021-Q2 regarding coffee consumption.

dataroots 51 Nov 21, 2022
A PYTHON Library for Controlling Motors using SOLO Motor Controllers with RASPBERRY PI, Linux, windows, and more!

A PYTHON Library for Controlling Motors using SOLO Motor Controllers with RASPBERRY PI, Linux, windows, and more!

SOLO Motor Controllers 3 Apr 29, 2022
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
CO2Ampel - This RaspberryPi project uses weather data to estimate the share of renewable energy in the power grid

CO2Ampel This RaspberryPi project uses weather data to estimate the share of ren

Felix 4 Jan 19, 2022
Modeling and Simulation of Satellite Servicing Manipulators

Modeling and Simulation of Satellite Servicing Manipulators Final Project for the course ENPM662: Introduction to Robot Modeling (Fall 2021). This pro

Adarsh M 1 Jan 24, 2022
A Python program that makes it easy to manage modules on a CircuitPython device!

CircuitPython-Bundle-Manager-v2 A Python program that makes it easy to manage modules on a CircuitPython device! The CircuitPython Bundle Manager v2 i

Ckyiu 1 Dec 18, 2021
A python module for interacting with rolimon's, a roblox value site.

rpi - rolimon's python interaction rpi is an open source python-based rolimon's api wrapper. It provides an end-to-end pipeline in which each componen

Acier 11 Nov 08, 2022
♟️ QR Code display for P4wnP1 (SSH, VNC, any text / URL)

♟️ Display QR Codes on P4wnP1 (p4wnsolo-qr) 🟢 QR Code display for P4wnP1 w/OLED (SSH, VNC, P4wnP1 WebGUI, any text / URL / exfiltrated data) Note: Th

PawnSolo 4 Dec 19, 2022
Raspberry Pi Pico and LoRaWAN from CircuitPython

Raspberry Pi Pico and LoRaWAN from CircuitPython Enable LoRaWAN communications on your Raspberry Pi Pico or any RP2040-based board using CircuitPython

Alasdair Allan 15 Oct 08, 2022
Adafruit IO connected smart thermostat based on CircuitPython.

Adafruit IO Thermostat Adafruit IO connected smart thermostat based on CircuitPython. Background and Motivation I have a 24 V Heat-only system with a

Shubham Chaudhary 1 Jan 18, 2022
Raspberry Pi Pico support for VS Code

Pico-Go VS Code Extension Pico-Go provides code auto-completion and allows you to communicate with your Raspberry Pi Pico board using the built-in REP

Chris Wood 114 Dec 28, 2022
CircuitPython Driver for Adafruit 24LC32 I2C EEPROM Breakout 32Kbit / 4 KB

Introduction CircuitPython driver for Adafruit 24LC32 I2C EEPROM Breakout Dependencies This driver depends on: Adafruit CircuitPython Bus Device Regis

foamyguy 0 Dec 20, 2021
Various programs in Atari BASIC for #FujiNet for Atari 8-bit

FujiNet Various programs in Atari BASIC for #FujiNet for Atari 8-bit FujiNet-3D Tic Tac Toe In 1978, Scott Adams wrote a 3-D Tic Tac Toe game, for pla

Kay Savetz 2 Jan 01, 2022
DongshanPI Seven for STM32MP157DAC.

STM32MP1 Buildroot External Tree

DongshanPI 14 May 06, 2022
Used python functional programming to make this Ai assistant

Python-based-AI-Assistant I have used python functional programming to make this Ai assistant. Inspiration of project : we have seen in our daily life

Durgesh Kumar 2 Dec 26, 2021
This is a python script to grab data from Zyxel NSA310 NAS and display in Home Asisstant as sensors.

Home-Assistant Python Scripts Python Scripts for Home-Assistant (http://www.home-assistant.io) Zyxel-NSA310-Home-Assistant Monitoring This is a python

6 Oct 31, 2022
Volkswagen ID component for Home Assistant

Volkswagen ID component for Home Assistant This folder contains both a generic Python 3 library for the Volkswagen ID API and a component for Home Ass

55 Jan 07, 2023
Home Assistant custom integration for e-distribución

e-Distribución is an energy distribution company that covers most of South Spain area. If you live in this area, you probably are able to register into their website to get some information about you

VMG 17 Sep 07, 2022
🐱 Petkit feeder components for HomeAssistant

Petkit for HomeAssistant Installing Download and copy custom_components/xiaomi_miot folder to custom_components folder in your HomeAssistant config fo

62 Dec 29, 2022
A python project based on a TV show Wheel of Fortune

Wheel-of-Fortune-using-Python Wheel of Fortune in python this game is the hands-on project in Python 3 Programming Specialization offered By Universit

Eszter Pai 1 Jan 03, 2022