Giter Site home page Giter Site logo

iobroker.nuki's Introduction

Logo

ioBroker.nuki

Number of Installations Stable Version NPM Version Commits since last release Travis CI Downloads

NPM

This ioBroker adapter allows to control and monitor the Nuki Smart Lock by using the API of the Nuki Bridge.

Requirements

  • A Nuki (hardware or software) Bridge.
  • A Nuki Smart Lock and/or a Nuki Opener.
  • A running instance of ioBroker.

Usage

Each instance of the Nuki adapter represents a Nuki bridge. When creating an instance, simply enter IP address, port and token of your Nuki bridge. The name is optional and will be generated automatically if left empty. The checkbox "use callback" and the value "callback port in ioBroker" are optional and can be set in order to make use of the callback function of the Nuki. After saving an instance there will be created a bridge device with a channel for each Nuki lock that is connected to the specified Nuki bridge. The channels provide the current state of the Nuki lock as output parameters:

  • batteryCritical: Indicator for low battery
  • deviceType: Type of Nuki device (Smart Lock or Opener)
  • mode: Operation mode of the Nuki device
  • doorState: Current (numeric) doorsensor state (Nuki native)
  • lockState: Indicator whether Nuki is locked (Nuki Smart Lock only)
  • state: Current (numeric) lock state (Nuki native)
  • timestamp: Last updated

Additionally, the channels provide input parameters which enable basic control of the Nuki lock:

  • action: Numeric action code for setting the Nuki state (Nuki native)

Valid input values for locks are:

0 (no action)
1 (unlock)
2 (lock)
3 (unlatch)
4 (lock ‘n’ go)
5 (lock ‘n’ go with unlatch)
  • lockAction: Switch for locking / unlocking the Nuki (true = unlock; false = lock)
  • openAction: Button for unlatching the Nuki
  • openLocknGoAction: Button for unlatching and after some seconds locking the Nuki
  • unlockLocknGoAction: Button for unlocking and after some seconds locking the Nuki

Valid input values for openers are:

0 (no action)
1 (activate rto)
2 (deactivate rto)
3 (electric strike actuation)
4 (activate continuous mode)
5 (deactivate continuous mode)
  • rtoAction: Switch for activating / deactivating the Ring to Open function (true = activate; false = deactivate)
  • openAction: Button for electric strike actuation
  • cmActiveAction: Button for activating the Continous Mode
  • cmDeactiveAction: Button for deactivating the Continous Mode

Additional information

How to get your bridges token:

  • Call http://< bridge_ip >:< bridge_port >/auth from any browser in your LAN -> bridge turns on its LED
  • Press the button of the bridge within 30 seconds
  • Result of the browser call should be something like this: { "token": “token123”, "success": true } Callback function:

If the callback function is being used, the adapter will try to automatically set the callback on the Nuki bridge when the instance is being saved. When the instance is unloaded the callback will be deleted again. All Nuki states will be kept up-to-date by the Nuki bridge while callback is activated. Callbacks can be set and removed from any browser with following urls:

Set:

  • http://< bridge_ip >:< bridge_port >/callback/add?url=http%3A%2F%2F< host_ip >%3A< host_port >%2Fapi%2Fnuki&token=< bridgeToken >

Remove:

  • http://< bridge_ip >:< bridge_port >/callback/remove?id=< callback_id >&token=< bridgeToken >

Update

When updating from 1.0.x to 1.1.0 or higher it is recommended to delete all instances of the old version before installing the new version. Please be aware that version changes bigger than on patch level (-> change of only the last digit) could always contain changes to data points e.g. 1.1.2 to 1.1.4

Changelog

2.0.0

  • (simatec) jsonConfig added
  • (simatec) dependency updated
  • (simatec) devdependency updated
  • (simatec) translate added
  • (simatec) test and release added
  • (simatec) Release Script added
  • (simatec) Remove Travis

1.7.0

  • (smaragdschlange) update: implementation of latest bridge API changes (battery charge state)

1.6.0

  • (smaragdschlange) improvement: support for Nuki Smart Door and Nuki Smart Lock 3.0 (Pro)

1.5.0

  • (smaragdschlange) bug fix: compatibility with jscontroller 3.3.13

1.4.4

  • (smaragdschlange) update: changes to comply with admin 5.x.x requirements

1.4.3

  • (smaragdschlange) update: dependency axios to >=0.21.1

1.4.2

  • (smaragdschlange) bug fix: common.dataSource type had an invalid type

1.4.1

  • (smaragdschlange) bug fix: references fixed

1.4.0

  • (smaragdschlange) improvement: support of keypad battery state
  • (smaragdschlange) improvement: support of ring action states for opener

1.3.1

  • (smaragdschlange) bug fix: some objects did not get updated

1.3.0

  • (smaragdschlange) improvement: support of doorsensor states

1.2.3

  • (smaragdschlange) bug fix: convert to template strings

1.2.2

  • (smaragdschlange) bug fix: get device type by state name when not provided by bridge (software bridge)

1.2.0

  • (smaragdschlange) improvement: support of hashed token (set to standard)
  • (smaragdschlange) improvement: better use of delay before requests in order to prevent null messages

1.1.5

  • (smaragdschlange) bug fix: clear all timeouts on unload

1.1.4

  • (smaragdschlange) bug fix: object was not defined

1.1.3

  • (smaragdschlange) bug fix: deviceType was undefined in case of Opener
  • (smaragdschlange) bug fix: Opener action was not set

1.1.2

  • (smaragdschlange) improvement: added bridge type as object
  • (smaragdschlange) bug fix: force reset deviceType on adapter restart

1.1.1

  • (smaragdschlange) bug fix: default to Nuki Lock when deviceType unknown

1.1.0

  • (smaragdschlange) improvement: support for Nuki Opener

1.0.7

  • (smaragdschlange) bug fix: impact on other Nuki-connected gateways

1.0.6

  • (smaragdschlange) dependencies update

1.0.5

  • (ldittmar81) add gulp auto translation
  • (smaragdschlange) add license

1.0.4

  • (smaragdschlange) improvement: added Support for Compact mode (js-Controller 2.0 Feature)

1.0.3

  • (smaragdschlange) bug fix: action buttons were not working properly

1.0.1

  • (smaragdschlange) version synch

1.0.0

  • (smaragdschlange) initial release on npm

0.2.0

  • (smaragdschlange) periodic state updates added
  • (smaragdschlange) restructure objects

0.1.3

  • (smaragdschlange) timestamp bug fixed

0.1.2

  • (smaragdschlange) minor bugfixes
  • (smaragdschlange) added delay before each Nuki request to avoid null responses

0.1.1

  • (smaragdschlange) callback will be removed when instance is unloading

0.1.0

  • (smaragdschlange) callback finally working
  • (smaragdschlange) added another State

0.0.6

  • (smaragdschlange) additional states/actions and improved compatibility (callback still not completely working)

0.0.5

  • (smaragdschlange) added support for nuki bridge callback (web server still to be added)

0.0.4

  • (smaragdschlange) added input parameter for lock actions

0.0.3

  • (smaragdschlange) bug fixes and restructure

0.0.2

  • (smaragdschlange) added input parameters

0.0.1

  • (smaragdschlange) initial release

License

The MIT License (MIT)

Copyright (c) 2018-2024 Smaragdschlange [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

iobroker.nuki's People

Contributors

alcalzone avatar anunezde avatar apollon77 avatar bondrogeen avatar dependabot[bot] avatar dfrozen avatar germanbluefox avatar instalator avatar jey-cee avatar ldittmar81 avatar pmant avatar simatec avatar smaragdschlange avatar twonky4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

iobroker.nuki's Issues

Think about to fix the issues found by adapter checker

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:

https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/smaragdschlange/ioBroker.nuki

  • [E152] No common.dataSource found in io-package.json
  • [E605] No actual year found in copyright. Please add "Copyright (c) 2018-2021 smaragdschlange [email protected]" at the end of README.md
  • [E701] No actual year found in LICENSE. Please add "Copyright (c) 2018-2021 smaragdschlange [email protected]" at the start of LICENSE

Thanks,
your automatic adapter checker.

P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info

Software Bridge

I plan to use a software bridge. Is it possible to get a token from the software bridge?

Please add your adapter to ioBroker.discovery

I am an automatic service from ioBroker that searches adapters and makes suggestions.

I noticed that your adapter is not integrated in the ioBroker.discovery. Using the Discovery adapter, ioBroker can automatically find devices or suggest services to the user for installation. If possible I would live to see your adapter added there.

Some adapters have already been added and you can use them as blueprints. See: https://github.com/ioBroker/ioBroker.discovery You need to fork this project and then create a PR for your adapter to be added.

Basically the plugins can do HTTP calls, UDP discovery, MDNS, UPNP and will iterate over all devices found by IP scan and check local serial ports. If you want you can also add new discovery methods but please try to do that with at least dependencies as possible.

Then create one file under lib/adapters for your adapter to implement the detection and proposal of an instance to the user.

On questions, the other developers will support in the forum or via GitHub issues too.

If no detection is possible, simply close this issue and I won't bother you again. ;-)

Thanks,
your automatic adapter checker.

P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info

Think about to fix the issues found by adapter checker

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:

https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/smaragdschlange/ioBroker.nuki

  • [E201] Bluefox was not found in the collaborators on NPM!. Please execute in adapter directory: "npm owner add bluefox iobroker.nuki"

Thanks,
your automatic adapter checker.

P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info

Trigger Events work, but states do not update.

Hi,

I'm using version 1.0.3 and have the following issue:

  • the trigger events work fine but
  • the states simply do not change.

It looks like that:
image

The door is locked at the very moment. Still the state is unlocked.
No matter whether I unlock or lock using the trigger events or the button on the door, the states stay the same.

Did I do something wrong?
The log for the nuki-instance is empty.

Thanks in advance for your help!
Best regards,
Robert

Unknown device type (1). Setting minimal states.

Hey there,
I recently installed the adapter in ioBroker.
Installed the bridge on my old Galaxy A3 (2017), configured it to connect it with ioBroker.

Everything works like a charme, but the adapter tells me in the log

`

nuki.0 2020-04-11 20:48:02.338 error (9769) Unknown device type (1). Setting minimal states.
nuki.0 2020-04-11 20:48:02.335 info (9769) Lock list requested: http://192.168.178.44:8080/list?token="token"
nuki.0 2020-04-11 20:47:59.381 info (9769) Bridge Info requested: http://192.168.178.44:8080/info?token="token"
nuki.0 2020-04-11 20:47:56.165 info (9769) starting. Version 1.2.0 in /opt/iobroker/node_modules/iobroker.nuki, node: v10.19.0
host.ioBroker 2020-04-11 20:47:53.753 info instance system.adapter.nuki.0 started with pid 9769
host.ioBroker 2020-04-11 20:47:53.738 info "system.adapter.nuki.0" enabled

`

The nuki bridge app says, that everything is fine with three green dots.

Thank you for your support and best regards! :)

aktualisiert nicht

Hi,
der Adapter funktioniert, spricht mit dem Nuki und holt die Daten einwandfrei ab.
Allerdings aktualisiert er nicht automatisch.
Er schreibt auch alle Ausgaben in Info, anstatt in debug.

Aber sonst prima gemacht! Hatte das die ganze Zeit mit nem Javascript gelöst.

Compatibility check and testing for Node.js 14 and 16

Dear Adapter developer,

Node.js 14 is now available for a year and Node.js 16 was release just some days ago and will become LTS by October 2021. We plan to update the ioBroker Node.js recommendation (currently 12.x) to 14.x later this year.

Please check your adapter with Node.js 14 especially, and ideally also directly with Node.js 16

Please add both versions to the adapter testing which is executed on commits.

If your adapter requires a certain minimum version of Node.js please set the 'engine' setting in package.json accordingly! Please also do this if the adapter is not able to work in certain Node.js versions, so that ioBroker can prevent users from installing te adapter if not compatible!

On questions please talk to us at ioBroker/ioBroker.js-controller#1138

Please close the issue after you checked it.

Thank you very much for your support!

Think about to fix the issues found by adapter checker

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:

https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/smaragdschlange/ioBroker.nuki

  • [E605] No actual year found in copyright. Please add "Copyright (c) 2018-2022 smaragdschlange [email protected]" at the end of README.md
  • [E701] No actual year found in LICENSE. Please add "Copyright (c) 2018-2022 smaragdschlange [email protected]" at the start of LICENSE

Thanks,
your automatic adapter checker.

P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info

Think about to fix the issues found by adapter checker

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:

https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/smaragdschlange/ioBroker.nuki

  • [E605] No actual year found in copyright. Please add "Copyright (c) 2019 [object Object]" or "Copyright (c) 20xx-2019 [object Object]" at the end of Readme
  • [E701] No actual year found in LICENSE. Please add "Copyright (c) 2019 [object Object]" or "Copyright (c) 20xx-2019 [object Object]" at start of LICENSE

Thanks,
your automatic adapter checker.

P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info

Version 1.1.3

Hi, with V1.1.3 from today follow fault comes up:
`

nuki.0 2020-03-06 16:13:17.959 info (25565) Callback successfully set: http://192.168.178.41:11111/api/nuki.0
nuki.0 2020-03-06 16:13:15.454 info (25565) Bridge Info requested: http://192.168.178.93:8080/info?token=geheim
nuki.0 2020-03-06 16:13:14.224 info (25565) Server listening to http://192.168.178.41:11111
nuki.0 2020-03-06 16:13:12.065 info (25565) Lock list requested: http://192.168.178.93:8080/list?token=geheim
nuki.0 2020-03-06 16:13:11.092 info (25565) found hardware bridge: 164400993 (IP: 192.168.178.93; Port: 8080)
nuki.0 2020-03-06 16:13:04.962 info (25565) starting. Version 1.1.3 in /opt/iobroker/node_modules/iobroker.nuki, node: v10.19.0
nuki.0 2020-03-06 16:12:32.776 info (25388) Callback-ID successfully removed: 0
nuki.0 2020-03-06 16:12:32.691 info (25388) Terminated (NO_ERROR): Without reason
nuki.0 2020-03-06 16:12:32.674 info (25388) terminating
nuki.0 2020-03-06 16:12:32.655 info (25388) cleaned everything up...
nuki.0 2020-03-06 16:12:32.651 error at IncomingMessage.emit (events.js:203:15)
nuki.0 2020-03-06 16:12:32.651 error at Object.onceWrapper (events.js:286:20)
nuki.0 2020-03-06 16:12:32.651 error at IncomingMessage. (/opt/iobroker/node_modules/request/request.js:1083:12)
nuki.0 2020-03-06 16:12:32.651 error at Request.emit (events.js:198:13)
nuki.0 2020-03-06 16:12:32.651 error at Request. (/opt/iobroker/node_modules/request/request.js:1161:10)
nuki.0 2020-03-06 16:12:32.651 error at Request.emit (events.js:198:13)
nuki.0 2020-03-06 16:12:32.651 error at Request.self.callback (/opt/iobroker/node_modules/request/request.js:185:22)
nuki.0 2020-03-06 16:12:32.651 error at Request._callback (/opt/iobroker/node_modules/iobroker.nuki/main.js:1036:21)
nuki.0 2020-03-06 16:12:32.651 error at updateAllLockStates (/opt/iobroker/node_modules/iobroker.nuki/main.js:791:13)
nuki.0 2020-03-06 16:12:32.651 error at setLockState (/opt/iobroker/node_modules/iobroker.nuki/main.js:757:26)
nuki.0 2020-03-06 16:12:32.651 error (25388) ReferenceError: _obj is not defined
nuki.0 2020-03-06 16:12:32.651 error (25388) uncaught exception: _obj is not defined
nuki.0 2020-03-06 16:12:32.644 info (25388) Lock list requested: http://192.168.178.93:8080/list?token=geheim
nuki.0 2020-03-06 16:11:39.625 info (25388) Bridge Info requested: http://192.168.178.93:8080/info?token=geheim
nuki.0 2020-03-06 16:11:38.690 info (25388) Server listening to http://192.168.178.41:11111
nuki.0 2020-03-06 16:11:38.685 info (25388) Callback allready set: http://192.168.178.41:11111/api/nuki.0
nuki.0 2020-03-06 16:11:36.414 info (25388) Lock list requested: http://192.168.178.93:8080/list?token=geheim
nuki.0 2020-03-06 16:11:35.601 info (25388) found hardware bridge: 164400993 (IP: 192.168.178.93; Port: 8080)
nuki.0 2020-03-06 16:11:29.479 info (25388) starting. Version 1.1.3 in /opt/iobroker/node_modules/iobroker.nuki, node: v10.19.0
nuki.0 2020-03-06 16:10:57.567 error (25087) null
nuki.0 2020-03-06 16:10:57.160 info (25087) Terminated (NO_ERROR): Without reason

`

Wie steuere ich das Nuki Smart Lock in blockly

Hallo,

Ich habe den Adapter erfolgreich installiert und die Bridge eingebunden. In den Objekten kann ich den Zustand des Smart Locks lesen aber ich bekomme es nicht hin, den Wert zu ändern, sodass sich das Lock öffnet oder schließt. Bei mir z.B. in Verbindung des Zustandes der Terrassentür. Im Log erhalte ich ständig folgenden Error egal ob ich es mit der steuern, umschalten oder aktualisieren Funktion versuche:

javascript.0 | 2021-07-05 22:42:34.461 | error | Error by subscription: empty ID defined. All states matched.
javascript.0 | 2021-07-05 22:42:34.460 | error | Error by subscription: empty ID defined. All states matched.

Bitte um Hilfe.

Gruß,
Micha

action xy not successfully set!

ich habe mit dem Adapter (1.5.0) oft Warnungen im Log.

D0EF0BD6-9AD2-4E80-8879-3B40F1625918

Das war auch schon bei den älteren Versionen.

Meistens werden die Befehle dabei umgesetzt. Manchmal muss ich aber auch 2 oder 3x “pushen“
Das ist übel, wenn man vor der Tür steht 😬

Nun habe ich den ioBroker frisch, mit den neusten Adaptern installiert und auch mal das Schloss und die Bridge auf Werkseinstellungen zurückgesetzt.

Brachte leider keine Besserung.

Wrong implementation has an impact on other Nuki-connected gateways

Hi there,

seems your implementation is buggy and thereby influences the behaviour of the Nuki Bridge when being connected to another device (here: homee Smart Home Gateway).

Seems the bridge sends a HTTP Request to ioBroker, which will not be answered correctly (no status 200 response). These leads to the effect that the bridge keeps on waiting for an answer, which never arrives. And this results in the behaviour described on the homee community starting here:

https://community.hom.ee/t/nuki-sperr-zustand-wird-oft-falsch-angezeigt/23353/11?u=hblaschka

Technical details can be discussed via PM with Tankred (@tankred) or Pascal (@pascal), two of the homee Devs on the homee Community or on the above mentioned thread.

Cross posted on https://github.com/Zefau/ioBroker.nuki2 - same behaviour there.

Wrong Type

nuki.0 2021-08-05 13:59:45.210 info (31381) State value to set for "nuki.0.xxx.info.mode" has to be type "string" but received type "number"
nuki.0 2021-08-05 13:59:45.207 info (31381) State value to set for "nuki.0.xxx.info.deviceType" has to be type "string" but received type "number"

Batterie Status

hi, i have nuki power pack and in nuki app i see the % from batterie
at moment 46%, can i see that with iobroaker? at moment only status critical or not critical. an update here would be fine please

Nuki Opener

Habe mir den Nuki Opener für die Hauseingangstür verbaut und natürlich über die bridge gekoppelt. Im Adapter wird der Opener auch angezeigt allerdings in Form eines Zweiten Schlosses. Da dieser aber anders ist als das Schloss funktionieren leider keine der Buttons zum öffnen. Kommt hier zufällig ein Update in dem dieser implementiert wird oder ist der Adapter Ausschließlich für das normale Nuki Schloss gedacht?

Please check ioBroker.nuki with js-controller 2.0

Hi,

the new js-controller 2.0 will come into latest repository in the next days and we want to make sure that all adapters are working well. We already did a 2 weeks Beta test and so some adapter were aleady checked and some needed slight adjustments.

You can find more information in ioBroker/ioBroker.js-controller#482 and in the ioBroker Forum. If you have more technical questions please write in the referenced issue or in the Developer thread please. General questions are best in the genral thread.

Please update your systems to js-controller 2.0 and check your adapter.

Please close this issue once you have checked your adapter or received successfull reports from users.

Thank you very much for your support. Please contact us in the other Threads or Forum on any question.

uncaught exception jscontroller 3.3.13

Hi,
mit 3.3.13 läuft bei mir der Nuki nicht mehr, Node 14.17.0, NPM 6.14.4:

2021-06-20 10:58:16.571  - debug: nuki.0 (65253) Redis Objects: Use Redis connection: 127.0.0.1:6379
2021-06-20 10:58:16.590  - debug: nuki.0 (65253) Objects client ready ... initialize now
2021-06-20 10:58:16.591  - debug: nuki.0 (65253) Objects create System PubSub Client
2021-06-20 10:58:16.592  - debug: nuki.0 (65253) Objects create User PubSub Client
2021-06-20 10:58:16.592  - debug: nuki.0 (65253) Objects client initialize lua scripts
2021-06-20 10:58:16.599  - debug: nuki.0 (65253) Objects connected to redis: 127.0.0.1:6379
2021-06-20 10:58:16.603  - debug: nuki.0 (65253) objectDB connected
2021-06-20 10:58:16.604  - debug: nuki.0 (65253) Redis States: Use Redis connection: 127.0.0.1:6379
2021-06-20 10:58:16.608  - debug: nuki.0 (65253) States create System PubSub Client
2021-06-20 10:58:16.609  - debug: nuki.0 (65253) States create User PubSub Client
2021-06-20 10:58:16.613  - debug: nuki.0 (65253) States connected to redis: 127.0.0.1:6379
2021-06-20 10:58:16.613  - debug: nuki.0 (65253) statesDB connected
2021-06-20 10:58:16.751  - info: nuki.0 (65253) starting. Version 1.4.4 in /opt/iobroker/node_modules/iobroker.nuki, node: v14.17.0, js-controller: 3.3.13
2021-06-20 10:58:16.771  - debug: nuki.0 (65253) config Nuki bridge name: Nuki bridge
2021-06-20 10:58:16.772  - debug: nuki.0 (65253) config IP address: 192.168.0.30
2021-06-20 10:58:16.772  - debug: nuki.0 (65253) config port: 8080
2021-06-20 10:58:16.772  - debug: nuki.0 (65253) config token: xxxx
2021-06-20 10:58:16.773  - debug: nuki.0 (65253) timer set: 60000 milliseconds
2021-06-20 10:58:16.571  - debug: nuki.0 (65253) Redis Objects: Use Redis connection: 127.0.0.1:6379
2021-06-20 10:58:16.590  - debug: nuki.0 (65253) Objects client ready ... initialize now
2021-06-20 10:58:16.591  - debug: nuki.0 (65253) Objects create System PubSub Client
2021-06-20 10:58:16.592  - debug: nuki.0 (65253) Objects create User PubSub Client
2021-06-20 10:58:16.592  - debug: nuki.0 (65253) Objects client initialize lua scripts
2021-06-20 10:58:16.599  - debug: nuki.0 (65253) Objects connected to redis: 127.0.0.1:6379
2021-06-20 10:58:16.603  - debug: nuki.0 (65253) objectDB connected
2021-06-20 10:58:16.604  - debug: nuki.0 (65253) Redis States: Use Redis connection: 127.0.0.1:6379
2021-06-20 10:58:16.608  - debug: nuki.0 (65253) States create System PubSub Client
2021-06-20 10:58:16.609  - debug: nuki.0 (65253) States create User PubSub Client
2021-06-20 10:58:16.613  - debug: nuki.0 (65253) States connected to redis: 127.0.0.1:6379
2021-06-20 10:58:16.613  - debug: nuki.0 (65253) statesDB connected
2021-06-20 10:58:16.751  - info: nuki.0 (65253) starting. Version 1.4.4 in /opt/iobroker/node_modules/iobroker.nuki, node: v14.17.0, js-controller: 3.3.13
2021-06-20 10:58:16.771  - debug: nuki.0 (65253) config Nuki bridge name: Nuki bridge
2021-06-20 10:58:16.772  - debug: nuki.0 (65253) config IP address: 192.168.0.30
2021-06-20 10:58:16.772  - debug: nuki.0 (65253) config port: 8080
2021-06-20 10:58:16.772  - debug: nuki.0 (65253) config token: xxxx
2021-06-20 10:58:16.773  - debug: nuki.0 (65253) timer set: 60000 milliseconds
2021-06-20 10:58:18.709  - info: synology.0 (49626) State value to set for "synology.0.DiskStationManager.info.uptime" has to be type "string" but received type "number"
2021-06-20 10:58:18.709  - info: synology.0 (49626) State value to set for "synology.0.DiskStationManager.vol_info.volume_1.used_size" has to be type "number" but received type "string"
2021-06-20 10:58:18.709  - info: synology.0 (49626) State value to set for "synology.0.DiskStationManager.info.uptime" has to be type "string" but received type "number"
2021-06-20 10:58:18.709  - info: synology.0 (49626) State value to set for "synology.0.DiskStationManager.vol_info.volume_1.used_size" has to be type "number" but received type "string"
2021-06-20 10:58:20.054  - info: tuya.0 (54857) State value to set for "tuya.0.bf88c2fc494909d538nhnf.21" has to be type "number" but received type "string"
2021-06-20 10:58:20.214  - info: nuki.0 (65253) Bridge Info requested: http://192.168.0.30:8080/info?token=xxxxx
2021-06-20 10:58:20.225  - info: nuki.0 (65253) State value to set for "nuki.0.164400993.info.timestamp" has to be type "string" but received type "object"
2021-06-20 10:58:20.054  - info: tuya.0 (54857) State value to set for "tuya.0.bf88c2fc494909d538nhnf.21" has to be type "number" but received type "string"
2021-06-20 10:58:20.214  - info: nuki.0 (65253) Bridge Info requested: http://192.168.0.30:8080/info?token=sl0ufi
2021-06-20 10:58:20.225  - info: nuki.0 (65253) State value to set for "nuki.0.164400993.info.timestamp" has to be type "string" but received type "object"
2021-06-20 10:58:22.882  - info: nuki.0 (65253) Lock list requested: http://192.168.0.30:8080/list?token=xxxx
2021-06-20 10:58:22.883  - debug: nuki.0 (65253) found Nuki device: 279997633
2021-06-20 10:58:22.886  - debug: nuki.0 (65253) found Nuki device: 645032813
2021-06-20 10:58:22.887  - error: nuki.0 (65253) uncaught exception: Cannot read property 'hasOwnProperty' of undefined
2021-06-20 10:58:22.888  - error: nuki.0 (65253) TypeError: Cannot read property 'hasOwnProperty' of undefined
    at initNukiDeviceStates (/opt/iobroker/node_modules/iobroker.nuki/main.js:366:19)
    at updateAllLockStates (/opt/iobroker/node_modules/iobroker.nuki/main.js:868:13)
    at Request._callback (/opt/iobroker/node_modules/iobroker.nuki/main.js:1237:17)
    at Request.self.callback (/opt/iobroker/node_modules/request/request.js:185:22)
    at Request.emit (events.js:376:20)
    at Request.<anonymous> (/opt/iobroker/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:376:20)
    at IncomingMessage.<anonymous> (/opt/iobroker/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:482:28)
    at IncomingMessage.emit (events.js:388:22)
