Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
12.13k stars 1.68k forks source link

bituotechnik-spm01-u01 not reporting right value #22429

Open Patricen1 opened 6 months ago

Patricen1 commented 6 months ago

What happened?

It looks like the following device https://www.zigbee2mqtt.io/devices/SPM01-U01.html#bituo%2520technik-spm01-u01 is not reporting the right apparent power, maybe a 10expX factor issue.

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

Include the device to the network, it reports apparent forward and reactive power divided by 1,000.

Zigbee2MQTT version

1.36.1 up to 1.39

Adapter firmware version

0x26720700

Adapter

ConBee2/RaspBee2, same after migrating to ZBDongle-E

Setup

Raspberry pi 3

Debug log

No response

Patricen1 commented 6 months ago

Screenshot_20240504-090130

On the above screenshot, voltage is 236.19V, current is 0.19A, apparent power should be 44.876VA instead of 0.047VA

jymannob commented 5 months ago

Same issue with Z2M 1.37.1-1

Koenkk commented 5 months ago

@script0803 could you maybe take a look at this?

sdalu commented 5 months ago

Slightly different issue for me, voltage and current are not correctly reported (x 100). And it also looks like energy is not updated, and power reactive is incorrect (stuck to 0)

Z2M version: 1.37.1 SPM01 firmware: 003.00.03

image

sdalu commented 5 months ago

I don't know if it is related, but I have the following errors reported in my logs:

[2024-05-29 18:01:43] error:    z2m: Failed to configure 'electivire', attempt 3 (Error: ZCL command 0xbc026efffea7f998/1 seMetering.
configReport([{"attribute":"currentSummDelivered","minimumReportInterval":5,"maximumReportInterval":3600,"reportableChange":[1,1]}], 
{"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"rese
rvedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Status 'FAILURE')
    at Endpoint.checkStatus (/home/home-automation/zigbee2mqtt/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:315:28)
    at Endpoint.zclCommand (/home/home-automation/zigbee2mqtt/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:770:26)
    at Endpoint.configureReporting (/home/home-automation/zigbee2mqtt/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:5
56:9)
    at Object.currentSummDelivered (/home/home-automation/zigbee2mqtt/node_modules/zigbee-herdsman-converters/src/lib/reporting.ts:13
1:5)
    at Object.configure (/home/home-automation/zigbee2mqtt/node_modules/zigbee-herdsman-converters/src/devices/bituo_technik.ts:21:13
)
    at Configure.configure (/home/home-automation/zigbee2mqtt/lib/extension/configure.ts:121:13)
    at EventEmitter.wrappedCallback (/home/home-automation/zigbee2mqtt/lib/eventBus.ts:174:17))
script0803 commented 5 months ago

In my test, the energy and produced energy seem to be reported normally? It's just that when it is initially connected, it will only report when the data changes, otherwise it will show null. You can try to reconfigure the device to refresh.

image
sdalu commented 5 months ago

@script0803, I'm always drawing at least 140W, so energy data should change quite enough

Performing a reconfigure (yellow button) lead to this error message:

error 2024-05-31 09:23:07Failed to configure 'electivire', attempt 5 (Error: ZCL command 0xbc026efffea7f998/1 seMetering.configReport([{"attribute":"currentSummDelivered","minimumReportInterval":5,"maximumReportInterval":3600,"reportableChange":[1,1]}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Status 'FAILURE') at Endpoint.checkStatus (/home/home-automation/zigbee2mqtt/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:315:28) at Endpoint.zclCommand (/home/home-automation/zigbee2mqtt/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:770:26) at Endpoint.configureReporting (/home/home-automation/zigbee2mqtt/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:556:9) at Object.currentSummDelivered (/home/home-automation/zigbee2mqtt/node_modules/zigbee-herdsman-converters/src/lib/reporting.ts:131:5) at Object.configure (/home/home-automation/zigbee2mqtt/node_modules/zigbee-herdsman-converters/src/devices/bituo_technik.ts:21:13) at Configure.configure (/home/home-automation/zigbee2mqtt/lib/extension/configure.ts:121:13) at Configure.onMQTTMessage (/home/home-automation/zigbee2mqtt/lib/extension/configure.ts:55:21) at EventEmitter.wrappedCallback (/home/home-automation/zigbee2mqtt/lib/eventBus.ts:174:17))

Also, every 2 days the device stops working, despite a fixed green light on the LED, which seems to mean according to the documentation that everything is ok. I need to press the button 5 to 10 seconds to have it working again.

[2024-05-31 07:04:30] warning:  z2m: Failed to ping 'electivire' (attempt 1/1, ZCL command 0xbc026efffea7f998/1 genBasic.read(["zclVersion"], {"timeout":10000,"dis
ableResponse":false,"disableRecovery":true,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequ
Patricen1 commented 5 months ago

Hello,

I mentioned that every time I do restart Z2M, this device is reconfigured with error.

2024-06-06 08:09:44Failed to configure 'Clim', attempt 3 (Error: ZCL command 0xbc026efffea7f9cf/1 seMetering.configReport([{"attribute":"currentSummDelivered","minimumReportInterval":5,"maximumReportInterval":3600,"reportableChange":[1,1]}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Status 'FAILURE') 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 processTicksAndRejections (node:internal/process/task_queues:95:5) at Endpoint.configureReporting (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:557:9) at Object.currentSummDelivered (/app/node_modules/zigbee-herdsman-converters/src/lib/reporting.ts:131:5) at Object.configure (/app/node_modules/zigbee-herdsman-converters/src/devices/bituo_technik.ts:21:13) at Configure.configure (/app/lib/extension/configure.ts:121:13) at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:174:17))

Patricen1 commented 4 months ago

In my test, the energy and produced energy seem to be reported normally? It's just that when it is initially connected, it will only report when the data changes, otherwise it will show null. You can try to reconfigure the device to refresh. image

Hello, It looks nevertheless that apparent power calculation is wrong with a factor of 1,000.

sdalu commented 4 months ago

I tried the 13.9.0 version. As mentioned by @Patricen1 I've got the reconfiguration error:

[2024-07-07 14:00:32] error:    z2m: Failed to configure 'electivire-old', attempt 3 (Error: ZCL command 0xbc026efffea7f998/1 seMe
tering.configReport([{"attribute":"currentSummDelivered","minimumReportInterval":5,"maximumReportInterval":3600,"reportableChange"
:0}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":n
ull,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Status 'FAILURE')
    at Endpoint.checkStatus (/home/home-automation/zigbee2mqtt/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:316:2
8)
    at Endpoint.zclCommand (/home/home-automation/zigbee2mqtt/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:771:26
)
    at Endpoint.configureReporting (/home/home-automation/zigbee2mqtt/node_modules/zigbee-herdsman/src/controller/model/endpoint.t
s:557:9)
    at Object.currentSummDelivered (/home/home-automation/zigbee2mqtt/node_modules/zigbee-herdsman-converters/src/lib/reporting.ts
:128:5)
    at Object.configure (/home/home-automation/zigbee2mqtt/node_modules/zigbee-herdsman-converters/src/devices/bituo_technik.ts:31
:13)
    at Configure.configure (/home/home-automation/zigbee2mqtt/lib/extension/configure.ts:126:13)
    at EventEmitter.wrappedCallback (/home/home-automation/zigbee2mqtt/lib/eventBus.ts:174:17))

Also values reported are incorrect, frequency got a x100 applied, voltage got a x100 applied, current got a x100 applied, power reactive is stuck to 0.

image

sdalu commented 4 months ago

Despite 1.39.0, the following problem also persists:

every 2 days the device stops working, despite a fixed green light on the LED, which seems to mean according to the documentation that everything is ok. I need to press the button 5 to 10 seconds to have it working again.

Patricen1 commented 3 months ago

Seems that this module has been updated to report energy usage with V1.39, but the 1000 factor for power value issue is still present.

Probably the same issue for reactive power calculation.

Patricen1 commented 2 months ago

@script0803 could you maybe take a look at this?

Hello @script0803, do you mention the issue we are facing? It looks like some of the reported value needs to be extended by 1000.

Patricen1 commented 1 week ago

up...

script0803 commented 1 week ago

Hi, @Patricen1 Sorry for the late reply. Is the problem you encountered that the apperant power and reactive power are wrongly divided by 1000?

Does active power have this problem?

I remember that I adjusted the power divisor to 1 in the converter.

In theory, both apperant power and reactive power should be calculated using this factor.

image
Patricen1 commented 1 week ago

327930951-0ab5fe41-1b3c-4dd3-98eb-743f5e3b8fda )

On the above screenshot, voltage is 236.19V, current is 0.19A, apparent power should be 44.876VA instead of 0.047VA

Hello, To my opinion all powers (active, réactive and power) should be extended by 1000 according to the above screenshot. Some people say energy is ok but i could not verify. Is there a way to test a sample code?