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

Add attribute Metering (0x0702) (TZ-960) #370

Open
DEFAYArnaud opened this issue Jun 20, 2024 · 9 comments
Open

Add attribute Metering (0x0702) (TZ-960) #370

DEFAYArnaud opened this issue Jun 20, 2024 · 9 comments
Labels

Comments

@DEFAYArnaud
Copy link

Question

Hello,

I wanted to know how to add the attribute "ESP_ZB_ZCL_ATTR_METERING_MULTIPLIER_ID" & "ESP_ZB_ZCL_ATTR_METERING_DIVISOR_ID" in a metering cluster?

Thank you in advance for your reply.

Additional context.

No response

@github-actions github-actions bot changed the title Add attribute Metering (0x0702) Add attribute Metering (0x0702) (TZ-960) Jun 20, 2024
@xieqinan
Copy link
Contributor

@DEFAYArnaud ,

You can call esp_zb_cluster_add_attr() to add the attributes to the specific cluster.

@DEFAYArnaud
Copy link
Author

DEFAYArnaud commented Jun 21, 2024

Thank you for your reply. Now I have this error with Zigbee2mqtt. How can I solve it?

seMetering.configReport([{"minimumReportInterval":10,"maximumReportInterval":65000,"reportableChange":[0,100],"attribute":"currentSummDelivered"}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Status 'UNREPORTABLE_ATTRIBUTE') at Endpoint.checkStatus (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:316:28) at Endpoint.zclCommand (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:771:26) at Endpoint.configureReporting (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:557:9) at setupAttributes (/app/node_modules/zigbee-herdsman-converters/src/lib/modernExtend.ts:76:13) at result.configure (/app/node_modules/zigbee-herdsman-converters/src/lib/modernExtend.ts:1488:29) at Object.configure (/app/node_modules/zigbee-herdsman-converters/src/index.ts:173:21) at Configure.configure (/app/lib/extension/configure.ts:121:13) at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:174:17))

@DEFAYArnaud
Copy link
Author

I've just tried executing esp_zb_zcl_report_attr_cmd_req for the attribute ESP_ZB_ZCL_ATTR_METERING_CURRENT_SUMMATION_DELIVERED_ID but I get this error. :

ESP_ZIGBEE_COMMAND: esp_zb_zcl_report_attr_cmd_req(281): This attribute: 0x0 is not reportable!

How else can I update this attribute?

@xieqinan
Copy link
Contributor

@DEFAYArnaud ,

According to the specification, the ESP_ZB_ZCL_ATTR_METERING_CURRENT_SUMMATION_DELIVERED_ID is not a reportable attribute. As a result, the log message ESP_ZIGBEE_COMMAND: esp_zb_zcl_report_attr_cmd_req(281): This attribute: 0x0 is not reportable! is displayed.

@DEFAYArnaud
Copy link
Author

Ok thanks. So how do I update the data for "CURRENT SUMMATION" ?

@xieqinan
Copy link
Contributor

@DEFAYArnaud ,

It would be helpful to provide the application context first. According to the logs below, Z2M considers the CURRENT SUMMATION attribute to be UNREPORTABLE_ATTRIBUTE. Why do you expect it to be reported?

seMetering.configReport([{"minimumReportInterval":10,"maximumReportInterval":65000,"reportableChange":[0,100],"attribute":"currentSummDelivered"}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"> reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Status 'UNREPORTABLE_ATTRIBUTE')

@DEFAYArnaud
Copy link
Author

Thanks for your help. This is to update the energy value. See photo.

Capture d’écran 2024-06-24 à 10 31 17

@xieqinan
Copy link
Contributor

@DEFAYArnaud

Understood. Since the CURRENT SUMMATION attribute is not reportable, Z2M should read the attribute value from the meter cluster server or send related commands to retrieve it automatically. Does Z2M perform similar operations?

@DEFAYArnaud
Copy link
Author

DEFAYArnaud commented Jun 24, 2024

Thanks again for your help

When I add esp32-C6 to Z2M, the same error appears 3 times:

Failed to configure '0x404ccafffe50cb98', attempt 1 (Error: ZCL command 0x404ccafffe50cb98/1 seMetering.configReport([{"minimumReportInterval":10,"maximumReportInterval":65000,"reportableChange":[0,100],"attribute":"currentSummDelivered"}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Status 'UNREPORTABLE_ATTRIBUTE') at Endpoint.checkStatus (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:316:28) at Endpoint.zclCommand (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:771:26) at Endpoint.configureReporting (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:557:9) at setupAttributes (/app/node_modules/zigbee-herdsman-converters/src/lib/modernExtend.ts:76:13) at result.configure (/app/node_modules/zigbee-herdsman-converters/src/lib/modernExtend.ts:1488:29) at Object.configure (/app/node_modules/zigbee-herdsman-converters/src/index.ts:173:21) at Configure.configure (/app/lib/extension/configure.ts:121:13) at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:174:17))

Then at the beginning I have this:

Capture d’écran 2024-06-24 à 11 01 41

And then when I press the button, the value is displayed:

Capture d’écran 2024-06-24 à 11 06 48

Z2M can display the value when I press the button to refresh, but it can't do it automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants