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
This Home Assistant custom component adding support for controlling Midea dehumidifiers on local network.

This custom component for Home Assistant adds support for Midea air conditioner and dehumidifier appliances via the local area network. homeassistant-

Nenad Bogojevic 92 Dec 31, 2022
Count the number of people around you 👨‍👨‍👦 by monitoring wifi signals 📡 .

howmanypeoplearearound Count the number of people around you 👨‍👨‍👦 by monitoring wifi signals 📡 . howmanypeoplearearound calculates the number of

Zack 6.7k Jan 07, 2023
Robot Framework keyword library wrapper for atlassian-python-api

Robot Framework keyword library wrapper for atlassian-python-api

Marcin Koperski 3 Jul 29, 2022
A install script for installing qtile and my configs on Raspberry Pi OS

QPI OS - Qtile + Raspberry PI OS Qtile + Raspberry Pi OS :) Installation Run this command in the terminal

RPICoder 3 Dec 19, 2021
Rasberry Pie GPIO memory game. Press the corresponding key to the lit LED.

RPie-keyboard-game Rasberry Pie GPIO memory game. Press the corresponding key to the lit LED. Randem LED (general output) is lit up on rasberrypi rand

Shawn Dowling 1 Oct 24, 2021
ArucoFollow - A script for Robot Operating System and it is a part of a project Robot

ArucoFollow ArucoFollow is a script for Robot Operating System and it is a part

5 Jan 25, 2022
Pi-hole with Inky pHAT ePaper display

Pi-hole with Inky pHAT ePaper display This is my Pi-hole with an ePaper display.

11 Sep 13, 2022
Monorepo for my Raspberry Pi dashboard and GPS satellite listener.

🥧 pi dashboard My blog post: Listening to Satellites with my Raspberry Pi This is the monorepo for my Raspberry Pi dashboard!

Andrew Healey 27 Jun 08, 2022
Home Assistant custom components MPK-Lodz

MPK Łódź sensor This sensor uses unofficial API provided by MPK Łódź. Configuration options Key Type Required Default Description name string False MP

Piotr Machowski 3 Nov 01, 2022
Ansible tools for operating and managing fleets of Blinksticks in harmony using the Blinkstick Python library.

Ansible tools for operating and managing fleets of Blinksticks in harmony using the Blinkstick Python library.

Greg Robinson 3 Aug 10, 2022
ESP32 recording button presses, and serving webpage that graphs the numbers over time.

ESP32-IoT-button-graph-test ESP32 recording button presses, and serving webpage via webSockets in order to graph the responses. The objective was to t

f-caro 1 Nov 30, 2021
BoneIO is a compact IO controller for home automation.

Project description BoneIO is a compact IO controller for home automation. Main features of this controller are Compact size (27x11x6)cm - 15 DIN modu

Maciej Krasuski 120 Nov 30, 2022
This is an incredible led matrix simulation using the ultimate mosaik co-simulation framework.

This project uses the mosaik co-simulation framework, developed by the brilliant developers at the high-ranked Offis institue for computer science, Oldenburg, Germany, to simulate multidimensional LE

Felix 1 Jan 28, 2022
PyTorch implementation of paper "MT-ORL: Multi-Task Occlusion Relationship Learning" (ICCV 2021)

MT-ORL: Multi-Task Occlusion Relationship Learning Official implementation of paper "MT-ORL: Multi-Task Occlusion Relationship Learning" (ICCV 2021) P

Panhe Feng 12 Oct 11, 2022
LT-OCF: Learnable-Time ODE-based Collaborative Filtering, CIKM'21

LT-OCF: Learnable-Time ODE-based Collaborative Filtering Our proposed LT-OCF Our proposed dual co-evolving ODE Setup Python environment for LT-OCF Ins

Jeongwhan Choi 15 Dec 28, 2022
Event-based hardware simulation framework

An event-based multi-device simulation framework providing configuration and orchestration of complex multi-device simulations.

Diamond Light Source Controls Group 3 Feb 01, 2022
🎃 Some spooky code samples to hack yourself a pumpkin 👻

🎃 Tech Or Treat 👻 It's spooky season for those who celebrate Halloween, and to get in the spirit (spirit - get it? 👻 ) we thought it would be fun t

Jim Bennett 5 Feb 07, 2022
It is a serial communicator(controller, receiver...), communicate with sensor LP20 which is a laser ranger.

Intro It is a serial communicator(controller, receiver...), communicate with sensor LP20 which is a laser ranger. Its datasheet is contained in this r

3 Sep 19, 2022
Home Assistant integration for energy consumption data from UK SMETS (Smart) meters using the Hildebrand Glow API.

Hildebrand Glow (DCC) Integration Home Assistant integration for energy consumption data from UK SMETS (Smart) meters using the Hildebrand Glow API. T

Aniket 153 Dec 30, 2022
Python module for the qwiic serial control motor driver

Qwiic_SCMD_Py Python module for the qwiic motor driver This python package is a port of the existing SparkFun Serial Controlled Motor Driver Arduino L

SparkFun Electronics 6 Dec 06, 2022