-
Notifications
You must be signed in to change notification settings - Fork 88.7k
Z-Wave Basic Window Shade fix + Calibration #44034
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
dc2c16e
8ccd16a
18fe124
089aef1
3b2f208
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,11 +58,22 @@ metadata { | |
defaultValue: false, | ||
displayDuringSetup: false | ||
) | ||
|
||
//This setting for calibrationTime is specific to Aeotec Nano Shutter and operates under def updated() - Line 159 | ||
input("calibrationTime", "number", | ||
title: "Open/Close timing", | ||
description: "Set the motor's open/close time", | ||
defaultValue: false, | ||
displayDuringSetup: false, | ||
range: "5..255", | ||
default: 10 | ||
) | ||
} | ||
} | ||
} | ||
|
||
def parse(String description) { | ||
log.debug "parse() - description: $description" | ||
def result = [] | ||
if (description.startsWith("Err")) { | ||
result = createEvent(descriptionText:description, isStateChange:true) | ||
|
@@ -101,11 +112,14 @@ def zwaveEvent(physicalgraph.zwave.Command cmd) { | |
} | ||
|
||
def setButton(button) { | ||
log.debug "button: $button" | ||
switch(button) { | ||
case "open": | ||
case "statelessCurtainPowerButton_open_button": | ||
open() | ||
break | ||
case "close": | ||
case "statelessCurtainPowerButton_close_button": | ||
close() | ||
break | ||
default: | ||
|
@@ -147,13 +161,20 @@ def installed() { | |
def updated() { | ||
sendHubCommand(pause()) | ||
state.reverseDirection = reverseDirection ? reverseDirection : false | ||
|
||
if (calibrationTime >= 5 && calibrationTime <= 255) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. did you mean to be checking There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that we should just use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @greens @cbaumler - the "int time = calibrationTime" was primarily with me messing around and practicing a little bit while figuring out how preferences are used as numbers/integrrs, i ended up leaving it in there and forgot to remove it when i realized calibrationTime was pretty much a local variable for the device handler. I'll have that removed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
response([ | ||
secure(zwave.configurationV1.configurationSet(parameterNumber: 35, size: 1, scaledConfigurationValue: calibrationTime)), | ||
]) | ||
} | ||
|
||
} | ||
|
||
def configure() { | ||
log.debug "Configure..." | ||
response([ | ||
secure(zwave.configurationV1.configurationSet(parameterNumber: 80, size: 1, scaledConfigurationValue: 1)), | ||
secure(zwave.configurationV1.configurationSet(parameterNumber: 85, size: 1, scaledConfigurationValue: 1)) | ||
secure(zwave.configurationV1.configurationSet(parameterNumber: 80, size: 1, scaledConfigurationValue: 1)), | ||
secure(zwave.configurationV1.configurationSet(parameterNumber: 85, size: 1, scaledConfigurationValue: 1)) | ||
]) | ||
} | ||
|
||
|
@@ -171,4 +192,4 @@ private getOpenValue() { | |
|
||
private getCloseValue() { | ||
!state.reverseDirection ? 0xFF : 0x00 | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.