-
Notifications
You must be signed in to change notification settings - Fork 89.9k
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
[ICP-5930] Fix for Ecolink Door/Window Sensor battery report #3603
Changes from all commits
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 |
---|---|---|
|
@@ -180,8 +180,20 @@ def configure() { | |
sendEvent(name: "checkInterval", value: 2 * 60 * 60 + 1 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"]) | ||
|
||
log.debug "Configuring Reporting, IAS CIE, and Bindings." | ||
|
||
def cmds = refresh() + zigbee.iasZoneConfig(30, 60 * 5) + zigbee.batteryConfig() + zigbee.temperatureConfig(30, 60 * 30) | ||
if(getDataValue("manufacturer") == "Ecolink") { | ||
cmds += configureEcolink() | ||
} | ||
// temperature minReportTime 30 seconds, maxReportTime 5 min. Reporting interval if no activity | ||
// battery minReport 30 seconds, maxReportTime 6 hrs by default | ||
return refresh() + zigbee.iasZoneConfig(30, 60 * 5) + zigbee.batteryConfig() + zigbee.temperatureConfig(30, 60 * 30) // send refresh cmds as part of config | ||
return cmds | ||
} | ||
|
||
private configureEcolink() { | ||
sendEvent(name: "checkInterval", value: 60 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID]) | ||
|
||
def enrollCmds = zigbee.writeAttribute(0x0020, 0x0000, 0x23, 0x00001C20) + zigbee.command(0x0020, 0x03, "0200") + | ||
zigbee.writeAttribute(0x0020, 0x0003, 0x21, 0x0028) + zigbee.command(0x0020, 0x02, "B1040000") | ||
|
||
return zigbee.addBinding(0x0020) + refresh() + enrollCmds | ||
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. you'll be refreshing twice. Is that intended? 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 know it puts more stress on the network, but according to my previous adventures with Ecolink devices (especially Zigbee Firefighter, which would likely report 0 temperature when polled too early after pairing), I wanted to read those attributes once more before Poll Cluster configuration. Just in case. 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. Just wanted to make sure it was on purpose. Thanks. |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the shorter checkInterval?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due Ecolink's configuration device has 30 min check interval. Anyway, this is changed pretty quick, as soon as response about successful ZoneStatus reporting configuration comes in.