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

momentary function (id 20) behaves like a roller blind switch #4057

Open
3 tasks done
xav31190 opened this issue Dec 10, 2024 · 12 comments
Open
3 tasks done

momentary function (id 20) behaves like a roller blind switch #4057

xav31190 opened this issue Dec 10, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@xav31190
Copy link

Checklist

  • I am not using Home Assistant. Or: a developer has told me to come here.
  • I have checked the troubleshooting section and my problem is not described there.
  • I have read the changelog and my problem is not mentioned there.

Deploy method

Docker

Z-Wave JS UI version

9.27.8

ZwaveJS version

14.3.7

Describe the bug

a double momentary switch is connected to a fibaro FGD212 - Dimmer 2. button 2 is used with a scene (normal press), to turn on another light. When I press the button, the light turns on then off. In the logs 2 actions are executed at the same time as if I pressed the button twice.
it seems to behave like a bistable while id 20 is configured in "momentary"
This behavior is observed on 3 fibaro modules that use scenes.
I restore my VM with version 9.25 of zwave JS UI, everything works normally, one press of the button turns on the lamp, another turns it off

To Reproduce

I restore my VM to the previous version, I no longer have the problem. I redo the update to 9.27.8, the problem returns

Expected behavior

when i press the button the light turns on but should not turn off. The scene action should run once but not 2

Additional context

No response

@xav31190 xav31190 added the bug Something isn't working label Dec 10, 2024
@robertsLando
Copy link
Member

Please make a driver log, loglevel debug and attach it here as a file (drag & drop into the text field).

cc @AlCalzone

@AlCalzone
Copy link
Member

AlCalzone commented Dec 11, 2024

I don't see how the physical behavior of the end device would depend on the version of Z-Wave JS, but let's see that log. I'm also not sure what you mean by "scene".

@xav31190
Copy link
Author

xav31190 commented Dec 11, 2024

zwave-js-ui: 9.25.0

zwave-js: 13.10.1

1/12/2024 21:47:31 - value updated Arg 0: └─commandClassName: Multilevel Switch └─commandClass: 38 └─property: currentValue └─endpoint: 2 └─newValue: 63 └─prevValue: 63 └─propertyName: currentValue 11/12/2024 21:47:31 - value updated Arg 0: └─commandClassName: Multilevel Switch └─commandClass: 38 └─property: currentValue └─endpoint: 2 └─newValue: 63 └─prevValue: 0 └─propertyName: currentValue 11/12/2024 21:47:31 - value notification Arg 0: └─_commandClassName: Scene Activation_ └─commandClass: 43 └─property: sceneId └─endpoint: 0 └─_value: 26_ └─propertyName: sceneId └─newValue: 26 └─stateless: true 11/12/2024 21:47:31 - value updated Arg 0: └─commandClassName: Scene Activation └─commandClass: 43 └─property: dimmingDuration └─endpoint: 0 └─newValue └──value: 0 └──unit: seconds └─prevValue └──value: 0 └──unit: seconds └─propertyName: dimmingDuration

I press switch 2, scene id=26, the light turns on. It's ok
I do the zwave-js update

zwave-js-ui: 9.28.0

zwave-js: 14.3.7

11/12/2024 22:01:11 - value updated Arg 0: └─commandClassName: Multilevel Switch └─commandClass: 38 └─property: currentValue └─endpoint: 2 └─newValue: 63 └─prevValue: 0 └─propertyName: currentValue 11/12/2024 22:01:10 - value updated Arg 0: └─commandClassName: Scene Activation └─commandClass: 43 └─property: dimmingDuration └─endpoint: 0 └─newValue └──value: 0 └──unit: seconds └─prevValue └──value: 0 └──unit: seconds └─propertyName: dimmingDuration └─nodeId: 37 11/12/2024 22:01:10 - value notification Arg 0: └─commandClassName: Scene Activation └─commandClass: 43 └─property: sceneId └─endpoint: 0 └─value: 26 └─propertyName: sceneId └─newValue: 26 └─stateless: true └─nodeId: 37 11/12/2024 21:59:37 - ready
I press switch 2, scene id=26, the light comes on then goes off. It's nok

I restore my VM to the old zwave version

zwave-js-ui: 9.25.0

zwave-js: 13.10.1

I press switch 2, scene id=26, the light turns on. It's ok

@xav31190
Copy link
Author

debug13_10_1.txt
debug14_3_7.txt
debug FGD212 Dimmer2

@AlCalzone
Copy link
Member

Those are not driver logs. Please check the link @robertsLando posted before.

@robertsLando
Copy link
Member

This --> driver log,

@xav31190
Copy link
Author

sorry
zwave-js-ui-store.zip

@AlCalzone
Copy link
Member

So I found this instance:

Device sends scene

2024-12-12T14:35:09.312Z CNTRLR   [Node 018] [!] [Scene Activation] sceneId: 26                     [Endpoint 0]
2024-12-12T14:35:09.312Z DRIVER « [Node 018] [REQ] [ApplicationCommand]
                                  └─[SecurityCCCommandEncapsulation]
                                    │ sequenced: false
                                    └─[SceneActivationCCSet]
                                        scene id:         26
                                        dimming duration: 0s

Something sends command to turn on device

2024-12-12T14:35:09.630Z DRIVER » [Node 042] [REQ] [SendData]
                                  │ transmit options: 0x25
                                  │ callback id:      65
                                  └─[MultiChannelCCCommandEncapsulation]
                                    │ source:      0
                                    │ destination: 1
                                    └─[BinarySwitchCCSet]
                                        target value: true

Roughly 1 second later, something sends command to turn the device off again:

2024-12-12T14:35:10.641Z DRIVER » [Node 042] [REQ] [SendData]
                                  │ transmit options: 0x25
                                  │ callback id:      67
                                  └─[MultiChannelCCCommandEncapsulation]
                                    │ source:      0
                                    │ destination: 1
                                    └─[BinarySwitchCCSet]
                                        target value: false

So this looks like it is related to the automation that turns the device on/off.

If I remember correctly, since the scene ID is effectively stateless (it is an event), Z-Wave JS UI sets the state for the scene when it is received, then resets it back to 0 (or null?) after one second. Correct @robertsLando? I'm not sure why that would change between 9.25.0 and 9.28.0?

So whatever you use to automate @xav31190 should be updated to ignore the reset after a second.

Or maybe we might consider removing the reset altogether and just preserve the last set state. Not sure if resetting adds much value.

@robertsLando
Copy link
Member

Z-Wave JS UI sets the state for the scene when it is received, then resets it back to 0 (or null?) after one second. Correct @robertsLando?

Yep I confirm.

if (valueId.stateless) {
if (this.statelessTimeouts[valueId.id]) {
clearTimeout(this.statelessTimeouts[valueId.id])
}
this.statelessTimeouts[valueId.id] = setTimeout(() => {
valueId.value = undefined
this.emitValueChanged(valueId, node, false)
}, 1000)
}

@xav31190
Copy link
Author

So whatever you use to automate @xav31190 should be updated to ignore the reset after a second.

Good evening,
I don't test the sceneid in my scenario, it tests the state =26

image

o turn on or off depending on the status of the lamp (zigbee module).I therefore do not test the return of state to 0 of the sceneid
And it still works in 9.25.0 since the initial post of my message. I have not done the update

@AlCalzone
Copy link
Member

Well, something is telling Z-Wave JS to turn off the device. I'm not sure what else changed that could cause the automation to suddenly treat a missing value differently. @robertsLando did anything change on the MQTT side of things?

@robertsLando
Copy link
Member

did anything change on the MQTT side of things?

Nope

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants