Skip to content
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

[config] Fix Leviton Vizia RF+ device family. #2290

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

j9brown
Copy link

@j9brown j9brown commented Jul 3, 2020

This config merits discussion on how to handle SWITCH_MULTILEVEL_START_LEVEL_CHANGE and SWITCH_MULTILEVEL_STOP_LEVEL_CHANGE commands sent by the controller to the associated actuator.

More information here: https://groups.google.com/forum/#!topic/openzwave/PbCrQyQODTo

I've tentatively added COMMAND_CLASS_SWITCH_MULTILEVEL together with State/AfterMark compatibility directives to VRCS4 and VRCZ4 to indicate that the device sends these commands (but doesn't handle them itself). These declarations fail "make xmltest" validation but they do work at runtime. Moreover, OpenZWave doesn't know how to handle the incoming level changes (it just logs them).

I think we should break this PR into two parts. (I'm including everything here for context.)

  1. Submit the overall fixes to the Vizia RF+ family of devices, omitting the multilevel switch compatibility directives.
  2. Figure out how we should handle those messages properly and amend the configs as required once that's done.

Thoughts?

Added support for VRCS2, VRCS4, VRCZ4, and VRR15 devices.

Added detailed information about how to set indicator lights and
configure scenes.

Fixed configuration entry for RZP03 which was erroneously
associated with the VRCS2 configuration file.

Cleaned up product names and associated metadata.
Copy link
Member

@Fishwaldo Fishwaldo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See below on comments about supporting AfterMark.

<!-- Each button toggles an individual scene on or off. Multiple scenes can be active at once.
By default the device will associate groups 1 and 2 with the local loads.
Do not auto associate the controller with group 1. -->
<Group index="1" max_associations="232" label="Button 1" auto="false"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you do not auto associate, how does the controller get updates about state change? Maybe all Groups should be auto=true (group 1 is implicit)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scene controller and the loads are represented as different zwave nodes using multichannel encapsulation.

The scene controller has factory default associations with the local loads (relays) on the device. There's no need to associate the primary controller unless you want the primary controller to respond to scene changes itself. In my case, I just want the VRCS2 loads to be locally controlled (so they're very responsive).

The loads appear as separate binary switches. They seem to get auto-associated (somehow?) with the primary controller so they do report their state changes as expected.

Aside: My old Vera automation system had a nasty habit of purging factory default associations when setting up a new device. In the case of the VRCS2, it would remove the associations for the local loads and effectively break the switch behavior unless manually reconfigured. It took ages to figure out what was happening there.

<!-- Indicator Lights -->
<!-- Use these messages to override the indicator lights.

91 00 1D 0D 01 00 00 : Reset LEDs to locally controlled operation (default behavior).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming I'm reading this correctly - its using the Manufactuter_Proprietary CC for Leds?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct. Unfortunately it doesn't support the "Indicator" command class.

<!-- Each button toggles an individual scene on or off. Only one scene can be active at once.
If the device has a switch, then by default it will associate group 1 with the local load.
Do not auto associate the controller with group 1. -->
<Group index="1" max_associations="232" label="Button 1" auto="false"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, the VRCS4 presents its load as a separate device and auto-associated it to button 1 as the factory default. That said, 3 of the 4 buttons are useless out of the box unless additional associations are made.

So we could argue that auto-association with the primary controller is more essential for this one. I've made those associations manually for my case along with other configurations documented in this file.

Unfortunately, openzwave currently doesn't know how to configure the scenes such that it can distinguish between each button and it doesn't handle incoming scene actuator commands either. With that in mind, I don't think auto-association is a good idea just yet but I will defer to your judgement on the matter.

corresponding scenes to be active.
-->
<CommandClass id="38">
<State>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to port AfterMark to Compatibility rather than state.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good. How about I remove this section from this patch for now and reintroduce it once the necessary command classes are implemented?

Alternatively, what would you think of encoding the "after mark" bit as an attribute of the CommandClass element itself because it fundamentally changes how the command class is interpreted?

<!-- Each button toggles an individual zone on or off. Multiple zones can be active at once.
If the device has a switch, then by default it will associate group 1 with the local load.
Do not auto associate the controller with group 1. -->
<Group index="1" max_associations="232" label="Button 1" auto="false"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as others.

- Groups 1-4 are triggered when buttons 1-4 are pressed when their LED is not lit.
- Groups 5-8 are triggered when buttons 1-4 are pressed when their LED is already lit.

To configure the scenes, send SCENE_CONTROLLER_CONF_SET to associate scenes with
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't support this CC.... so your saying a user should use the SendRaw to get this working?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. At least for now.

<Entry author="Jeff Brown - jeff.brown@gmail.com" date="29 June 2020" revision="1">Initial creation</Entry>
</ChangeLog>
</MetaData>
</Product>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No Config/Association Groups?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The configs are undocumented. I haven't needed to poke them, assuming there are any.

The association groups are automatically detected just fine. There's only one group and it reports the state of the controlled load.

@Fishwaldo
Copy link
Member

Regarding Aftermark - Only a few CommandClasses support it. You would need to update the COMMAND_CLASS_SWITCH_MULTILEVEL to also property support Aftermark:

  1. Only expose ValueID's that are appropriate for reporting in a Aftermark CC.
  2. Make sure they are exposed as Read Only
  3. override CommandClass::HandleIncommingMsg to decode SET messages and update appropriate ValueID's

Does this device advertise this as a Controlling CommandClass (rather than Controlled). If it does, you don't need to add it to the config file as a Aftermark Class.

You can refer to the Basic CC to get some idea - Although that is also handling a lot of other corner cases as well.

@j9brown
Copy link
Author

j9brown commented Jul 10, 2020

Regarding Aftermark - Only a few CommandClasses support it. You would need to update the COMMAND_CLASS_SWITCH_MULTILEVEL to also property support Aftermark:

Yeah, that makes sense. I'll take a look at that project in a bit. In the meantime, I managed to work around the problem by handling these unhandled messages outside of openzwave. It works surprisingly well. ;)

Does this device advertise this as a Controlling CommandClass (rather than Controlled). If it does, you don't need to add it to the config file as a Aftermark Class.

Unfortunately it doesn't. I checked.

You can refer to the Basic CC to get some idea - Although that is also handling a lot of other corner cases as well.

Thanks!

@j9brown
Copy link
Author

j9brown commented Sep 11, 2020

Sorry I've been slow to take care of this because my local workarounds are working well enough. ;) I'll get on it in a bit. After some reflection, I think I may actually implement some of the missing command classes. We'll see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants