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

Update owon.ts #8137

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Update owon.ts #8137

wants to merge 8 commits into from

Conversation

weson-su
Copy link
Contributor

The attribute instantaneousDemand and currentSummDelivered are reported together and cannot be parsed and displayed. Go back to the original processing mode for a moment.

weson-su and others added 8 commits April 8, 2024 17:27
The attribute instantaneousDemand and currentSummDelivered are reported together and cannot be parsed and displayed. Go back to the original processing mode for a moment.
resolve conflict
Fixed a commit error in the previous version
@weson-su
Copy link
Contributor Author

What can i do for this Lint error? Thanks

@weson-su weson-su closed this Oct 15, 2024
@weson-su weson-su reopened this Oct 15, 2024
@Koenkk
Copy link
Owner

Koenkk commented Oct 15, 2024

Could you explain a bit why the current code does not work?

@weson-su
Copy link
Contributor Author

It works fine with External converters, but says "Some checks were not successful" when pulling requests.

Run pnpm run pretty:check

zigbee-herdsman-converters@20.28.0 pretty:check /home/runner/work/zigbee-herdsman-converters/zigbee-herdsman-converters
prettier --check .

Checking formatting...
[warn] src/devices/owon.ts
[warn] Code style issues found in the above file. Run Prettier with --write to fix.
 ELIFECYCLE  Command failed with exit code 1.
Error: Process completed with exit code 1.

@Koenkk
Copy link
Owner

Koenkk commented Oct 16, 2024

I mean, can you explain why this change was needed in the first place? What doesn't work with the original code?

@weson-su
Copy link
Contributor Author

The version used is 1.40.2-1, after adding the device, it can be paired normally, and the onoff report is working normally. The problem is that instantaneousDemand and currentSummDelivered data are not updated on the Dashboard. Using the sniffer to capture the packet, it was found that the Configreport function was successful and the device could report normally. However, both instantaneousDemand and currentSummDelivered were reported together in one packet.
Wonder if the data merge report is not well compatible with the modernExtend processing?

@Koenkk
Copy link
Owner

Koenkk commented Oct 17, 2024

However, both instantaneousDemand and currentSummDelivered were reported together in one packet.

Could you provide the debug log of this?

See this on how to enable debug logging.

@weson-su
Copy link
Contributor Author

There are two devices in Log, 0x3c6a2cfffed35097 uses External converters, which works normally, such as line3424 of log, Mqtt is also reported after Zigbee Report.
0x3c6a2cfffed3b4c4 is used online version, abnormal work, such as log line3417, Zigbee Report after MQTT did not report.
log.log

@Koenkk
Copy link
Owner

Koenkk commented Oct 18, 2024

Could you provide your configuration.yaml and the external converter?

@weson-su
Copy link
Contributor Author

configuration.yaml.txt
WPS403.js.txt
CB432.js.txt
To facilitate the upload of Attach files, the file name extension of ".txt" is added.

@Koenkk
Copy link
Owner

Koenkk commented Oct 21, 2024

Could you also provide your devices.yaml file?

@weson-su
Copy link
Contributor Author

devices.yaml.txt
Please check the attachment.

@Koenkk
Copy link
Owner

Koenkk commented Oct 22, 2024

I think the divisor is missing:

  • Can you check if it publishes values with the latest dev branch
  • Could you provide the data/database.db entry of this device?
  • Could you provide the debug log when configuring it via the z2m frontend? (yellow refresh button)

See this on how to enable debug logging.

@weson-su
Copy link
Contributor Author

I have use the edge vesion. divisor is 1000.
log (4).log
database.db.txt

@Koenkk
Copy link
Owner

Koenkk commented Oct 23, 2024

It seems it published sometimes now.

[2024-10-23 15:05:47] debug: 	z2m: Received Zigbee message from '0x3c6a2cfffed3b4c4', type 'readResponse', cluster 'seMetering', data '{"currentSummDelivered":4026,"instantaneousDemand":50}' from endpoint 1 with groupID 0
[2024-10-23 15:05:47] info: 	z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x3c6a2cfffed3b4c4', payload '{"energy":4.03,"linkquality":153,"power":50,"power_on_behavior":"off","state":"ON"}'

I cannot explain why it doesn't work the other time though:

[2024-10-23 15:05:39] debug: 	z2m: Received Zigbee message from '0x3c6a2cfffed3b4c4', type 'attributeReport', cluster 'seMetering', data '{"currentSummDelivered":4025,"instantaneousDemand":74}' from endpoint 1 with groupID 0
[2024-10-23 15:05:46] debug: 	z2m:mqtt: Received MQTT message on 'zigbee2mqtt/bridge/request/device/configure' with data '{"id":"0x3c6a2cfffed3b4c4","transaction":"9n6pp-1"}'

@weson-su
Copy link
Contributor Author

The one that published is' readResponse '. If it is' attributeReport ', it is not publish.

@Koenkk
Copy link
Owner

Koenkk commented Oct 24, 2024

Is this always the case? Because both are there:

type: ['attributeReport', 'readResponse'],

@weson-su
Copy link
Contributor Author

weson-su commented Nov 1, 2024

Yes.Trying to find the problem has not been able to find any problem, but falling back to the previous version of the processing is no problem. So if you want to go back to the previous way of processing to use, is it possible?

@Koenkk
Copy link
Owner

Koenkk commented Nov 2, 2024

I don't see why it would fix it, it also uses fz.metering now.

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