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

[Tester Wanted] Feature: DPL: support for multiple inverters #1216

Merged
merged 4 commits into from
Nov 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Feature: DPL: support overscaling on all inverters (#1286)
this change allows to support overscaling for all inverters, as the configuration of
inputs (which one is part of a particular MPPT) is now provided from withing the
code. this information is used to implement overscaling for any of the inverters
(which are generally compatible with OpenDTU(-OnBattery)).
  • Loading branch information
vaterlangen authored and schlimmchen committed Nov 17, 2024
commit 0064e3d22147cb4661bbf0a34e177791f6afe7f0
14 changes: 14 additions & 0 deletions lib/Hoymiles/src/inverters/HERF_1CH.cpp
Original file line number Diff line number Diff line change
@@ -29,6 +29,10 @@ static const byteAssign_t byteAssignment[] = {
{ TYPE_INV, CH0, FLD_EFF, UNIT_PCT, CALC_TOTAL_EFF, 0, CMD_CALC, false, 3 }
};

static const channelMetaData_t channelMetaData[] = {
{ CH0, MPPT_A }
};

HERF_1CH::HERF_1CH(HoymilesRadio* radio, const uint64_t serial)
: HM_Abstract(radio, serial) {};

@@ -53,3 +57,13 @@ uint8_t HERF_1CH::getByteAssignmentSize() const
{
return sizeof(byteAssignment) / sizeof(byteAssignment[0]);
}

const channelMetaData_t* HERF_1CH::getChannelMetaData() const
{
return channelMetaData;
}

uint8_t HERF_1CH::getChannelMetaDataSize() const
{
return sizeof(channelMetaData) / sizeof(channelMetaData[0]);
}
2 changes: 2 additions & 0 deletions lib/Hoymiles/src/inverters/HERF_1CH.h
Original file line number Diff line number Diff line change
@@ -10,4 +10,6 @@ class HERF_1CH : public HM_Abstract {
String typeName() const;
const byteAssign_t* getByteAssignment() const;
uint8_t getByteAssignmentSize() const;
const channelMetaData_t* getChannelMetaData() const;
uint8_t getChannelMetaDataSize() const;
};
15 changes: 15 additions & 0 deletions lib/Hoymiles/src/inverters/HERF_2CH.cpp
Original file line number Diff line number Diff line change
@@ -36,6 +36,11 @@ static const byteAssign_t byteAssignment[] = {
{ TYPE_INV, CH0, FLD_EFF, UNIT_PCT, CALC_TOTAL_EFF, 0, CMD_CALC, false, 3 }
};

static const channelMetaData_t channelMetaData[] = {
{ CH0, MPPT_A },
{ CH1, MPPT_B }
};

HERF_2CH::HERF_2CH(HoymilesRadio* radio, const uint64_t serial)
: HM_Abstract(radio, serial) {};

@@ -60,3 +65,13 @@ uint8_t HERF_2CH::getByteAssignmentSize() const
{
return sizeof(byteAssignment) / sizeof(byteAssignment[0]);
}

const channelMetaData_t* HERF_2CH::getChannelMetaData() const
{
return channelMetaData;
}

uint8_t HERF_2CH::getChannelMetaDataSize() const
{
return sizeof(channelMetaData) / sizeof(channelMetaData[0]);
}
2 changes: 2 additions & 0 deletions lib/Hoymiles/src/inverters/HERF_2CH.h
Original file line number Diff line number Diff line change
@@ -10,4 +10,6 @@ class HERF_2CH : public HM_Abstract {
String typeName() const;
const byteAssign_t* getByteAssignment() const;
uint8_t getByteAssignmentSize() const;
const channelMetaData_t* getChannelMetaData() const;
uint8_t getChannelMetaDataSize() const;
};
14 changes: 14 additions & 0 deletions lib/Hoymiles/src/inverters/HMS_1CH.cpp
Original file line number Diff line number Diff line change
@@ -28,6 +28,10 @@ static const byteAssign_t byteAssignment[] = {
{ TYPE_INV, CH0, FLD_EFF, UNIT_PCT, CALC_TOTAL_EFF, 0, CMD_CALC, false, 3 }
};

static const channelMetaData_t channelMetaData[] = {
{ CH0, MPPT_A }
};

HMS_1CH::HMS_1CH(HoymilesRadio* radio, const uint64_t serial)
: HMS_Abstract(radio, serial) {};

@@ -52,3 +56,13 @@ uint8_t HMS_1CH::getByteAssignmentSize() const
{
return sizeof(byteAssignment) / sizeof(byteAssignment[0]);
}

const channelMetaData_t* HMS_1CH::getChannelMetaData() const
{
return channelMetaData;
}

uint8_t HMS_1CH::getChannelMetaDataSize() const
{
return sizeof(channelMetaData) / sizeof(channelMetaData[0]);
}
4 changes: 3 additions & 1 deletion lib/Hoymiles/src/inverters/HMS_1CH.h
Original file line number Diff line number Diff line change
@@ -11,4 +11,6 @@ class HMS_1CH : public HMS_Abstract {
String typeName() const;
const byteAssign_t* getByteAssignment() const;
uint8_t getByteAssignmentSize() const;
};
const channelMetaData_t* getChannelMetaData() const;
uint8_t getChannelMetaDataSize() const;
};
14 changes: 14 additions & 0 deletions lib/Hoymiles/src/inverters/HMS_1CHv2.cpp
Original file line number Diff line number Diff line change
@@ -28,6 +28,10 @@ static const byteAssign_t byteAssignment[] = {
{ TYPE_INV, CH0, FLD_EFF, UNIT_PCT, CALC_TOTAL_EFF, 0, CMD_CALC, false, 3 }
};