2021-06-20 10:58:22.888  - error: nuki.0 (65253) Cannot read property 'hasOwnProperty' of undefined
2021-06-20 10:58:22.897  - info: nuki.0 (65253) cleaned everything up...
2021-06-20 10:58:22.897  - info: nuki.0 (65253) terminating
2021-06-20 10:58:22.898  - warn: nuki.0 (65253) Terminated (UNCAUGHT_EXCEPTION): Without reason
2021-06-20 10:58:22.900  - info: nuki.0 (65253) State value to set for "nuki.0.279997633.info.deviceType" has to be type "string" but received type "number"
2021-06-20 10:58:22.900  - info: nuki.0 (65253) State value to set for "nuki.0.279997633.info.mode" has to be type "string" but received type "number"
2021-06-20 10:58:22.882  - info: nuki.0 (65253) Lock list requested: http://192.168.0.30:8080/list?token=xxxxx
2021-06-20 10:58:22.883  - debug: nuki.0 (65253) found Nuki device: 279997633
2021-06-20 10:58:22.886  - debug: nuki.0 (65253) found Nuki device: 645032813
2021-06-20 10:58:22.887  - error: nuki.0 (65253) uncaught exception: Cannot read property 'hasOwnProperty' of undefined
2021-06-20 10:58:22.888  - error: nuki.0 (65253) TypeError: Cannot read property 'hasOwnProperty' of undefined
    at initNukiDeviceStates (/opt/iobroker/node_modules/iobroker.nuki/main.js:366:19)
    at updateAllLockStates (/opt/iobroker/node_modules/iobroker.nuki/main.js:868:13)
    at Request._callback (/opt/iobroker/node_modules/iobroker.nuki/main.js:1237:17)
    at Request.self.callback (/opt/iobroker/node_modules/request/request.js:185:22)
    at Request.emit (events.js:376:20)
    at Request.<anonymous> (/opt/iobroker/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:376:20)
    at IncomingMessage.<anonymous> (/opt/iobroker/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:482:28)
    at IncomingMessage.emit (events.js:388:22)
2021-06-20 10:58:22.888  - error: nuki.0 (65253) Cannot read property 'hasOwnProperty' of undefined
2021-06-20 10:58:22.897  - info: nuki.0 (65253) cleaned everything up...
2021-06-20 10:58:22.897  - info: nuki.0 (65253) terminating
2021-06-20 10:58:22.898  - warn: nuki.0 (65253) Terminated (UNCAUGHT_EXCEPTION): Without reason
2021-06-20 10:58:22.900  - info: nuki.0 (65253) State value to set for "nuki.0.279997633.info.deviceType" has to be type "string" but received type "number"
2021-06-20 10:58:22.900  - info: nuki.0 (65253) State value to set for "nuki.0.279997633.info.mode" has to be type "string" but received type "number"
2021-06-20 10:58:23.913  - error: host.VMC123-iobroker instance system.adapter.nuki.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
2021-06-20 10:58:23.915  - info: host.VMC123-iobroker Restart adapter system.adapter.nuki.0 because enabled
2021-06-20 10:58:23.913  - error: host.VMC123-iobroker instance system.adapter.nuki.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
2021-06-20 10:58:23.915  - info: host.VMC123-iobroker Restart adapter system.adapter.nuki.0 because enabled

Nuki Türsensor auslesen

Gibt es eine Möglichkeit bzw. einen Wert der mir den Zustand des Türsensors anzeigt? Ich würde gerne wissen, ob die Tür wirklich geschlossen ist oder ob nur der Riegel ausgefahren wurde.

Software bridge & "null" device

