-
-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Discover Z-Wave values by index #7853
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 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 |
|---|---|---|
|
|
@@ -324,14 +324,41 @@ | |
| DISC_GENRE = "genre" | ||
| DISC_INDEX = "index" | ||
| DISC_INSTANCE = "instance" | ||
| DISC_LABEL = "label" | ||
| DISC_NODE_ID = "node_id" | ||
| DISC_OPTIONAL = "optional" | ||
| DISC_PRIMARY = "primary" | ||
| DISC_READONLY = "readonly" | ||
| DISC_SCHEMAS = "schemas" | ||
| DISC_SPECIFIC_DEVICE_CLASS = "specific_device_class" | ||
| DISC_TYPE = "type" | ||
| DISC_VALUES = "values" | ||
| DISC_WRITEONLY = "writeonly" | ||
|
|
||
| METER_RESET_INDEX = 33 | ||
| # https://github.com/OpenZWave/open-zwave/blob/67f180eb565f0054f517ff395c71ecd706f6a837/cpp/src/command_classes/Alarm.cpp#L49 # noqa # pylint:disable=line-too-long | ||
| # See also: | ||
| # https://github.com/OpenZWave/open-zwave/blob/67f180eb565f0054f517ff395c71ecd706f6a837/cpp/src/command_classes/Alarm.cpp#L275 # noqa # pylint:disable=line-too-long | ||
| # https://github.com/OpenZWave/open-zwave/blob/67f180eb565f0054f517ff395c71ecd706f6a837/cpp/src/command_classes/Alarm.cpp#L278 # noqa # pylint:disable=line-too-long | ||
| INDEX_ALARM_TYPE = 0 | ||
|
Contributor
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. Could you add a comment with a link to OZW source where those are defined?
Contributor
Author
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'll add links in a bit. I debated myself a bit on whether we should add links, since the links could become broken in the future, but I guess it's better than nothing at all. As for the indexes, they are actually explicitly defined for this purpose by open-zwave. I couldn't find an answer in the documentation, but there is an answer in the thread linked below, and they are defined explicitly as enums in the source: https://groups.google.com/d/msg/openzwave/tqxQr5XbG2Q/3rbUwORKB5UJ
Contributor
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. Thanks!
Contributor
Author
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. Yeah, I agree. If there is a way to directly import the enums let me know! I'll add links like that. I like the idea of linking to the current version, to prevent a broken link.
Contributor
Author
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. So, I added the links, but unfortunately they have to be pretty heavily wrapped. It's pretty ugly but I think it's probably better to have the reference than not. It's not like people are going to be working in |
||
| INDEX_ALARM_LEVEL = 1 | ||
| INDEX_ALARM_ACCESS_CONTROL = 9 | ||
|
|
||
| # https://github.com/OpenZWave/open-zwave/blob/67f180eb565f0054f517ff395c71ecd706f6a837/cpp/src/command_classes/DoorLock.cpp#L77 # noqa # pylint:disable=line-too-long | ||
| INDEX_DOOR_LOCK_LOCK = 0 | ||
|
|
||
| # https://github.com/OpenZWave/open-zwave/blob/67f180eb565f0054f517ff395c71ecd706f6a837/cpp/src/command_classes/Meter.cpp#L114 # noqa # pylint:disable=line-too-long | ||
| # See also: | ||
| # https://github.com/OpenZWave/open-zwave/blob/67f180eb565f0054f517ff395c71ecd706f6a837/cpp/src/command_classes/Meter.cpp#L279 # noqa # pylint:disable=line-too-long | ||
| INDEX_METER_POWER = 8 | ||
| INDEX_METER_RESET = 33 | ||
|
|
||
| # https://github.com/OpenZWave/open-zwave/blob/67f180eb565f0054f517ff395c71ecd706f6a837/cpp/src/command_classes/SensorMultilevel.cpp#L50 # noqa # pylint:disable=line-too-long | ||
| INDEX_SENSOR_MULTILEVEL_TEMPERATURE = 1 | ||
| INDEX_SENSOR_MULTILEVEL_POWER = 4 | ||
|
|
||
| # https://github.com/OpenZWave/open-zwave/blob/67f180eb565f0054f517ff395c71ecd706f6a837/cpp/src/command_classes/Color.cpp#L109 # noqa # pylint:disable=line-too-long | ||
| INDEX_SWITCH_COLOR_COLOR = 0 | ||
| INDEX_SWITCH_COLOR_CHANNELS = 2 | ||
|
|
||
| # https://github.com/OpenZWave/open-zwave/blob/67f180eb565f0054f517ff395c71ecd706f6a837/cpp/src/command_classes/SwitchMultilevel.cpp#L54 # noqa # pylint:disable=line-too-long | ||
| INDEX_SWITCH_MULTILEVEL_LEVEL = 0 | ||
| INDEX_SWITCH_MULTILEVEL_BRIGHT = 1 | ||
| INDEX_SWITCH_MULTILEVEL_DIM = 2 | ||
| INDEX_SWITCH_MULTILEVEL_DURATION = 5 | ||
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.
Can you move the pylint and flake8 directives to the line above? That way it's easy for people to copy paste the line.
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.
Looks like that also made pylint respect
#noqa. All around win! 🎉