Closed chrisremie closed 2 years ago
hi @chrisremie,
the code is:
if (this.durationOffset && (this.targetPosition == 0 || this.targetPosition == 100)) this.duration += this.durationOffset;
so durationOffset only extend duration when you want to fully close/open blinds. I'll modify description so it's more obvious. Does this solve your problem?
Hi,
Thanks for your fast reply.
This is my config: { "accessory": "Blinds", "name": "Salone", "pinUp": 4, "pinDown": 5, "durationUp": 20000, "durationDown": 20000, "durationOffset": 4000, "activeLow": true },
And this is from the log: [17/11/2021, 10:41:29] [Salone] Setting target position to 100 [17/11/2021, 10:41:29] [Salone] Moving up. Duration: 20000 ms. [17/11/2021, 10:41:49] [Salone] Successfully moved to target position: 100
[17/11/2021, 10:42:34] [Salone] Setting target position to 0 [17/11/2021, 10:42:34] [Salone] Moving down. Duration: 20000 ms. [17/11/2021, 10:42:54] [Salone] Successfully moved to target position: 0
So somehow it does not add the Offset
Chris.
On 17 Nov 2021, at 09:04, Radosław Sporny @.***> wrote:
hi @chrisremie https://github.com/chrisremie, the code is: if (this.durationOffset && (this.targetPosition == 0 || this.targetPosition == 100)) this.duration += this.durationOffset; so durationOffset only extend duration when you want to fully close/open blinds. I'll modify description so it's more obvious. Does this solve your problem?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rsporny/homebridge-gpio-blinds/issues/24#issuecomment-971330034, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNKNEAVWS3JZGBP4JNKHSDUMNOZRANCNFSM5IGFDGMA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
I see. The logs are not taking into account durationOffset, I'll add new log entry for that. However, the code should work as expected, could you confirm by checking for how long relay switch is on?
It is not adding the offset. I added a really big offset, and it is still not closing completely
On 17 Nov 2021, at 11:04, Radosław Sporny @.***> wrote:
I see. The logs are not taking into account durationOffset, I'll add new log entry for that. However, the code should work as expected, could you confirm by checking for how long relay switch is on?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rsporny/homebridge-gpio-blinds/issues/24#issuecomment-971422726, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNKNEDDTF2HI2YZVYHT5SDUMN4Z3ANCNFSM5IGFDGMA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Thanks. Could you please confirm the version you are using?
V1.1.3
On 17 Nov 2021, at 12:39, Radosław Sporny @.***> wrote:
Thanks. Could you please confirm the version you are using?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rsporny/homebridge-gpio-blinds/issues/24#issuecomment-971494404, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNKNEDSTVUBV7MVEWHDDIDUMOIA7ANCNFSM5IGFDGMA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Thanks, I'll investigate.
index.js line 162 if (this.durationOffset && (this.targetPosition == 0 || this.targetPosition == 100)) this.duration += this.durationOffset;
this.duration should be duration.
@chrisremie fixed in v1.1.4
I have set durationOffset, but in the log file the duration is just the value from durationUp/Down.