Skip to content

Conversation

nkljajic
Copy link
Collaborator

OnOff cluster commands do not work for multilevel switch.
Rule
r'zbON_OFF = if(simulate_on_off) d'zbON_OFF undefined
defined in ColorControl_to_ColorSwitch.uam
will result in r'zbON_OFF being triggered on d'zbON_OFF change and effectively short-circuit and override rule
d'zwSTATE.zwON_OFF = d'zbON_OFF_CLUSTER_ON_OFF
defined in Level.uam, making former rule ignored.

@ghost
Copy link

ghost commented Sep 21, 2022

Thanks for your suggestion.

We refactored quite heavily the ColorControl uam file, I think this issue should be gone in the 1.2.1.

@nkljajic
Copy link
Collaborator Author

nkljajic commented Sep 22, 2022

It is still broken in 1.2.1
Color switch rule
r'zbON_OFF = if(simulate_on_off) (d'zbON_OFF) undefined

conflicts with (will prevent activating) Multilevel rule

d'zwSTATE.zwON_OFF =
  if (zwave_color_switch_exists) undefined d'zbON_OFF_CLUSTER_ON_OFF

@ghost
Copy link

ghost commented Sep 23, 2022

I think we will change the logic to use only the Level map to determine if on_off is to be simulated.
If zcl_level is present but no OnOff, then simulate it in the Level map. Then color switch does not have to worry about simulating on_off, but instead simulate Level if needed (which in turn will simulate OnOff).

The mapper has a few built-in behavior that have been making the Color maps quite challenging, in particular that it always automatically clear desired values when it sets a reported value.

Also we are wondering if is the best thing to have the mapper reacts to its own updates and go into a chain reaction of changes all the time.

We are considering to make 2 new settings:

  • Mapper reacts to its own updates (default true), but could be configured to false
  • Mapper configuration when setting a reported value:
    1. Clear the desired (default)
    2. Align the desired value
    3. Do nothing

Perhaps we could use the scope value to indicate if chain reactions should happen, then we can have several scopes in a map to control this.

What do you think?

@nkljajic
Copy link
Collaborator Author

Yes, Level should simulate OnOff when Binary switch is not available and Color should simulate Level, when Level is not available.
Problem we encountered is when both Level and Color are available, in that case Color should not handle OnOff (Off would be setting Level to 0, and do not change color components values).

@rzr
Copy link
Collaborator

rzr commented Mar 3, 2023

Is this issue still present in current release ?

@nkljajic
Copy link
Collaborator Author

nkljajic commented Mar 21, 2023

The issue is still present in 1.3.0
Example Aeotec Smart Switch 6

@nkljajic nkljajic closed this Mar 21, 2023
@nkljajic nkljajic deleted the fix-switch-multilevel-OnOff branch March 27, 2023 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants