iobroker-community-adapters / ioBroker.nuki-extended

Nuki Smart Lock - Keyless electronic door lock for smart access with your ioBroker
MIT License
29 stars 15 forks source link

Opener does not display state correctly at "Dauerbetrieb" #30

Closed senger1985 closed 4 years ago

senger1985 commented 5 years ago

When I activate the continuous operation he shows the states below.

in the app but "Ring to open" is displayed nuki

Zefau commented 5 years ago

Please change to nuki-extended Adapter. You structure looks like nuki2 to me?

Zefau commented 5 years ago

See https://forum.iobroker.net/post/313064 and https://forum.iobroker.net/post/313097

senger1985 commented 5 years ago

Sorry, I have sent the wrong states. I already have the nuki-extended adapter installed and in use. I will test and report the developer version asap.

Zefau commented 4 years ago

@senger1985 have you had the chance to look at the latest version rc.7? Please deleted the state _ACTION and restart the adapter, because the state have had an incorrect setting. Thanks.

senger1985 commented 4 years ago

Here are the states by the latest version rc.7 by activated "Continuous operation" nuki

senger1985 commented 4 years ago

@Zefau I've tested the adapter for a few days now. The states of the smart lock work great. But I can't find useful objects for the opener. Which state shows me, whether "Ring to open" has been activated, for example? "_Action" always stays on "NO_ACTION (0)".

Zefau commented 4 years ago

Please try again the v2.0.0.

Zefau commented 4 years ago

_ACTION is only to trigger actions and will not show any state. This apparently did not work in the recent versions.

senger1985 commented 4 years ago

after I installed the v2.0.0 I did not get any connection anymore.

nuki-extended.0 2019-10-24 23: 36: 07.403 error (17701) ReferenceError: bridge_ident is not defined at adapter.config.bridges.map (/opt/iobroker/node_modules/iobroker.nuki-extended/nuki-extended .js: 289: 68) at Array.map () at nuki-extended.0 2019-10-24 23: 36: 07.402 error (17701) uncaught exception: bridge_ident is not defined

I didn't change the data in the adapter configuration.

senger1985 commented 4 years ago

I completely uninstalled the adapter today and re-installed it. But still get the same error as the issue yesterday Do you have any information, what the problem is?

Zefau commented 4 years ago

v2.0.1 should fix that. My bad.

senger1985 commented 4 years ago

I have now updated to v2.0.1 but I still can not find a state for the opener. And now also the state "lockState" is missing if the Smart Lock is locked.

Zefau commented 4 years ago

can not find a state for the opener means you do not have an opener in the tree nuki-extended.0.openers.<yourOpener> ?

And the state lockState simply does not exist within the tree nuki-extended.0.smartlocks.<yourSmartlock>.state.lockState ?

This is very weird. Can you confirm this behavior with the version v2.0.2 as well? Could you please provide the logs from the adapter startup?

Thanks for your support!

senger1985 commented 4 years ago

For sure:

nuki-extended.0 2019-10-31 10:08:05.005 warn (10006) Callback not attached due to error. See debug log for details.
nuki-extended.0 2019-10-31 10:08:04.245 info (10006) Listening for Nuki events on port xxx.
nuki-extended.0 2019-10-31 10:08:04.244 info (10006) Polling Nuki Web API with a frequency of 30s.
nuki-extended.0 2019-10-31 10:08:03.799 warn (10006) Failed retrieving /list from Nuki Bridge with name Bridge!
nuki-extended.0 2019-10-31 10:06:33.529 info (10006) starting. Version 2.0.2 in /opt/iobroker/node_modules/iobroker.nuki-extended, node: v10.16.3
host.senger1985 2019-10-31 10:06:30.418 info instance system.adapter.nuki-extended.0 started with pid 10006
host.senger1985 2019-10-31 10:06:30.379 info "system.adapter.nuki-extended.0" enabled

2.0.2 same problem.

Zefau commented 4 years ago

Could you change your instance to debug and provide the extended log? Thanks!

senger1985 commented 4 years ago

No further information at debug-mode available

nuki-extended.0 2019-10-31 10:31:21.017 info (6136) starting. Version 2.0.2 in /opt/iobroker/node_modules/iobroker.nuki-extended, node: v10.16.3
host.senger1985 2019-10-31 10:31:18.448 info instance system.adapter.nuki-extended.0 started with pid 6136
host.senger1985 2019-10-31 10:31:18.409 info "system.adapter.nuki-extended.0" enabled

Edit:

nuki-extended.0 2019-10-31 10:32:51.687 debug (6136) Cannot read property 'url' of undefined
nuki-extended.0 2019-10-31 10:32:51.686 warn (6136) Callback not attached due to error. See debug log for details.
nuki-extended.0 2019-10-31 10:32:51.488 debug (6136) Updating device openers.haustür with payload: {"smartlockId":xxx,"accountId":xxx,"authId":xxx,"name":"Haustür","favorite":true,"config":{"name":"Haustür","latitude":xxx,
nuki-extended.0 2019-10-31 10:32:51.468 debug (6136) Updating device smartlocks.wohnungstür with payload: {"smartlockId":xxx,"accountId":xxx,"authId":xxx,"name":"Wohnungstür","favorite":true,"config":{"name":"Wohnungstür","latitu
nuki-extended.0 2019-10-31 10:32:51.465 debug (6136) getWebApi(): [{"smartlockId":xxx,"accountId":xxx,"type":0,"authId":xxx,"name":"Wohnungstür","favorite":true,"config":{"name":"Wohnungstür","latitude":xxx,"longitude":13.3
nuki-extended.0 2019-10-31 10:32:51.286 info (6136) Listening for Nuki events on port xxx.
nuki-extended.0 2019-10-31 10:32:51.286 info (6136) Polling Nuki Web API with a frequency of 30s.
nuki-extended.0 2019-10-31 10:32:51.251 debug (6136) Adding callback with URL http://192.168.178.xx:xxx/nuki-api-bridge to Nuki Bridge with name Bridge.
nuki-extended.0 2019-10-31 10:32:51.244 debug (6136) Retrieved current callbacks from Nuki Bridge with name Bridge.
nuki-extended.0 2019-10-31 10:32:50.832 debug (6136) getBridgeApi(): Error: socket hang up
nuki-extended.0 2019-10-31 10:32:50.830 warn (6136) Failed retrieving /list from Nuki Bridge with name Bridge!

Edit 2:

nuki-extended.0 2019-10-31 10:34:51.427 debug (6136) Updating device openers.haustür with payload: {"smartlockId":xxx,"accountId":xxx,"authId":xxx,"name":"Haustür","favorite":true,"config":{"name":"Haustür","latitude":xxx,
nuki-extended.0 2019-10-31 10:34:51.398 debug (6136) Updating device smartlocks.wohnungstür with payload: {"smartlockId":xxx,"accountId":xxx,"authId":xxx,"name":"Wohnungstür","favorite":true,"config":{"name":"Wohnungstür","latitu
nuki-extended.0 2019-10-31 10:34:51.395 debug (6136) getWebApi(): [{"smartlockId":xxx,"accountId":xxx,"type":0,"authId":xxx,"name":"Wohnungstür","favorite":true,"config":{"name":"Wohnungstür","latitude":xxx,"longitude":13.3
nuki-extended.0 2019-10-31 10:34:21.408 debug (6136) Updating device openers.haustür with payload: {"smartlockId":xxx,"accountId":xxx,"authId":xxx,"name":"Haustür","favorite":true,"config":{"name":"Haustür","latitude":xxx,
nuki-extended.0 2019-10-31 10:34:21.392 debug (6136) Updating device smartlocks.wohnungstür with payload: {"smartlockId":xxx,"accountId":xxx,"authId":xxx,"name":"Wohnungstür","favorite":true,"config":{"name":"Wohnungstür","latitu
nuki-extended.0 2019-10-31 10:34:21.391 debug (6136) getWebApi(): [{"smartlockId":xxx,"accountId":xxx,"type":0,"authId":xxx,"name":"Wohnungstür","favorite":true,"config":{"name":"Wohnungstür","latitude":xxx,"longitude":13.3
nuki-extended.0 2019-10-31 10:33:51.439 debug (6136) Updating device openers.haustür with payload: {"smartlockId":xxx,"accountId":xxx,"authId":xxx,"name":"Haustür","favorite":true,"config":{"name":"Haustür","latitude":xxx,
nuki-extended.0 2019-10-31 10:33:51.392 debug (6136) Updating device smartlocks.wohnungstür with payload: {"smartlockId":xxx,"accountId":xxx,"authId":xxx,"name":"Wohnungstür","favorite":true,"config":{"name":"Wohnungstür","latitu
nuki-extended.0 2019-10-31 10:33:51.391 debug (6136) getWebApi(): [{"smartlockId":xxx,"accountId":xxx,"type":0,"authId":xxx,"name":"Wohnungstür","favorite":true,"config":{"name":"Wohnungstür","latitude":xxx,"longitude":13.3
nuki-extended.0 2019-10-31 10:33:21.657 debug (6136) Updating device openers.haustür with payload: {"smartlockId":xxx,"accountId":xxx,"authId":xxx,"name":"Haustür","favorite":true,"config":{"name":"Haustür","latitude":xxx,
nuki-extended.0 2019-10-31 10:33:21.643 debug (6136) Updating device smartlocks.wohnungstür with payload: {"smartlockId":xxx,"accountId":xxx,"authId":xxx,"name":"Wohnungstür","favorite":true,"config":{"name":"Wohnungstür","latitu
nuki-extended.0 2019-10-31 10:33:21.641 debug (6136) getWebApi(): [{"smartlockId":xxx,"accountId":xxx,"type":0,"authId":xxx,"name":"Wohnungstür","favorite":true,"config":{"name":"Wohnungstür","latitude":xxx
Zefau commented 4 years ago

The adapter is not able to connect to your bridge (Error: socket hang up).

Are you able to call your bridge manually using your browser by opening http://192.168.178.xx:8080/list?token=token ?

senger1985 commented 4 years ago

Yes, I can do it.

senger1985 commented 4 years ago

I do not know why. But in the JSON that is returned to me, no lockstate is available:

[{"deviceType": 0, "nukiId": xxx, "name": "Wohnungstür", "lastKnownState": {"mode": 2, "state": 1, "stateName": "locked", "batteryCritical": false, "timestamp": "2019-10-31T01:20:22+00:00"}}, {"deviceType": 2, "nukiId": xxx, "name": "Haustür", "lastKnownState": {"mode": 2, "state": 1, "stateName": "online", "batteryCritical": false, "timestamp": "2019-10-30T20:34:14+00:00"}}]

Zefau commented 4 years ago

The lockState is lastKnownState.state. The adapter is remapping it to separate it from doorState

Zefau commented 4 years ago

Could you try and install the current version from Github (version number remains unchanged) ?

Zefau commented 4 years ago

Thanks for your patience and help in this.

senger1985 commented 4 years ago

Perfect "lockState" is available again. You can close the issue.

senger1985 commented 4 years ago

You are amazing

Zefau commented 4 years ago

Does your Nuki Opener shows the correct state though in regards to ring to open? And does v2.0.2 apply the action correctly to your Nuki Opener (e.g. open the door)?

senger1985 commented 4 years ago

Only "lastaction" changes from ACTIVE RTO (1) [ringtoopen is activated] to DEACTIVE RTO (2) [ringtoopen is deactivated] Is that the correct behavior?

senger1985 commented 4 years ago

"ringToOpenTimer" changes too when activated

Zefau commented 4 years ago

Did you do that with the adapter or in the smartphone app?

Correct behavior would be:

  1. Triggering the state _ACTION should apply the selected action on the Nuki Opener, e.g. ELECTRIC STRIKE ACTUATION should open the door.
  2. state.lastAction simply shows the last applied action from any device (adapter or smartphone app) applied to Nuki Opener
  3. state.lockState should show RING_TO_OPEN when either RTO geo fence is active OR continuous mode is activated.
senger1985 commented 4 years ago

I do that with in the app. state.lockState shows ONLINE(1) _ACTION shows only NO_ACTION(0)

senger1985 commented 4 years ago

My bad. ELECTRIC STRIKE ACTUATION is displayed when opening

Zefau commented 4 years ago

_ACTION shows only NO_ACTION(0)

That is true. It will always show that. This is the state you can use to trigger any action. When selected, the state will jump back to NO_ACTION(0) but trigger the selected action.

Sounds to me though, that everything works fine? :)

senger1985 commented 4 years ago

I think so, too ;) Thank you for the gread adapter

Zefau commented 4 years ago

You're very welcome