static const channelMetaData_t channelMetaData[] = {
{ CH0, MPPT_A }
};

HMS_1CHv2::HMS_1CHv2(HoymilesRadio* radio, const uint64_t serial)
: HMS_Abstract(radio, serial) {};

@@ -52,3 +56,13 @@ uint8_t HMS_1CHv2::getByteAssignmentSize() const
{
return sizeof(byteAssignment) / sizeof(byteAssignment[0]);
}

const channelMetaData_t* HMS_1CHv2::getChannelMetaData() const
{
return channelMetaData;
}

uint8_t HMS_1CHv2::getChannelMetaDataSize() const
{
return sizeof(channelMetaData) / sizeof(channelMetaData[0]);
}
4 changes: 3 additions & 1 deletion lib/Hoymiles/src/inverters/HMS_1CHv2.h
Original file line number Diff line number Diff line change
@@ -11,4 +11,6 @@ class HMS_1CHv2 : public HMS_Abstract {
String typeName() const;
const byteAssign_t* getByteAssignment() const;
uint8_t getByteAssignmentSize() const;
};
const channelMetaData_t* getChannelMetaData() const;
uint8_t getChannelMetaDataSize() const;
};
15 changes: 15 additions & 0 deletions lib/Hoymiles/src/inverters/HMS_2CH.cpp
Original file line number Diff line number Diff line change
@@ -35,6 +35,11 @@ static const byteAssign_t byteAssignment[] = {
{ TYPE_INV, CH0, FLD_EFF, UNIT_PCT, CALC_TOTAL_EFF, 0, CMD_CALC, false, 3 }
};

static const channelMetaData_t channelMetaData[] = {
{ CH0, MPPT_A },
{ CH1, MPPT_B }
};

HMS_2CH::HMS_2CH(HoymilesRadio* radio, const uint64_t serial)
: HMS_Abstract(radio, serial) {};

@@ -59,3 +64,13 @@ uint8_t HMS_2CH::getByteAssignmentSize() const
{
return sizeof(byteAssignment) / sizeof(byteAssignment[0]);
}

const channelMetaData_t* HMS_2CH::getChannelMetaData() const
{
return channelMetaData;
}

uint8_t HMS_2CH::getChannelMetaDataSize() const
{
return sizeof(channelMetaData) / sizeof(channelMetaData[0]);
}
4 changes: 3 additions & 1 deletion lib/Hoymiles/src/inverters/HMS_2CH.h
Original file line number Diff line number Diff line change
@@ -11,4 +11,6 @@ class HMS_2CH : public HMS_Abstract {
String typeName() const;
const byteAssign_t* getByteAssignment() const;
uint8_t getByteAssignmentSize() const;
};
const channelMetaData_t* getChannelMetaData() const;
uint8_t getChannelMetaDataSize() const;
};
17 changes: 17 additions & 0 deletions lib/Hoymiles/src/inverters/HMS_4CH.cpp
Original file line number Diff line number Diff line change
@@ -49,6 +49,13 @@ static const byteAssign_t byteAssignment[] = {
{ TYPE_INV, CH0, FLD_EFF, UNIT_PCT, CALC_TOTAL_EFF, 0, CMD_CALC, false, 3 }
};

static const channelMetaData_t channelMetaData[] = {
{ CH0, MPPT_A },
{ CH1, MPPT_B },
{ CH2, MPPT_C },
{ CH3, MPPT_D }
};

HMS_4CH::HMS_4CH(HoymilesRadio* radio, const uint64_t serial)
: HMS_Abstract(radio, serial) {};

@@ -73,3 +80,13 @@ uint8_t HMS_4CH::getByteAssignmentSize() const
{
return sizeof(byteAssignment) / sizeof(byteAssignment[0]);
}

const channelMetaData_t* HMS_4CH::getChannelMetaData() const
{
return channelMetaData;
}

uint8_t HMS_4CH::getChannelMetaDataSize() const
{
return sizeof(channelMetaData) / sizeof(channelMetaData[0]);
}
4 changes: 3 additions & 1 deletion lib/Hoymiles/src/inverters/HMS_4CH.h
Original file line number Diff line number Diff line change
@@ -10,4 +10,6 @@ class HMS_4CH : public HMS_Abstract {
String typeName() const;
const byteAssign_t* getByteAssignment() const;
uint8_t getByteAssignmentSize() const;
};
const channelMetaData_t* getChannelMetaData() const;
uint8_t getChannelMetaDataSize() const;
};
17 changes: 17 additions & 0 deletions lib/Hoymiles/src/inverters/HMT_4CH.cpp
Original file line number Diff line number Diff line change
@@ -58,6 +58,13 @@ static const byteAssign_t byteAssignment[] = {
{ TYPE_INV, CH0, FLD_EFF, UNIT_PCT, CALC_TOTAL_EFF, 0, CMD_CALC, false, 3 }
};

static const channelMetaData_t channelMetaData[] = {
{ CH0, MPPT_A },
{ CH1, MPPT_A },
{ CH2, MPPT_B },
{ CH3, MPPT_B }
};

HMT_4CH::HMT_4CH(HoymilesRadio* radio, const uint64_t serial)
: HMT_Abstract(radio, serial) {};

@@ -82,3 +89,13 @@ uint8_t HMT_4CH::getByteAssignmentSize() const
{
return sizeof(byteAssignment) / sizeof(byteAssignment[0]);
}

const channelMetaData_t* HMT_4CH::getChannelMetaData() const
{
return channelMetaData;
}

uint8_t HMT_4CH::getChannelMetaDataSize() const
{
return sizeof(channelMetaData) / sizeof(channelMetaData[0]);
}
4 changes: 3 additions & 1 deletion lib/Hoymiles/src/inverters/HMT_4CH.h
Original file line number Diff line number Diff line change
@@ -10,4 +10,6 @@ class HMT_4CH : public HMT_Abstract {
String typeName() const;
const byteAssign_t* getByteAssignment() const;
uint8_t getByteAssignmentSize() const;
};
const channelMetaData_t* getChannelMetaData() const;
uint8_t getChannelMetaDataSize() const;
};
19 changes: 19 additions & 0 deletions lib/Hoymiles/src/inverters/HMT_6CH.cpp
Original file line number Diff line number Diff line change
@@ -72,6 +72,15 @@ static const byteAssign_t byteAssignment[] = {
{ TYPE_INV, CH0, FLD_EFF, UNIT_PCT, CALC_TOTAL_EFF, 0, CMD_CALC, false, 3 }
};

static const channelMetaData_t channelMetaData[] = {
{ CH0, MPPT_A },
{ CH1, MPPT_A },
{ CH2, MPPT_B },
{ CH3, MPPT_B },
{ CH4, MPPT_C },
{ CH5, MPPT_C }
};

HMT_6CH::HMT_6CH(HoymilesRadio* radio, const uint64_t serial)
: HMT_Abstract(radio, serial) {};

@@ -96,3 +105,13 @@ uint8_t HMT_6CH::getByteAssignmentSize() const
{
return sizeof(byteAssignment) / sizeof(byteAssignment[0]);
}

const channelMetaData_t* HMT_6CH::getChannelMetaData() const
{
return channelMetaData;
}

uint8_t HMT_6CH::getChannelMetaDataSize() const
{
return sizeof(channelMetaData) / sizeof(channelMetaData[0]);
}
4 changes: 3 additions & 1 deletion lib/Hoymiles/src/inverters/HMT_6CH.h
Original file line number Diff line number Diff line change
@@ -10,4 +10,6 @@ class HMT_6CH : public HMT_Abstract {
String typeName() const;
const byteAssign_t* getByteAssignment() const;
uint8_t getByteAssignmentSize() const;
};
const channelMetaData_t* getChannelMetaData() const;
uint8_t getChannelMetaDataSize() const;
};
14 changes: 14 additions & 0 deletions lib/Hoymiles/src/inverters/HM_1CH.cpp
Original file line number Diff line number Diff line change
@@ -28,6 +28,10 @@ static const byteAssign_t byteAssignment[] = {
{ TYPE_INV, CH0, FLD_EFF, UNIT_PCT, CALC_TOTAL_EFF, 0, CMD_CALC, false, 3 }
};

static const channelMetaData_t channelMetaData[] = {
{ CH0, MPPT_A }
};

HM_1CH::HM_1CH(HoymilesRadio* radio, const uint64_t serial)
: HM_Abstract(radio, serial) {};

@@ -65,3 +69,13 @@ uint8_t HM_1CH::getByteAssignmentSize() const
{
return sizeof(byteAssignment) / sizeof(byteAssignment[0]);
}

const channelMetaData_t* HM_1CH::getChannelMetaData() const
{
return channelMetaData;
}

uint8_t HM_1CH::getChannelMetaDataSize() const
{
return sizeof(channelMetaData) / sizeof(channelMetaData[0]);
}
4 changes: 3 additions & 1 deletion lib/Hoymiles/src/inverters/HM_1CH.h
Original file line number Diff line number Diff line change
@@ -11,4 +11,6 @@ class HM_1CH : public HM_Abstract {
String typeName() const;
const byteAssign_t* getByteAssignment() const;
uint8_t getByteAssignmentSize() const;
};
const channelMetaData_t* getChannelMetaData() const;
uint8_t getChannelMetaDataSize() const;
};
15 changes: 15 additions & 0 deletions lib/Hoymiles/src/inverters/HM_2CH.cpp
Original file line number Diff line number Diff line change
@@ -36,6 +36,11 @@ static const byteAssign_t byteAssignment[] = {
{ TYPE_INV, CH0, FLD_EFF, UNIT_PCT, CALC_TOTAL_EFF, 0, CMD_CALC, false, 3 }
};

static const channelMetaData_t channelMetaData[] = {
{ CH0, MPPT_A },
{ CH1, MPPT_B }
};

HM_2CH::HM_2CH(HoymilesRadio* radio, const uint64_t serial)
: HM_Abstract(radio, serial) {};

@@ -73,3 +78,13 @@ uint8_t HM_2CH::getByteAssignmentSize() const
{
return sizeof(byteAssignment) / sizeof(byteAssignment[0]);
}

const channelMetaData_t* HM_2CH::getChannelMetaData() const
{
return channelMetaData;
}

uint8_t HM_2CH::getChannelMetaDataSize() const
{
return sizeof(channelMetaData) / sizeof(channelMetaData[0]);
}
4 changes: 3 additions & 1 deletion lib/Hoymiles/src/inverters/HM_2CH.h
Original file line number Diff line number Diff line change
@@ -10,4 +10,6 @@ class HM_2CH : public HM_Abstract {
String typeName() const;
const byteAssign_t* getByteAssignment() const;
uint8_t getByteAssignmentSize() const;
};
const channelMetaData_t* getChannelMetaData() const;
uint8_t getChannelMetaDataSize() const;
};
17 changes: 17 additions & 0 deletions lib/Hoymiles/src/inverters/HM_4CH.cpp
Original file line number Diff line number Diff line change
@@ -49,6 +49,13 @@ static const byteAssign_t byteAssignment[] = {
{ TYPE_INV, CH0, FLD_EFF, UNIT_PCT, CALC_TOTAL_EFF, 0, CMD_CALC, false, 3 }
};

static const channelMetaData_t channelMetaData[] = {
{ CH0, MPPT_A },
{ CH1, MPPT_A },
{ CH2, MPPT_B },
{ CH3, MPPT_B }
};

HM_4CH::HM_4CH(HoymilesRadio* radio, const uint64_t serial)
: HM_Abstract(radio, serial) {};

@@ -86,3 +93,13 @@ uint8_t HM_4CH::getByteAssignmentSize() const
{
return sizeof(byteAssignment) / sizeof(byteAssignment[0]);
}

const channelMetaData_t* HM_4CH::getChannelMetaData() const
{
return channelMetaData;
}

uint8_t HM_4CH::getChannelMetaDataSize() const
{
return sizeof(channelMetaData) / sizeof(channelMetaData[0]);
}
4 changes: 3 additions & 1 deletion lib/Hoymiles/src/inverters/HM_4CH.h
Original file line number Diff line number Diff line change
@@ -10,4 +10,6 @@ class HM_4CH : public HM_Abstract {
String typeName() const;
const byteAssign_t* getByteAssignment() const;
uint8_t getByteAssignmentSize() const;
};
const channelMetaData_t* getChannelMetaData() const;
uint8_t getChannelMetaDataSize() const;
};
Loading