Thanks for your development. I would like to support you if you need help with the development. I developed a nello adapter not too long ago (https://github.com/Zefau/ioBroker.nello).

I experienced two issues:

  1. The adapter creates a tree null (nuki.0.null.35...669).
  2. I'm using a software bridge (running an android app, see https://nuki.io/de/blog-de/android-bridge-app-2/). Due to this, the API apparently does not publish an IP address for some reason. The URL https://api.nuki.io/discover/bridges only returns bridgeId, dateUpdated and errorCode. So https://github.com/smaragdschlange/ioBroker.nuki/blob/master/main.js#L514 returns false and initBridgeStates will not be called for me.

Furthermore, I found a nuki API implementation on npm (https://www.npmjs.com/package/nuki-api) and was wondering why the adapter is not based on the API implementation?

Cheers,
Zefau

Nuki 3.0

I have the new nuki 3.0, it is integrated but the data is missing

Not starting

Hi,

After starting the adapter for my bridge, connected to Nuki V2, the log is showing this messages:

instance system.adapter.nuki.0 terminated with code 0 (OK)
by controller[0]: at Request.emit (events.js:211:7)
by controller[0]: at emitOne (events.js:116:13)
by controller[0]: at Request. (/opt/iobroker/node_modules/request/request.js:1161:10)
by controller[0]: at Request.emit (events.js:214:7)
by controller[0]: at emitTwo (events.js:126:13)
by controller[0]: at Request.self.callback (/opt/iobroker/node_modules/request/request.js:185:22)
by controller[0]: at Request._callback (/opt/iobroker/node_modules/iobroker.nuki/main.js:555:21)
by controller[0]: at updateAllLockStates (/opt/iobroker/node_modules/iobroker.nuki/main.js:418:13)
by controller[0]: at initNukiStates (/opt/iobroker/node_modules/iobroker.nuki/main.js:341:5)
by controller[0]: at setLockState (/opt/iobroker/node_modules/iobroker.nuki/main.js:358:23)
by controller[0]: TypeError: Cannot read property 'state' of undefined

I typed in the correct token.

Endlose Restarts seit 1.4.1

Seit Update 1.4.1 habe ich folgendes Problem: auch mit dem Update heute auf 1.4.2
IO Broker startet Endlos.

Hier das LOG:
host.iobroker 2020-11-19 17:20:53.587 info Restart adapter system.adapter.nuki.0 because enabled host.iobroker 2020-11-19 17:20:53.586 info instance system.adapter.nuki.0 terminated with code 0 (NO_ERROR) nuki.0 2020-11-19 17:20:53.066 info (1651) Terminated (NO_ERROR): Without reason nuki.0 2020-11-19 17:20:53.065 info (1651) terminating nuki.0 2020-11-19 17:20:53.047 info (1651) cleaned everything up... nuki.0 2020-11-19 17:20:53.045 error at IncomingMessage.emit (events.js:326:22) nuki.0 2020-11-19 17:20:53.045 error at Object.onceWrapper (events.js:420:28) nuki.0 2020-11-19 17:20:53.045 error at IncomingMessage.<anonymous> (/opt/iobroker/node_modules/request/request.js:1076:12) nuki.0 2020-11-19 17:20:53.045 error at Request.emit (events.js:314:20) nuki.0 2020-11-19 17:20:53.045 error at Request.<anonymous> (/opt/iobroker/node_modules/request/request.js:1154:10) nuki.0 2020-11-19 17:20:53.045 error at Request.emit (events.js:314:20) nuki.0 2020-11-19 17:20:53.045 error at Request.self.callback (/opt/iobroker/node_modules/request/request.js:185:22) nuki.0 2020-11-19 17:20:53.045 error at Request._callback (/opt/iobroker/node_modules/iobroker.nuki/main.js:1237:17) nuki.0 2020-11-19 17:20:53.045 error at updateAllLockStates (/opt/iobroker/node_modules/iobroker.nuki/main.js:868:13) nuki.0 2020-11-19 17:20:53.045 error at initNukiDeviceStates (/opt/iobroker/node_modules/iobroker.nuki/main.js:366:19) nuki.0 2020-11-19 17:20:53.045 error (1651) TypeError: Cannot read property 'hasOwnProperty' of undefined nuki.0 2020-11-19 17:20:53.043 error (1651) uncaught exception: Cannot read property 'hasOwnProperty' of undefined nuki.0 2020-11-19 17:20:53.030 info (1651) Lock list requested: http://192.168.1.211:8080/list?ts=2020-11-19T16:20:52Z&rnr=27&hash=8d4adfbb1867f7b3f7226da55f96ffd617b477873796070bbf58ffbe0be42a35 nuki.0 2020-11-19 17:20:50.033 info (1651) Bridge Info requested: http://192.168.1.211:8080/info?ts=2020-11-19T16:20:49Z&rnr=25221&hash=6a03fa0219a1393eb33f628427a8e5fd68302623692392d7b653ba29b9a704d9 nuki.0 2020-11-19 17:20:46.845 info (1651) starting. Version 1.4.1 in /opt/iobroker/node_modules/iobroker.nuki, node: v12.19.1, js-controller: 3.1.6 host.iobroker 2020-11-19 17:20:45.339 info instance system.adapter.nuki.0 started with pid 1651

Keine Ahnung warum das so ist, aber das Problem besteht leider weiterhin. Habe eben ein Rallback auf 1.3.1 gemacht, da läuft der Stabil ohne Endlosrestarts

Lg
Wing_Stefan (IOBroker Forum)

Usage of Nuki 3.0 pro with your adapter

hi,
thanks for your work on the nuki adapter and for adding support for nuki 3.0 (pro).
I have some questions about the integration of nuki 3.0 (pro), it's not a bug report, i need just further information.

The adapter settings currently need the following information:

  • ip address of the nuki bridge
  • port of the nuki bridge
  • token of the nuki bridge

grafik

As a nuki 3.0 pro user, where do i get the needed information for the adapter because there is no bridge included/in use.
Can i use the ip/port of the nuki itself?
How can i get the needed token, if the token is really required

kind regards
j.

deviceType is undefined in case of opener

Hi,

I am using the following setup:

NUKI BRIDGE
NUKI OPENER
NUKI LOCK

All devices are recognised by your adapter and objects are created. But when I am pressing the open button of the opener nothing happens and the log says: null. As it seemed like your adapter does not get the correct device type (which should be the value 2) for the opener I added a log statement in your code and it turns out that the deviceType is 'undefined' for the opener. In the object browser I can also see that there is no name (the name next to the id) for the opener but for the other two devices. Seems like your adapter has trouble to receive the correct information for the opener.

This is were I added the log statement.

function getLockState(_nukiId) { var deviceType = adapter.getState(adapter.name+'.'+adapter.instance+'.'+_nukiId+'.info.deviceType', function (err, state) { return state.val; }); var lockStateUrl = null;

State value to set has wrong type

nuki Version 1.4.4
node: v16.1.0
js-controller: 3.3.10

2021-05-14 18:03:39.526  - info: nuki.0 (25480) State value to set for "nuki.0.1320115033.info.timestamp" has to be type "string" but received type "object"
2021-05-14 18:03:42.548  - info: nuki.0 (25480) State value to set for "nuki.0.460925474.info.deviceType" has to be type "string" but received type "number"
2021-05-14 18:03:42.552  - info: nuki.0 (25480) State value to set for "nuki.0.460925474.info.mode" has to be type "string" but received type "number"
2021-05-14 18:03:42.555  - info: nuki.0 (25480) State value to set for "nuki.0.356927765.info.deviceType" has to be type "string" but received type "number"
2021-05-14 18:03:42.557  - info: nuki.0 (25480) State value to set for "nuki.0.356927765.info.mode" has to be type "string" but received type "number"

open buttons don't work since 0.2.0

Hi,
hab heute Nacht mit Begeisterung von 0.1.3 auf 1.0.1 upgedated, und mich heute morgen gewundert, warum ich nich zur Tür rein komme :-(
Schön, wenn die Datenstruktur geändert wird, habs ja gemerkt.
Leider wird zwar alles aus dem Nuki ausgelesen, aber anscheinend wird kein Signal an das Nuki gesendet..??
Hab den Adapter Debug stehen, und da kommt keine einzige Fehlermeldung.
Es wird nicht mal reagiert, wenn ich den button.open.door oder switch.door bei den Objekten betätige.

Habe Version 1.0.1, 1.0 (die als 0.2.0 angezeigt wird), die 0.2.0 getestet, immer das gleiche, keine Funktion. Der Status des Nuki wird ausgelesen, callback funktioniert, aber es wird nichts an das Nuki gesendet.

Bin wieder auf die 0.1.3 zurück, die funktioniert einwandfrei. Hier sehe ich im Log auch, wenn ein lockaction requested wird, statechange etc. wird alles protokolliert.
Bei den neueren Versionen ab 0.2.0 steht da nix im Log, deshalb schick ich hier keins mit.

NPM 6.4.0, Node 8.11.4, js-controller 1.4.2

Verify Compact mode for your adapter

We have detected that your adapter supports the compact mode. Please use the latest js-controller 2.0 and verify that everything works.

Some more information what is important to check can be found at ioBroker/ioBroker.js-controller#512

On questions please answer to the linked issue. Please close this issue after your test and add the version number that you have tested please as a comment.

Thank you for your support.

Bridge Name

Hallo!

Ersteinmal vielen Dank für Deine Arbeit.

Wie bekomme ich den Namen meiner Bridge raus (um ihn in die Adapterkonfiguration einzutragen)?
IP-Adresse, Token und Port sind schon eingetragen, der Adapter wird bloss nicht grün.

Cheers,
Andi

action 1 not successfully set!

ich bekomme oft Warnungen im Log das eine Aktion nicht gesetzt werden konnte z.B. action 1 not successfully set!.
Jedoch wurde diese Aktion dann ohne Probleme durchgeführt.
Ich nutze die Version 1.1.2

Updated to 1.10.0, false battery indication

Hi there, a few days ago I updated the nuki to 1.10.0, yesterday I got in datapoint batteryCritical the value "true", therefore I changed batteries to new ones, but still have the value "true", also it showes 1.9.5 as the firmwareVersion. In the official nuki-app batteries are ok and firmware is correctly shown as 1.10.0
Any Idea?

Regards
Wolfgang

Keine Datenpunkte / No DataPoints

Ich nutze die Software Bridge und habe den Adapter installiert.

IP, Port und token sind eingetragen. Bis auf die Bridge Info werden keine Datenpunkte erstellt.

Neue Version?

Hallo, kann es sein, dass die neue Versio nicht getaggt ist? Kann über iobroker & co nur Version 1.0.7 installieren. Danke

Compatibility check to js-controller 3.3 and Admin5 React UI

Dear Adapter developer,

with js-controller 3.2 and js-controller 3.3 some additional checks were added to make sure that created objects match to the specifications and also written state values match to the object definition.

If something is not correct this is logged as 'warning' or 'info' log.

Please take the time to verify your adapter by ideally starting with a fresh instance and do some actions and verify the log. If you see a warn log there from these checks please adjust the adapter and fix the relevant cases.

For questions please refer to ioBroker/ioBroker.js-controller#1301

Additionally we are preparing Admin 5 which will have a completely rewritten UI. Please install Admin 5, activate that new UI and verify that the configuration of you adapter works as expected also there.

More informations on Admin 5 can be found in Forum https://forum.iobroker.net/topic/44282/test-adapter-admin-5-0-x-alpha-der-neuen-ui

Please close the issue after you checked it.

Thank you very much for your support!

adapter startet nach aktualisierung auf 1.4.0 nicht mehr

nuki.0 2020-11-05 13:15:14.027 error (3283) ReferenceError: _obj is not defined at initNukiOpenerStates (/opt/iobroker/node_modules/iobroker.nuki/main.js:576:5) at initNukiDeviceStates (/opt/iobroker/node_modules/iobroker.nuki/ma
nuki.0 2020-11-05 13:15:14.026 error (3283) uncaught exception: _obj is not defined

Meldung im Log: Expected "string" or "object", received "number".

nuki.0 | 2020-04-24 00:32:07.831 | warn | (5818) This will be refused in future versions. Please report this to the developer
nuki.0 | 2020-04-24 00:32:07.831 | warn | (5818) The id xxx has an invalid type!: Expected "string" or "object", received "number".

Node 12.16.2
JS 3.0.17

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.