-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
MQTT: currentValue of slow switch_multilevel jumps to target value before reporting real values #3793
Comments
That's the intended behavior. See driver option AFAIK there's no simple way to disable that, you have to use ZUI's hidden settings. |
@AlCalzone wondering if it could make sense to add a dedicated ui option for this? Is it usual this to create problems? |
I see. Thanks for clarification. So the driver is always sending optimistic value updates unless you set this option, which disables it for all devices, I assume. For most devices, optimistic value updates are probably a good idea, e.g. with any switch_binary and fast moving switch_multilevel like lights. However with slowly moving devices like window blinds, garage doors and gates, this can cause strange effects like described above. Having a UI option for this would be nice indeed. However I think it'd be most useful on a per-device basis. Optimistic value updates should be the default of course, but being able to disable it for a device makes a lot sense imho (even better if it would be disabled automatically for devices known to move slowly, like rollershutters) |
About this I need to ask to @AlCalzone as I don't think that's possible yet |
@zargony if you agree I would close this one and let you follow updates in linked issue? Or would you like to make the flag available on UI anyway? |
I'm fine with tracking the upstream issue. Thanks again for the help! Depending on how zwave-js/node-zwave-js#3892 turns out, it would probable be nice to have a flag available in UI anyway. Either to switch it on/off if the driver keeps it a manual setting, or to override the automatic choice of the driver. But we can look into this in a separate issue (feature request) once such a setting is available if you prefer. |
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label |
This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit. |
Checklist
Deploy method
Docker
Z-Wave JS UI version
9.14.4.40080a1
ZwaveJS version
12.12.1
Describe the bug
When setting
targetValue
of a device withswitch_multilevel
command class,currentValue
is set to target value even before the device reports an updated real current value. I observe this behavior with (relatively slow) window blinds (Fibaro Roller Shutter 2 FGRM-222). I assume that zwave-js-ui might setcurrentValue
totargetValue
to provide faster responses. While this works e.g. with lights, it gives strange effects with slowly moving devices like window blinds.E.g. if
currentValue
is99
and settingtargetValue
to70
, you can observecurrentValue
:currentValue
:99
targetValue
to70
currentValue
:70
currentValue
:84
currentValue
:70
This causes strange effects when software tries to derive the direction of movement by looking at
currentValue
, e.g. when using MQTT values to feed Node-RED's HomeKit integration with a window blind position, it seescurrentValue
changing from 70 to 84 and shows an opening animation even though the blinds are closing.zwave-js-ui log (unrelated lines about http requests, lastActive and power level reporting stripped):
Actually, this log looks like the device is reporting 99=>70, so I'm unsure about the root cause. I initially suspected zwave-js-ui to do this (because why should a device report an estimated value while it knows the real current value).
To Reproduce
currentValue
of a slowly moving device withswitch_multilevel
command classtargetValue
via MQTT or web uicurrentValue
jump to the new target value immediately, then jumping back to the real current value while the device keeps reporting the current position until the target position is reached.Expected behavior
I'd expect the
currentValue
to report the current value only, not the expected target value.Additional context
I'm using Settings -> Gateway (probably unrelated to the issue, but explains the log):
The text was updated successfully, but these errors were encountered: