Replies: 1 comment 2 replies
-
Your understanding of the cluster is correct indeed! The cluster weight is only for leader decisions, so it'll be used to decide which instance posts the updates for Bluetooth integrations for example (= "source of truth"). In general it makes sense to make the well-connected instances your preferred leaders, as it reduces the chances of intermittent downtimes or similar issues, but it isn't a requirement. There is no way of changing the tie behavior at the moment - I think currently it just stays on what it was before in these cases. I think #606 could help for your use case as well though, as that would let you tune the measured distances a bit. |
Beta Was this translation helpful? Give feedback.
-
I'm a little confused on the definition of the cluster leader.
I have multiple RAs running on Pi Zero Ws throughout my house. The way I read it, I think that I want to consider my "house" as a cluster and designate my one Pi3 B as the "cluster leader"?
_Preferred leaders
In some situations you may want some instances of room-assistant to be the leading ones more than others. This could for example be the case if you have instances that are connected to the network better than others. To accomplish this you can configure custom weights that are then used during the leader election process. The weight option should ideally be configured on every instance of room-assistant that you run to achieve consistent behavior. The preferred leader instances need to have the largest weight numbers._
Since the Pi 3b is a bit beefier, I would think that I'd want it to be the cluster leader since it'll be connected better than the others. Does this mean that the Pi 3 will be used to coordinate updates between the other instances? Is there a way to add a "weight" to prefer once instance over another if they both have an equal distance over BLE? For instance, my office is above my kitchen, and my office Pi Zero is back in a corner. So both instances are reading out 1.6 as the distance, even though I'm in my office. When I'm in my kitchen, its centered in my island, and I get much close readings. So is there a way to designate which instance would win in a tie?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions