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

Fix for activity led activation problem for Wiren Board #7881

Conversation

BurchuMikhail
Copy link
Contributor

Update wirenboard.ts

Fix missing data issue for "Occupancy" parameter
Fix missing data issue for "Occupancy" parameter
Fix missing data issue for "Occupancy" parameter
};

const sprutModernExtend = {
sprutActivityIndicator: (args?: Partial<modernExtend.BinaryArgs>) =>
Copy link
Owner

Choose a reason for hiding this comment

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

Can you debug what goes wrong when using the modern extend? It's the preferred way to do this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When using a modern extend up to version 1.39.0 (inclusive) everything works correctly. But in version 1.39.1, modernExtend.js added the "autoDetectInputEndpoint" function, which leads to an unexpected result:
zh:controller:endpoint: ZCL command 0x7cc6b6fffe5f655b/1 genBinaryOutput.write({"presentValue":1}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false})
and I expect:
zh:controller:endpoint: ZCL command 0x7cc6b6fffe5f655b/5 genBinaryOutput.write({"presentValue":1}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false})
As far as I understand, the command is now sent to endpoint 1 instead of 5. The sensor freezes.
Using the "entity" function as in previous versions fixes this.

Copy link
Owner

Choose a reason for hiding this comment

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

Could you provide the data/database.db entry of this device?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

database in case of clean installation of z2m 1.39.1:
database.db.zip

database in the case of proposed fix:
database.db.zip

Copy link
Owner

Choose a reason for hiding this comment

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

It puzzles me why the code you propose in this PR sends it to ep 5 and not to 1, could you provide the debug log when setting the activity_led with your fix included?

See this on how to enable debug logging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Owner

Choose a reason for hiding this comment

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

I found the issue, attempted to fix it in #7896

Changes will be available in the dev branch in a few hours from now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checked it out, problem's gone. Thank you.

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.

2 participants