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

Support binding of server clusters towards clients #7127

Merged
merged 1 commit into from
Apr 19, 2021

Conversation

pklokke
Copy link
Contributor

@pklokke pklokke commented Apr 19, 2021

This allows binding of devices such as sleepy temperature sensors to heating actuators

@pklokke
Copy link
Contributor Author

pklokke commented Apr 19, 2021

I have some old Schneider Electric Wiser equipment I am currently integrating and testing, one of the pre-reqs is the ability to bind the temperature sensors to the heating actuators, and the current implementation is more focused on lighting style, client to server binds.

This allows binding of devices such as sleepy temperature sensors to heating actuators

if (source.endpoint.supportsOutputCluster(cluster) && targetValid) {
if (!anyClusterValid) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, binding the server clusters will only work when there are not client clusters to bind? What if you want to bind the server cluster and the device also has client clusters to bind?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the "anyClusterValid" target device types don't have real clusters to check, so that check would fail, and is redundant because any cluster is valid on the target.

The check inside the anyClusterValid covers both C->S, and S->C.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps to be more clear, the matchingCluster checks ensure you aren't trying to bind a server to a server, or a client to a client. It doesn't care about direction, but just that there is a complimentary pair of the cluster of interest.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, misread this part, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries! Happy to get my first commit in :-)

@Koenkk Koenkk merged commit 95dd6c4 into Koenkk:dev Apr 19, 2021
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.

None yet

2 participants