-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add optimistic option. #4542 #4572
Conversation
Hello @Koenkk. The base branch of this pull request has been updated to the |
@@ -238,7 +239,7 @@ class EntityPublish extends Extension { | |||
this.publishEntityState(resolvedEntity.settings.ID, msg); | |||
} | |||
|
|||
if (result && result.membersState) { | |||
if (result && result.membersState && optimistic) { |
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.
Is this also true for say a group of blinds? I can't figure it out by reading more of the code around here if it is. I think so?
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.
It depends if you setup reporting, if not you wont' get state updates.
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.
Nice, I'll be setting this on my groups then.
That won't fix #3461 but it will remove one of the updates.
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.
It is indeed working for groups, but the effect is weird:
with 'optimistic' set to false:
- send /set to group
- reporting updates bulb1 and bulb2
- no update on the group at all
without 'optimistic' or set to true:
- send /set to group
- update of group
- reportining updates bubl1
- update of group
- reporting updates bulb2
- update of group
Is this the expected behavior?
I would have expected the following with optimistic set to false:
- send /set to group
- reporting for bulb1
- update of group
- reporting of bubl2
- update of group
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.
Not expected behaviour, I expect what you mentioned last, can you provide the debug logging of this?
My group config:
This is when controlling the group via a remote:
This is when controlling via mqtt
No update of the group either way. |
This seemed to conflict with the |
Something still seems of after that change
That was with a remote
And using mqtt... Neither seem to be correct? The one only coming in via reporting still don't update the group topic, while they should (there is nothing optimistic or oportunistic about it) Using mqtt... now gets an update... but the state is wrong? it is ON when it should be off and off when it should be on! |
When optimistic is used for groups, an attribute report won't update the group state (it's documented here: https://www.zigbee2mqtt.io/information/groups.html#state-changes). This was implemented because of #764 (comment) (I agree |
So there is no way to skip the update on set and only take reporting updates for groups? |
Currently not indeed and the existing |
When this is revisited we should also fix debounce for groups, there is an issue for that too. Do we have a list tracking these thing somewhere? |
We don't, but should do and tag this with 'breaking change'. About the debounce for groups, I don't think this is breaking, so this can be implemented in Zigbee2MQTT 1.x? |
Yes, a tag would be nice... can we then also have the stalebot leave those alone? I assume those will be long lived. #3461 is the debounce one, I had a brief looked but got super confused on how it works for devices. |
Done |
No description provided.