Skip to content
This repository has been archived by the owner on Apr 25, 2021. It is now read-only.

Danalock Siri #136

Open
MindaugasRam opened this issue Feb 7, 2019 · 126 comments
Open

Danalock Siri #136

MindaugasRam opened this issue Feb 7, 2019 · 126 comments
Labels

Comments

@MindaugasRam
Copy link

Hi,
plugin works great, thanks for it. I have only issue with Siri. When I ask Siri to open or close lock, it does but responses it was unable to do it. Home kit app works perfectly. Just Siri responses are faulty.
Any thoughts how to fix it. Thanks

@ilcato
Copy link
Owner

ilcato commented Feb 7, 2019

No idea. I do not have such a device.

@MindaugasRam
Copy link
Author

This is what I am getting in logs, maybe it might help you

[2/7/2019, 9:50:03 PM] [FibaroHC2] Setting value to device: 47 parameter: Lock Target State
[2/7/2019, 9:50:03 PM] [FibaroHC2] Command: unsecure, value: 0, to: 47
[2/7/2019, 9:50:03 PM] [FibaroHC2] Getting value from device: 47 parameter: Lock Current State
[2/7/2019, 9:50:03 PM] [FibaroHC2] Sent event: hb_fhc2_value_set, to: PUT KEY OF YOUR MAKER CHANNEL HERE (USED TO SIGNAL EVENTS TO THE OUTSIDE), for 47
[2/7/2019, 9:50:04 PM] [FibaroHC2] Getting value from device: 47 parameter: Lock Target State
[2/7/2019, 9:50:05 PM] [FibaroHC2] There was a problem setting value to Lock: 47
[2/7/2019, 9:50:05 PM] [FibaroHC2] Sent event: hb_fhc2_lock_error, to: PUT KEY OF YOUR MAKER CHANNEL HERE (USED TO SIGNAL EVENTS TO THE OUTSIDE), for 47
[2/7/2019, 9:50:09 PM] [FibaroHC2] Updating value for device: 47 parameter: Lock Current State, value: false
[2/7/2019, 9:50:09 PM] [FibaroHC2] Updating value for device: 47 parameter: Lock Target State, value: false
[2/7/2019, 9:50:09 PM] [FibaroHC2] Sent event: hb_fhc2_value_get, to: PUT KEY OF YOUR MAKER CHANNEL HERE (USED TO SIGNAL EVENTS TO THE OUTSIDE), for 47
[2/7/2019, 9:50:09 PM] [FibaroHC2] Sent event: hb_fhc2_value_get, to: PUT KEY OF YOUR MAKER CHANNEL HERE (USED TO SIGNAL EVENTS TO THE OUTSIDE), for 47

@carlittoer
Copy link

Hi,

I have the same issue as well. All works, but Siri sometimes responds that it wasn't able to unlock while the lock really unlocks... How can I help?

@ilcato
Copy link
Owner

ilcato commented Mar 6, 2019

@MindaugasRam, I don't think it is related to the issue but I see a misconfiguration from your logs.
Remove in config.json the rows containing:
IFTTTmakerkey
enableIFTTTnotification

and do not forget to remove the last ","

@MindaugasRam
Copy link
Author

Thanks. I fixed that. But as you said it is not relaited to danalock. Still getting that Siri error.

@MindaugasRam
Copy link
Author

@ilcato I found that someone managed to fix that on viera damianxd/homebridge-vera@c59f269. If you could look into it, when you have time, and fix as well if it is possible. Thanks

@ilcato
Copy link
Owner

ilcato commented Mar 7, 2019

Can you post a clean log?

@MindaugasRam
Copy link
Author

[3/7/2019, 8:35:41 PM] [FibaroHC2] didFinishLaunching.
[3/7/2019, 8:35:41 PM] Homebridge is running on port 51826.
[3/7/2019, 8:35:41 PM] [FibaroHC2] Loading accessories
[3/7/2019, 8:35:41 PM] [FibaroHC2] Added/changed accessory: Saliono sviesa
[3/7/2019, 8:35:41 PM] [FibaroHC2] Added/changed accessory: Beatrices lempa
[3/7/2019, 8:35:41 PM] [FibaroHC2] Added/changed accessory: Miegamo akis
[3/7/2019, 8:35:41 PM] [FibaroHC2] Added/changed accessory: Miegamo temp
[3/7/2019, 8:35:41 PM] [FibaroHC2] Added/changed accessory: Miegamo sviesa
[3/7/2019, 8:35:41 PM] [FibaroHC2] Added/changed accessory: Paradines durys
[3/7/2019, 8:35:41 PM] [FibaroHC2] Added/changed accessory: Kosto akis
[3/7/2019, 8:35:41 PM] [FibaroHC2] Added/changed accessory: Kosto temp
[3/7/2019, 8:35:41 PM] [FibaroHC2] Added/changed accessory: Kosto sviesa
[3/7/2019, 8:35:41 PM] [FibaroHC2] Added/changed accessory: Gaisro sensorius
[3/7/2019, 8:35:41 PM] [FibaroHC2] Added/changed accessory: Beatrices temp
[3/7/2019, 8:35:41 PM] [FibaroHC2] Added/changed accessory: Naktine lempa
[3/7/2019, 8:35:41 PM] [FibaroHC2] Added/changed accessory: Apple TV
[3/7/2019, 8:36:22 PM] [FibaroHC2] Getting value from device: 47 parameter: Lock Current State
[3/7/2019, 8:36:36 PM] [FibaroHC2] Setting value to device: 47 parameter: Lock Target State
[3/7/2019, 8:36:36 PM] [FibaroHC2] Command: unsecure, value: 0, to: 47
[3/7/2019, 8:36:36 PM] [FibaroHC2] Getting value from device: 47 parameter: Lock Current State
[3/7/2019, 8:36:37 PM] [FibaroHC2] Getting value from device: 47 parameter: Lock Target State
[3/7/2019, 8:36:39 PM] [FibaroHC2] There was a problem setting value to Lock: 47
[3/7/2019, 8:36:41 PM] [FibaroHC2] Updating value for device: 47 parameter: Lock Current State, value: false
[3/7/2019, 8:36:41 PM] [FibaroHC2] Updating value for device: 47 parameter: Lock Target State, value: false
[3/7/2019, 8:37:31 PM] [FibaroHC2] Updating value for device: 65 parameter: Current Temperature, value: 21.80
[3/7/2019, 8:37:31 PM] [FibaroHC2] Updating value for device: 65 parameter: Current Temperature, value: 21.80

@MindaugasRam
Copy link
Author

When I am asking siri door status (8:36:22), it says without problem and no errors. Just when I am asking to lock or unlock I am having that issue.

@ilcato
Copy link
Owner

ilcato commented Mar 7, 2019

Let me recap: the problem is that you see the following line in the log:
There was a problem setting value to Lock: 47
but the command you asked is correctly executed?

@MindaugasRam
Copy link
Author

Yes. Command to lock or unlock doors is executed correctly, but Siri says “I wasn’t able to lock/unlock doors”. If I am asking Siri “what is door status” it answers correctly.

@ilcato
Copy link
Owner

ilcato commented Mar 8, 2019

Which value did you put into doorlocktimeout parameter?

@MindaugasRam
Copy link
Author

"doorlocktimeout": "3"

@carlittoer
Copy link

carlittoer commented Mar 8, 2019 via email

@ilcato
Copy link
Owner

ilcato commented Mar 8, 2019

In my case, changing doorlocktimeout values is not affecting the behavior. I tried 0, 3 (the time needed for the lock and actually fully lock) and higher values. What is this parameter used for really?

IT should signal via IFTTT a mismatch between the command sent to the lock and the real status after N seconds.

@MindaugasRam put it to 0 or better remove the line from the config.json and try again please.

@carlittoer
Copy link

carlittoer commented Mar 8, 2019 via email

@ilcato
Copy link
Owner

ilcato commented Mar 8, 2019

So if you're not using IFTT, it's not needed. Right ?

Correct

@MindaugasRam
Copy link
Author

I deleted all line. Still same

@MindaugasRam
Copy link
Author

it works good with Siri Shortcuts

@ilcato
Copy link
Owner

ilcato commented Mar 8, 2019

@ilcato I found that someone managed to fix that on viera damianxd/homebridge-vera@c59f269. If you could look into it, when you have time, and fix as well if it is possible. Thanks

@MindaugasRam, what did you find in this commit that let you think about a solution ?

@ilcato
Copy link
Owner

ilcato commented Mar 8, 2019

@MindaugasRam, can you send me the configuration of the device through the rest api?

@MindaugasRam
Copy link
Author

I've been searching and found this ptz0n/homebridge-verisure#29, but I am not familiar with coding so thought you might be able to see that code and maybe find solution for yours :)

@MindaugasRam
Copy link
Author

rest api - what do you mean? I am running homebridge in docker on synology nas, where you want me to look for it?

@ilcato
Copy link
Owner

ilcato commented Mar 8, 2019

rest api - what do you mean? I am running homebridge in docker on synology nas, where you want me to look for it?

connect to http://HOME_BRIDGE_IP/docs

select devices

insert the device id of the lock

read the response and sen it to me.

@MindaugasRam
Copy link
Author

http://HOME_BRIDGE_IP:port/docs - brings me to homebridge home page

@carlittoer
Copy link

carlittoer commented Mar 8, 2019 via email

@ilcato
Copy link
Owner

ilcato commented Mar 8, 2019

Thanks @carlittoer

@ilcato
Copy link
Owner

ilcato commented Mar 8, 2019

@MindaugasRam, @carlittoer,
when the problem arise is the lock status reported by the Homecenter app correct? How much time does it take, after the voice command, to change the lock state for both the physical device and the HomeCenter app widget?

@MindaugasRam
Copy link
Author

Homecenter app status is correct. Siri answers in no time, like straight away. It takes about 3-5 secs to change lock status. Homecenter app is quicker to report correct value, diferrence 2-3 secs

@MindaugasRam
Copy link
Author

when the device (lock) starts to lock or unlock, siri gives the error message.

@MindaugasRam
Copy link
Author

I can't find where do I need to change those values. Could you please clarify which line. Mine lock works no issues, but if you guys want me to try smth for you please be more specific I am not so smart ;)

@Krillle
Copy link
Contributor

Krillle commented Apr 7, 2019

Same here: Siri closes lock, but immediately responds she was not able to, even while the lock is still operating.

Changing "doorlocktimeout" parameter to 0 or 15 has no effect

Danalock V3 Z-Wave via Fibaro HC2
[email protected]
[email protected]

Here is my log file:

Apr 07 14:23:04 Homebridge homebridge[870]: [2019-4-7 14:23:04] [FibaroHC2] Setting value to device:  273  parameter: Lock Target State
Apr 07 14:23:04 Homebridge homebridge[870]: [2019-4-7 14:23:04] [FibaroHC2] Command:  secure, value: 0, to: 273
Apr 07 14:23:05 Homebridge homebridge[870]: [2019-4-7 14:23:05] [FibaroHC2] Getting value from device:  273  parameter: Lock Current State
Apr 07 14:23:06 Homebridge homebridge[870]: [2019-4-7 14:23:06] [FibaroHC2] Getting value from device:  273  parameter: Lock Target State
Apr 07 14:23:09 Homebridge homebridge[870]: [2019-4-7 14:23:09] [FibaroHC2] Updating value for device:  273  parameter: Lock Current State, value: true
Apr 07 14:23:09 Homebridge homebridge[870]: [2019-4-7 14:23:09] [FibaroHC2] Updating value for device:  273  parameter: Lock Target State, value: true

What is different: I do not have the error line mentioned above
[3/7/2019, 8:36:39 PM] [FibaroHC2] There was a problem setting value to Lock: 47

Let me know, if I can contribute further.

@MindaugasRam
Copy link
Author

@Krillle mine danalock works perfect with a siri as well, it has bit off delay but no more error mesages. fix #136 solved my problem, and btw I have removed lock line from homebridge config

@Krillle
Copy link
Contributor

Krillle commented Apr 7, 2019

@MindaugasRam This is good to hear. I assumed so already reading the conversation.
How did you install this fix? Via:
sudo npm install -g git+https://github.com/ilcato/homebridge-Fibaro-HC2.git

@ilcato May I ask to update the package at npm to 2.2.1.

@MindaugasRam
Copy link
Author

@Krillle yes you have to update it manually. Copy paste. And restart

@Krillle
Copy link
Contributor

Krillle commented Apr 8, 2019

@MindaugasRam Thanks for your answer. I think I will wait for the update at npm then.

@ilcato
Copy link
Owner

ilcato commented Apr 8, 2019

Published current master version in pm as 2.2.1.

@Krillle, please install the upgrade and check if it works for you.

@carlittoer, @MindaugasRam please install from nom and report potential issues back here.

@Krillle
Copy link
Contributor

Krillle commented Apr 8, 2019

@ilcato Thanks for updating npm.
I tried to update my installation, but does not install. It hangs here:

sudo npm install -g homebridge-fibaro-hc2
[..................] \ fetchMetadata: sill resolveWithNewModule [email protected] checking installable status

No clue why.

@ilcato
Copy link
Owner

ilcato commented Apr 8, 2019

@Krillle, try to uninstall and reinstall it.

@Krillle
Copy link
Contributor

Krillle commented Apr 8, 2019

@ilcato Uninstall went smooth. Install hangs again. Now I am stuck.

pi@Homebridge:~ $ sudo npm uninstall -g homebridge-fibaro-hc2
removed 50 packages in 2.477s
pi@Homebridge:~ $ sudo npm install -g homebridge-fibaro-hc2
[..................] / rollbackFailedOptional: verb npm-session 9a4d14dcbfe0a5c0

@Krillle
Copy link
Contributor

Krillle commented Apr 8, 2019

@ilcato Here is some more detailed error message:

pi@Homebridge:~ $ sudo npm install -g homebridge-fibaro-hc2
npm ERR! Unexpected end of JSON input while parsing near '...,"@types/convert-sour'

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-04-08T14_15_31_171Z-debug.log
pi@Homebridge:~ $ 

Do you need the full log?

@ilcato
Copy link
Owner

ilcato commented Apr 8, 2019

yes

@Krillle
Copy link
Contributor

Krillle commented Apr 8, 2019

Here it is: /root/.npm/_logs/2019-04-08T14_15_31_171Z-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli   '/usr/bin/npm',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   'homebridge-fibaro-hc2' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session c1c56a02f0859a83
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 304 https://registry.npmjs.org/homebridge-fibaro-hc2 39070ms attempt #2 (from cache)
8 silly pacote tag manifest for homebridge-fibaro-hc2@latest fetched in 39237ms
9 silly install loadIdealTree
10 silly install cloneCurrentTreeToIdealTree
11 silly install loadShrinkwrap
12 silly install loadAllDepsIntoIdealTree
13 silly resolveWithNewModule [email protected] checking installable status
14 http fetch GET 304 https://registry.npmjs.org/request 6711ms (from cache)
15 silly pacote range manifest for request@^2.88.0 fetched in 6750ms
16 silly resolveWithNewModule [email protected] checking installable status
17 http fetch GET 200 https://registry.npmjs.org/typescript 465454ms
18 silly fetchPackageMetaData error for typescript@^2.2.2 Unexpected end of JSON input while parsing near '...,"@types/convert-sour'
19 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...,"@types/convert-sour'
19 verbose stack     at JSON.parse (<anonymous>)
19 verbose stack     at parseJson (/usr/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-better-errors/index.js:7:17)
19 verbose stack     at consumeBody.call.then.buffer (/usr/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/body.js:96:50)
19 verbose stack     at <anonymous>
19 verbose stack     at process._tickCallback (internal/process/next_tick.js:188:7)
20 verbose cwd /home/pi
21 verbose Linux 4.14.50-v7+
22 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "homebridge-fibaro-hc2"
23 verbose node v8.11.4
24 verbose npm  v5.6.0
25 error Unexpected end of JSON input while parsing near '...,"@types/convert-sour'
26 verbose exit [ 1, true ]

@Krillle
Copy link
Contributor

Krillle commented Apr 8, 2019

It seems it was a local problem. sudo npm cache clean --force solved it. Now 2.2.1 did install.
I got a nasty WARN using --force I sure hope you know what you are doing. But I hope it it did not break anything,

@Krillle
Copy link
Contributor

Krillle commented Apr 8, 2019

@ilcato I checked with 2.2.1:
After first try failed it does now work as it should. Thanks for fixing!

@Krillle
Copy link
Contributor

Krillle commented Apr 8, 2019

@ilcato I installed in office and at home now. Actually it works most of the cases, but not always.
There is two types of weird behavior:

A) Door is immediately unlocked after being locked - and then declared correctly as "I could not lock door". This happened several times.

B) Randomly Siri states she could not lock or unlock the door, despite she did. Can be she has this problem only opening the doors. But I can't find a reproducible scheme.
In most of the cases this "could not open" message came after the lock stopped operating, but once the message came while it was still operating.

Here is the log excerpt to such a behavior:

Apr 08 21:25:18 Homebridge homebridge[3775]: [2019-4-8 21:25:18] [FibaroHC2] Setting value to device:  233  parameter: Lock Target State
Apr 08 21:25:18 Homebridge homebridge[3775]: [2019-4-8 21:25:18] [FibaroHC2] Setting value to device:  273  parameter: Lock Target State
Apr 08 21:25:18 Homebridge homebridge[3775]: [2019-4-8 21:25:18] [FibaroHC2] Command:  secure, value: 0, to: 233
Apr 08 21:25:18 Homebridge homebridge[3775]: [2019-4-8 21:25:18] [FibaroHC2] Command:  secure, value: 0, to: 273
Apr 08 21:25:18 Homebridge homebridge[3775]: [2019-4-8 21:25:18] [FibaroHC2] Getting value from device:  233  parameter: Lock Current State
Apr 08 21:25:18 Homebridge homebridge[3775]: [2019-4-8 21:25:18] [FibaroHC2] Getting value from device:  273  parameter: Lock Current State
Apr 08 21:25:22 Homebridge homebridge[3775]: [2019-4-8 21:25:22] [FibaroHC2] Getting value from device:  273  parameter: Lock Target State
Apr 08 21:25:22 Homebridge homebridge[3775]: [2019-4-8 21:25:22] [FibaroHC2] Getting value from device:  233  parameter: Lock Target State
Apr 08 21:25:24 Homebridge homebridge[3775]: [2019-4-8 21:25:24] [FibaroHC2] Updating value for device:  273  parameter: Lock Current State, value: true
Apr 08 21:25:24 Homebridge homebridge[3775]: [2019-4-8 21:25:24] [FibaroHC2] Updating value for device:  273  parameter: Lock Target State, value: true
Apr 08 21:25:25 Homebridge homebridge[3775]: [2019-4-8 21:25:25] [FibaroHC2] Getting value from device:  233  parameter: Lock Current State
Apr 08 21:25:25 Homebridge homebridge[3775]: [2019-4-8 21:25:25] [FibaroHC2] Getting value from device:  273  parameter: Lock Current State
Apr 08 21:25:34 Homebridge homebridge[3775]: [2019-4-8 21:25:34] [FibaroHC2] Setting value to device:  233  parameter: Lock Target State
Apr 08 21:25:34 Homebridge homebridge[3775]: [2019-4-8 21:25:34] [FibaroHC2] Setting value to device:  273  parameter: Lock Target State
Apr 08 21:25:34 Homebridge homebridge[3775]: [2019-4-8 21:25:34] [FibaroHC2] Command:  unsecure, value: 0, to: 233
Apr 08 21:25:34 Homebridge homebridge[3775]: [2019-4-8 21:25:34] [FibaroHC2] Command:  unsecure, value: 0, to: 273
Apr 08 21:25:34 Homebridge homebridge[3775]: [2019-4-8 21:25:34] [FibaroHC2] Getting value from device:  233  parameter: Lock Current State
Apr 08 21:25:34 Homebridge homebridge[3775]: [2019-4-8 21:25:34] [FibaroHC2] Getting value from device:  273  parameter: Lock Current State
Apr 08 21:25:38 Homebridge homebridge[3775]: [2019-4-8 21:25:38] [FibaroHC2] Getting value from device:  273  parameter: Lock Target State
Apr 08 21:25:38 Homebridge homebridge[3775]: [2019-4-8 21:25:38] [FibaroHC2] Getting value from device:  233  parameter: Lock Target State
Apr 08 21:25:39 Homebridge homebridge[3775]: [2019-4-8 21:25:39] [FibaroHC2] Updating value for device:  173  parameter: Current Temperature, value: 25.90
Apr 08 21:25:39 Homebridge homebridge[3775]: [2019-4-8 21:25:39] [FibaroHC2] Updating value for device:  273  parameter: Lock Current State, value: false
Apr 08 21:25:39 Homebridge homebridge[3775]: [2019-4-8 21:25:39] [FibaroHC2] Updating value for device:  273  parameter: Lock Target State, value: false
Apr 08 21:25:41 Homebridge homebridge[3775]: [2019-4-8 21:25:41] [FibaroHC2] There was a problem setting value to Lock:  233
Apr 08 21:25:51 Homebridge homebridge[3775]: [2019-4-8 21:25:51] [FibaroHC2] Setting value to device:  233  parameter: Lock Target State
Apr 08 21:25:51 Homebridge homebridge[3775]: [2019-4-8 21:25:51] [FibaroHC2] Setting value to device:  273  parameter: Lock Target State
Apr 08 21:25:51 Homebridge homebridge[3775]: [2019-4-8 21:25:51] [FibaroHC2] Command:  secure, value: 0, to: 233
Apr 08 21:25:51 Homebridge homebridge[3775]: [2019-4-8 21:25:51] [FibaroHC2] Command:  secure, value: 0, to: 273
Apr 08 21:25:51 Homebridge homebridge[3775]: [2019-4-8 21:25:51] [FibaroHC2] Getting value from device:  233  parameter: Lock Current State
Apr 08 21:25:51 Homebridge homebridge[3775]: [2019-4-8 21:25:51] [FibaroHC2] Getting value from device:  273  parameter: Lock Current State
Apr 08 21:25:55 Homebridge homebridge[3775]: [2019-4-8 21:25:55] [FibaroHC2] Getting value from device:  273  parameter: Lock Target State
Apr 08 21:25:55 Homebridge homebridge[3775]: [2019-4-8 21:25:55] [FibaroHC2] Getting value from device:  233  parameter: Lock Target State
Apr 08 21:25:59 Homebridge homebridge[3775]: [2019-4-8 21:25:59] [FibaroHC2] Updating value for device:  273  parameter: Lock Current State, value: true
Apr 08 21:25:59 Homebridge homebridge[3775]: [2019-4-8 21:25:59] [FibaroHC2] Updating value for device:  273  parameter: Lock Target State, value: true
Apr 08 21:26:08 Homebridge homebridge[3775]: [2019-4-8 21:26:08] [FibaroHC2] Setting value to device:  233  parameter: Lock Target State
Apr 08 21:26:08 Homebridge homebridge[3775]: [2019-4-8 21:26:08] [FibaroHC2] Setting value to device:  273  parameter: Lock Target State
Apr 08 21:26:08 Homebridge homebridge[3775]: [2019-4-8 21:26:08] [FibaroHC2] Command:  unsecure, value: 0, to: 273
Apr 08 21:26:08 Homebridge homebridge[3775]: [2019-4-8 21:26:08] [FibaroHC2] Command:  unsecure, value: 0, to: 233
Apr 08 21:26:08 Homebridge homebridge[3775]: [2019-4-8 21:26:08] [FibaroHC2] Getting value from device:  233  parameter: Lock Current State
Apr 08 21:26:08 Homebridge homebridge[3775]: [2019-4-8 21:26:08] [FibaroHC2] Getting value from device:  273  parameter: Lock Current State
Apr 08 21:26:12 Homebridge homebridge[3775]: [2019-4-8 21:26:12] [FibaroHC2] Getting value from device:  273  parameter: Lock Target State
Apr 08 21:26:12 Homebridge homebridge[3775]: [2019-4-8 21:26:12] [FibaroHC2] Getting value from device:  233  parameter: Lock Target State
Apr 08 21:26:13 Homebridge homebridge[3775]: [2019-4-8 21:26:13] [FibaroHC2] Updating value for device:  273  parameter: Lock Current State, value: false
Apr 08 21:26:13 Homebridge homebridge[3775]: [2019-4-8 21:26:13] [FibaroHC2] Updating value for device:  273  parameter: Lock Target State, value: false
Apr 08 21:26:15 Homebridge homebridge[3775]: [2019-4-8 21:26:15] [FibaroHC2] There was a problem setting value to Lock:  233
Apr 08 21:26:26 Homebridge homebridge[3775]: [2019-4-8 21:26:26] [FibaroHC2] Setting value to device:  233  parameter: Lock Target State
Apr 08 21:26:26 Homebridge homebridge[3775]: [2019-4-8 21:26:26] [FibaroHC2] Setting value to device:  273  parameter: Lock Target State
Apr 08 21:26:26 Homebridge homebridge[3775]: [2019-4-8 21:26:26] [FibaroHC2] Command:  secure, value: 0, to: 233
Apr 08 21:26:26 Homebridge homebridge[3775]: [2019-4-8 21:26:26] [FibaroHC2] Command:  secure, value: 0, to: 273
Apr 08 21:26:26 Homebridge homebridge[3775]: [2019-4-8 21:26:26] [FibaroHC2] Getting value from device:  233  parameter: Lock Current State
Apr 08 21:26:26 Homebridge homebridge[3775]: [2019-4-8 21:26:26] [FibaroHC2] Getting value from device:  273  parameter: Lock Current State
Apr 08 21:26:30 Homebridge homebridge[3775]: [2019-4-8 21:26:30] [FibaroHC2] Getting value from device:  273  parameter: Lock Target State
Apr 08 21:26:30 Homebridge homebridge[3775]: [2019-4-8 21:26:30] [FibaroHC2] Getting value from device:  233  parameter: Lock Target State
Apr 08 21:26:33 Homebridge homebridge[3775]: [2019-4-8 21:26:33] [FibaroHC2] Updating value for device:  273  parameter: Lock Current State, value: true
Apr 08 21:26:33 Homebridge homebridge[3775]: [2019-4-8 21:26:33] [FibaroHC2] Updating value for device:  273  parameter: Lock Target State, value: true
Apr 08 21:26:33 Homebridge homebridge[3775]: [2019-4-8 21:26:33] [FibaroHC2] Getting value from device:  233  parameter: Lock Current State
Apr 08 21:26:33 Homebridge homebridge[3775]: [2019-4-8 21:26:33] [FibaroHC2] Getting value from device:  273  parameter: Lock Current State

@carlittoer
Copy link

carlittoer commented Apr 8, 2019 via email

@Krillle
Copy link
Contributor

Krillle commented Apr 8, 2019

The locks needs 2x 360° turns. But here indeed is probably the reason why Siri has a problem opening:

Opening the door at home includes one more turn approx 270° to unlatch the second bolt (German standard outer door). This bolt is held for 3 seconds before it is released and the opening operation is finished. (Here is an example of this operation. Old Danalock but same procedure: youtu.be/HBdI2Jt8C1I)
The full cycle takes approx. 7.5 seconds.

Unlocking the door in office does not include the additional unlatching, so no additional 270° + 3 seconds wait.
This takes approx 4 seconds.

So we need two different timeouts for opening and closing. And opening timeout it is dependent on if opening the second latch is included or not.

@ilcato
Copy link
Owner

ilcato commented Apr 9, 2019

Not sure to understand, unfortunately I do not have such a device.
@MindaugasRam, @carlittoer, @Krillle can you discuss and test different values on the delays in in rows 40,41 of dist/getFunctions.js and check if a single configuration is suitable for all the models ?
Maybe the 4s of @carlittoer setup?

@Krillle
Copy link
Contributor

Krillle commented Apr 9, 2019

@ilcato The issue is:
Additional to unlocking the lock, optionally the latch/dead bolt can be pulled back for a given amount of time. For an example see video above: youtu.be/HBdI2Jt8C1I .
The duration of dead bolt being pulled back can be set in the Danalock app, means it is variable.

