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
Universal Xiaomi MIoT integration for Home Assistant

Xiaomi MIoT Raw 简体中文 | English MIoT 协议是小米智能家居从 2018 年起推行的智能设备通信协议规范,此后凡是可接入米家的设备均通过此协议进行通信。此插件按照 MIoT 协议规范与设备通信,实现对设备的状态读取及控制。

null 1.9k Jan 2, 2023
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

null 55 Jan 7, 2023
Sensor of Temperature Feels Like for Home Assistant.

Please ⭐ this repo if you find it useful Sensor of Temperature Feels Like for Home Assistant Installation Install from HACS (recommended) Have HACS in

Andrey 60 Dec 25, 2022
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 your power demand, energy consumption, or even cycle billing (in terms of consumptions).

VMG 17 Sep 7, 2022
Home Assistant custom integration for Yi cameras: yi-hack-MStar, yi-hack-Allwinner and yi-hack-Allwinner-v2

yi-hack Home Assistant integration Overview yi-hack Home Assistant is a custom integration for Yi cameras (or Sonoff camera) with one of the following

roleo 131 Jan 3, 2023
Интеграция Home Assistant с ЛК "Интер РАО"

ЕЛК ЖКХ «Интер РАО» для Home Assistant Предоставление информации о текущем состоянии ваших аккаунтов в ЕЛК ЖКХ. Введение @ TODO @ Установка Посредство

Alexander Ryazanov 27 Nov 5, 2022
Provide Unifi device info via api to Home Assistant that will give ap sensors

Unifi AP Device info Provide Unifi device info via api to Home Assistant that will give ap sensors

null 12 Jan 7, 2023
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

null 37 Dec 17, 2022
Uses the Duke Energy Gateway to import near real time energy usage into Home Assistant

Duke Energy Gateway This is a custom integration for Home Assistant. It pulls near-real-time energy usage from Duke Energy via the Duke Energy Gateway

Michael Meli 28 Dec 23, 2022
Custom component for Home Assistant that integrates Candy/Haier Wi-Fi washing machines (also known as Simply-Fi).

Candy Home Assistant component Custom component for Home Assistant that integrates Candy/Haier Wi-Fi washing machines (also known as Simply-Fi). This

Olivér Falvai 61 Dec 29, 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
emhass: Energy Management for Home Assistant

emhass EMHASS: Energy Management for Home Assistant Context This module was conceived as an energy management optimization tool for residential electr

David 70 Dec 24, 2022
Python script: Enphase Envoy mqtt json for Home Assistant

A Python script that takes a real time stream from Enphase Envoy and publishes to a mqtt broker. This can then be used within Home Assistant or for other applications. The data updates at least once per second with negligible load on the Envoy.

null 29 Dec 27, 2022
Electrolux Pure i9 robot vacuum integration for Home Assistant.

Home Assistant Pure i9 This repository integrates your Electrolux Pure i9 robot vacuum with the smart home platform Home Assistant. The integration co

Niklas Ekman 15 Dec 22, 2022
Huawei Solar sensors for Home Assistant

Huawei Solar Sensors This integration splits out the various values that are fetched from your Huawei Solar inverter into separate HomeAssistant senso

Thijs Walcarius 151 Dec 31, 2022
Connect a TeslaMate instance to Home Assistant, using MQTT

TeslaBuddy Connect a TeslaMate instance to Home Assistant, using MQTT. It allows basic control of your Tesla vehicle via Home Assistant (currently, ju

null 4 May 23, 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
Water quality integration for Home Assistant with data provided by Budapest FVM

Water Quality FVM (Budapest, HU) custom integration for Home Assistant This custom component integrates water quality information provided by Budapest

Atticus Maximus 3 Dec 23, 2021
Automate gate/garage door opening via 433.92MHz emitter with Raspberry Pi, Home Assistant and Homekit.

Automate opening your garage door / gate Summary This project sums up how I automated opening my garage door using a Raspberry PI, a 433Mhz emitter, H

Julien Fouilhé 29 Nov 30, 2022