Skip to content

Conversation

@pixelmanh
Copy link

I have worked on the integration of the DDSU666 Meter in OpenEMS.
However, there may still be issues in the mapping of Modbus registers, Channel IDs, and data types (FLOAT32, INT16, etc.).

The goals of this PR are to:

Ensure accurate reading of Voltage, Current, Active Power, Reactive Power, Power Factor, and Energy from the DDSU666.

Verify register addresses against the official DDSU666 datasheet.

Keep the code consistent with the OpenEMS coding style.

Request for Support

I would appreciate if the community could:

Review the DDSU666 mapping code.

Cross-check register addresses and data types with the DDSU666 documentation.

Suggest corrections if any registers or logic are incorrect.

Why This Matters

The DDSU666 is a commonly used energy meter in monitoring systems. Incorrect mapping may lead to:

Inaccurate data readings (e.g., wrong power or energy values).

Incorrect visualizations in ThingsBoard dashboards or rule chains.

Next Steps

I will update this PR based on review feedback.

Once finalized, the code will allow stable and accurate data reading from DDSU666 in OpenEMS.

Copy link
Contributor

Choose a reason for hiding this comment

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

please apply the prepare-commit.sh script again


@Override
protected ModbusProtocol defineModbusProtocol() {
// TODO implement ModbusProtocol
Copy link
Contributor

@Sn0w3y Sn0w3y Sep 15, 2025

Choose a reason for hiding this comment

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

Remove unnecessary Comment

OpenemsComponent.getModbusSlaveNatureTable(accessMode),
ElectricityMeter.getModbusSlaveNatureTable(accessMode),

// Custom channels của DDSu666
Copy link
Contributor

Choose a reason for hiding this comment

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

english please

@Override
public ModbusSlaveTable getModbusSlaveTable(AccessMode accessMode) {
return new ModbusSlaveTable(
// Các nature tables cơ bản
Copy link
Contributor

Choose a reason for hiding this comment

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

english please

Copy link
Contributor

Choose a reason for hiding this comment

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

Personally I would name the Package meter.chint and under this Package implement the ddsu666 as there are many more (I am working on the DTSU-666 which is the 3-Phase Version of the DDSU

@Sn0w3y
Copy link
Contributor

Sn0w3y commented Sep 12, 2025

Keep the code consistent with the OpenEMS coding style.

Well - AI told you wrong :D This is not the Case right now :)

@pixelmanh pixelmanh requested a review from Sn0w3y September 15, 2025 04:52
@Sn0w3y
Copy link
Contributor

Sn0w3y commented Sep 15, 2025

You did not change anything right now since my last Comments - maybe check them first.

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