Besides that, unlocking of the lock sometimes takes a little longer than 4 seconds.

This means:
A) The timeouts should be set individually for opening and closing
b) The timeout for opening the lock should be customizable in the config.json

In my configuration i suppose the timeout would be 4 seconds for locking and 8 seconds for unlocking (including holding deadbolt open for 3 seconds).

@ilcato
Copy link
Owner

ilcato commented Apr 13, 2019

@Krillle, @MindaugasRam, @carlittoer in the 2.2.3 version you can specify the delays in config.json. Please try tinkering with it and understand if each of you can find a suitable config.

@Krillle
Copy link
Contributor

Krillle commented Apr 13, 2019

@ilcato This is great. Thank you!

@Krillle
Copy link
Contributor

Krillle commented Apr 13, 2019

Can you please give a short explanation what these two values are specifying exactly?

@Krillle
Copy link
Contributor

Krillle commented Apr 13, 2019

I change both values to "7", but no change.

"LockCurrentStateDelay": "7",
"LockTargetStateDelay": "7"

Response from Siri is given after the lock has stopped operating now. Nevertheless the is confirming the locking as successful, but still claims tat opening would not be possible. So no change.

What's weird: Home App is now sending an additional status Notification before the lock starts operating.

@ilcato
Copy link
Owner

ilcato commented Apr 14, 2019

@Krillle these values delay the time at which a response to HomeKit is given allowing the correct status change in Fibaro Home Center. When the seconds specified are elapsed a query to Fibaro Home Center is executed and the response to HomeKit is returned. Please check when the status of the lock change in Fibaro Home Center starting from the command asked in HomeKit.
@MindaugasRam, seems to me that 2 second is right for you ? Correct?
@carlittoer, what's your delay?

@Krillle
Copy link
Contributor

Krillle commented Apr 14, 2019

@ilcato
With delay of 2 seconds I get a positive response when closing the lock and also when opening the lock wich simply unlocks (without additionally holding back the bolt).

But for the one which is holding back the bolt I get a negative reply when opening, even with a delay of 10 seconds. Homecenter is showing the status already as open after 4 seconds, while the bolt is still held back. So this doesn't seem to be the reason while opening lock does not give a positive response.

But in the end I can live with that. :-)

@ilcato
Copy link
Owner

ilcato commented Apr 19, 2019

Too much cases for me to understand without testing a real physical device.

@carlittoer
Copy link

Tested this with both values at 8 seconds. It's working properly.

@carlittoer
Copy link

Hi again all !

Since the last fix (delay of 8 secs), I've been noticing a slower response from the home app to show the device statuses. After some tests, it appears that the home app is waiting the same 8 secs to show the devices statuses (stuck on updating...).

Anything can be done for the lock device only ? Remember, the issue was Siri's incorrect response when locking / unlocking the lock, not the actual home app switch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants