-
-
Notifications
You must be signed in to change notification settings - Fork 910
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
Door Condition per 1.6 specs, adds DoorSense support #2196
base: master
Are you sure you want to change the base?
Changes from 3 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<Product Revision="2" xmlns="https://github.com/OpenZWave/open-zwave"> | ||
<Product Revision="3" xmlns="https://github.com/OpenZWave/open-zwave"> | ||
<MetaData> | ||
<MetaDataItem name="OzwInfoPage">http://www.openzwave.com/device-database/033F:0001:0001</MetaDataItem> | ||
<MetaDataItem name="ProductPic">images/august/asl-03.png</MetaDataItem> | ||
|
@@ -33,8 +33,21 @@ time.</MetaDataItem> | |
<MetaDataItem id="0001" name="FrequencyName" type="0001">U.S. / Canada / Mexico</MetaDataItem> | ||
<ChangeLog> | ||
<Entry author="Justin Hammond - [email protected]" date="02 Jun 2019" revision="2">Initial Metadata Import from Z-Wave Alliance Database - https://products.z-wavealliance.org/products/2624/xml</Entry> | ||
<Entry author="Quinn Hosler - https://github.com/quinnhosler" date="26 April 2020" revision="3">DoorSense(TM) support</Entry> | ||
</ChangeLog> | ||
</MetaData> | ||
<!-- Configuration Parameters --> | ||
<CommandClass id="98"> | ||
<Value genre="config" type="list" index="7" instance="1" label="DoorSense" min="0" max="3" size="1" value="2"> | ||
<Help> | ||
State of Door and Bolt | ||
</Help> | ||
<Item label="Locked/Open" value="0" /> | ||
<Item label="Locked/Closed" value="1" /> | ||
<Item label="Unlocked/Open" value="2" /> | ||
<Item label="Unlocked/Closed" value="3" /> | ||
</Value> | ||
</CommandClass> | ||
<!-- Association Groups --> | ||
<CommandClass id="133"> | ||
<Associations num_groups="2"> | ||
|
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,18 @@ namespace OpenZWave | |
DoorLockState_Secured = 0xFF | ||
}; | ||
|
||
enum DoorLockCondition | ||
{ | ||
DoorLockCondition_Unlatched_Locked_Open = 0x00, | ||
DoorLockCondition_Unlatched_Locked_Closed = 0x01, | ||
DoorLockCondition_Unlatched_Unlocked_Open = 0x02, | ||
DoorLockCondition_Unlatched_Unlocked_Closed = 0x03, | ||
DoorLockCondition_Latched_Locked_Open = 0x04, | ||
DoorLockCondition_Latched_Locked_Closed = 0x05, | ||
DoorLockCondition_Latched_Unlocked_Open = 0x06, | ||
DoorLockCondition_Latched_Unlocked_Closed = 0x07, | ||
}; | ||
|
||
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. Why is this required? |
||
static char const* c_LockStateNames[] = | ||
{ "Unsecure", "Unsecured with Timeout", "Inside Handle Unsecured", "Inside Handle Unsecured with Timeout", "Outside Handle Unsecured", "Outside Handle Unsecured with Timeout", "Secured", "Invalid" }; | ||
|
||
|
@@ -194,6 +206,11 @@ namespace OpenZWave | |
value->OnValueRefreshed(lockState); | ||
value->Release(); | ||
} | ||
if (Internal::VC::ValueList* value = static_cast<Internal::VC::ValueList*>(GetValue(_instance, ValueID_Index_DoorLock::Door_Condition))) | ||
{ | ||
value->OnValueRefreshed(_data[3]); | ||
value->Release(); | ||
} | ||
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. Few issues here:
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 was looking through the ZW docs and it appears DoorCondition is defined as far back as version 1 of the protocol and hasn't changed sense. I'm assuming this negates the need for any version checking? I added a simple validation of index 3. |
||
return true; | ||
} | ||
else if (DoorLockCmd_Configuration_Report == (DoorLockCmd) _data[0]) | ||
|
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.
This is not a Configuration CC id - Why is it required?
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.
You're right this isn't needed and I didn't understand why I was making that change. I removed the changes to this file.