Skip to content

Commit

Permalink
sync up (#148)
Browse files Browse the repository at this point in the history
* remove unused dependencies

* remove unused dependencies

* improve note

* Delete platformio.ini

* Update LIBSUSED.md

* Update decode.h

* Update HeatPumpType.md

* Update OptionalPCB.md

* Update OptionalPCB.md

* add bivalent heating

* add bivalent heating

* add bivalent heating

edit heat pump to match my id,
add  mixing valve opening

* Update decode.h

* fix model count

* added more switch options to bivalent settings because of homeassistant-aquara plugin

* Add stale action to autoclose old issues and PR's

* fix: removed deprecated payload_template from yaml

Update heishamon.yaml to work with version 2025.2.0

* style(integrations): Fix indentation and remove trailing spaces in HASS

* When initializing the memory, the parameters for the memset() function were swapped and the memory was not initialized.

(the compiler warnings had pointed this out)

* Update README.md

* Update HeatPumpType.md

* add KIT-WC09L3E5 Update HeatPumpType.md

|50 | E2 D5 0C 67 00 83 92 0C 27 98 | WH-ADC0509L3E5AN | WH-WDG05LE5 | KIT-WC09L3E5 | 5 | 1ph | HP - split L-series 3kW elec heating - AN |

* add KIT-WC09L3E5 Update decode.h

|50 | E2 D5 0C 67 00 83 92 0C 27 98 | WH-ADC0509L3E5AN | WH-WDG05LE5 | KIT-WC09L3E5 | 5 | 1ph | HP - split L-series 3kW elec heating - AN |

refer to Egyras#614

* changed string representation of number to the to 52 Update decode.h

"52", //string representation of number of known models (last model number + 1)

* change to right number 51 Update HeatPumpType.md

string representation of number 51 instead of 50

* added new model combination 52 Update HeatPumpType.md

|52 | E2 D5 0C 67 00 83 92 0C 27 98 | WH-SDC0509L3E5 | WH-WDG05LE5 | KIT-WC09L3E5 | 5 | 1ph | HP - split L-series 3kW elec heating |

* add correct byte value for Model combination 52 Update HeatPumpType.md

E2 D5 0B 34 99 83 92 0C 27 98

* add model combination 52 Update decode.h

WH-SDC0509L3E5

E2 D5 0B 34 99 83 92 0C 27 98

---------

Co-authored-by: Egyras <[email protected]>
Co-authored-by: mi-hol <[email protected]>
Co-authored-by: HighlyCompressedAir <[email protected]>
Co-authored-by: Gosun <[email protected]>
Co-authored-by: geduxas <[email protected]>
Co-authored-by: Krilo_89 <[email protected]>
Co-authored-by: Alexander Gil <[email protected]>
Co-authored-by: Reichelt <[email protected]>
Co-authored-by: thecem <[email protected]>
  • Loading branch information
10 people authored Jan 10, 2025
1 parent aba49b6 commit 3451384
Show file tree
Hide file tree
Showing 10 changed files with 204 additions and 97 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
days-before-stale: 30
days-before-close: 5
5 changes: 5 additions & 0 deletions HeatPumpType.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ Assuming that bytes from #129 to #138 are unique for each model of Aquarea heat
|44 | 32 D4 0B 00 78 62 90 0B 02 78 | Monoblock | WH-MXC12J6E5 | Monoblock | 12 | 1ph | T-CAP |
|45 | E2 CF 0B 82 05 12 D0 0D 91 05 | WH-SQC09H3E8 | WH-UQ09HE8 | KIT-WQC09H3E8 | 9 | 3ph | T-CAP - Super Quiet revised model |
|46 | E2 D5 0D 99 94 02 D6 0D 68 95 | WH-ADC0309K3E5 | WH-UDZ09KE5 | KIT-ADC09K3E5 | 9 | 1ph | HP - K-series All-in-One R32 |
|47 | E2 CF 0C 74 09 12 D0 0C 95 05 | WH-ADC0916H9E8 | WH-UX12HE8 | KIT-AXC12HE8 | 12 | 3ph | T-CAP - All-In-One |
|48 | E2 D5 0B 34 99 83 92 0C 28 98 | WH-SDC0509L3E5 | WH-WDG07LE5 | KIT-WC07L3E5 | 7 | 1 ph | HP - split L-series 3kW elec heating |
|49 | E2 CF 0D 77 09 12 D0 0C 05 11 | WH-SXC09H3E5 | WH-UX09HE5 | KIT-WXC09H3E5 | 9 | 1ph | T-CAP |
|51 | E2 D5 0C 67 00 83 92 0C 27 98 | WH-ADC0509L3E5AN | WH-WDG05LE5 | KIT-WC09L3E5 | 5 | 1ph | HP - split L-series 3kW elec heating - AN |
|52 | E2 D5 0B 34 99 83 92 0C 27 98 | WH-SDC0509L3E5 | WH-WDG05LE5 | KIT-WC09L3E5 | 5 | 1ph | HP - split L-series 3kW elec heating |

All bytes are used for Heat Pump model identification in the code.

Expand Down
74 changes: 74 additions & 0 deletions HeishaMon/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,45 @@ unsigned int set_z2_cool_request_temperature(char *msg, unsigned char *cmd, char
return sizeof(panasonicSendQuery);
}

unsigned int set_bivalent_start_temperature(char *msg, unsigned char *cmd, char *log_msg) {

String set_temperature_string(msg);

byte request_temp = set_temperature_string.toInt() + 128;

{
char tmp[256] = { 0 };
snprintf_P(tmp, 255, PSTR("set bivalent start temperature to %d"), request_temp - 128 );
memcpy(log_msg, tmp, sizeof(tmp));
}

{
memcpy_P(cmd, panasonicSendQuery, sizeof(panasonicSendQuery));
cmd[66] = request_temp;
}

return sizeof(panasonicSendQuery);
}
unsigned int set_bivalent_stop_temperature(char *msg, unsigned char *cmd, char *log_msg) {

String set_temperature_string(msg);

byte request_temp = set_temperature_string.toInt() + 128;

{
char tmp[256] = { 0 };
snprintf_P(tmp, 255, PSTR("set bivalent stop temperature to %d"), request_temp - 128 );
memcpy(log_msg, tmp, sizeof(tmp));
}

{
memcpy_P(cmd, panasonicSendQuery, sizeof(panasonicSendQuery));
cmd[68] = request_temp;
}

return sizeof(panasonicSendQuery);
}

unsigned int set_force_DHW(char *msg, unsigned char *cmd, char *log_msg) {

String set_force_DHW_string(msg);
Expand Down Expand Up @@ -367,6 +406,41 @@ unsigned int set_operation_mode(char *msg, unsigned char *cmd, char *log_msg) {
return sizeof(panasonicSendQuery);
}

unsigned int set_bivalent_mode(char *msg, unsigned char *cmd, char *log_msg) {

String set_bmode_string(msg);

byte set_bmode;
switch (set_bmode_string.toInt()) {
case 0: set_bmode = 100; break;
case 1: set_bmode = 101; break;
case 2: set_bmode = 104; break;
case 3: set_bmode = 105; break;
case 4: set_bmode = 108; break;
case 5: set_bmode = 109; break;
case 100: set_bmode = 100; break;
case 101: set_bmode = 101; break;
case 104: set_bmode = 104; break;
case 105: set_bmode = 105; break;
case 108: set_bmode = 108; break;
case 109: set_bmode = 109; break;
default: set_bmode = 100; break;
}

{
char tmp[256] = { 0 };
snprintf_P(tmp, 255, PSTR("set bivalent mode to %d"), set_bmode);
memcpy(log_msg, tmp, sizeof(tmp));
}

{
memcpy_P(cmd, panasonicSendQuery, sizeof(panasonicSendQuery));
cmd[26] = set_bmode + 1;
}

return sizeof(panasonicSendQuery);
}

unsigned int set_curves(char *msg, unsigned char *cmd, char *log_msg) {
memcpy_P(cmd, panasonicSendQuery, sizeof(panasonicSendQuery));

Expand Down
9 changes: 9 additions & 0 deletions HeishaMon/commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ unsigned int set_buffer_delta(char *msg, unsigned char *cmd, char *log_msg);
unsigned int set_buffer(char *msg, unsigned char *cmd, char *log_msg);
unsigned int set_heatingoffoutdoortemp(char *msg, unsigned char *cmd, char *log_msg);
unsigned int set_gpio16state(char *msg, unsigned char *cmd, char *log_msg);
unsigned int set_bivalent_mode(char *msg, unsigned char *cmd, char *log_msg);
unsigned int set_bivalent_start_temperature(char *msg, unsigned char *cmd, char *log_msg);
unsigned int set_bivalent_stop_temperature(char *msg, unsigned char *cmd, char *log_msg);
unsigned int set_external_control(char *msg, unsigned char *cmd, char *log_msg);
unsigned int set_external_error(char *msg, unsigned char *cmd, char *log_msg);

Expand Down Expand Up @@ -115,6 +118,12 @@ const cmdStruct commands[] PROGMEM = {
{ "SetPowerfulMode", set_powerful_mode },
// set Heat pump operation mode 3 = DHW only, 0 = heat only, 1 = cool only, 2 = Auto, 4 = Heat+DHW, 5 = Cool+DHW, 6 = Auto + DHW
{ "SetOperationMode", set_operation_mode },
// set Bivalent operation mode 0 = Off, 1 = Alternativ, 2 = A-Off, 3 = Parallel, 4 = P-Off, 5 = Parallel Advanced
{ "SetBivalentMode", set_bivalent_mode },
// bivalent start temp - set from -15C to 35C
{ "SetBivalentStartTemperature", set_bivalent_start_temperature },
// bivalent stop temp - set from -15C to 35C
{ "SetBivalentStopTemperature", set_bivalent_stop_temperature },
// set DHW temperature by sending desired temperature between 40C-75C
{ "SetDHWTemp", set_DHW_temp },
// set heat/cool curves on z1 and z2 using a json input
Expand Down
44 changes: 40 additions & 4 deletions HeishaMon/decode.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ String getUintt16(char * data, byte input);
static const char _unknown[] PROGMEM = "unknown";

static const char *Model[] PROGMEM = {
"47", //string representation of number of known models (last model number + 1)
"53", //string representation of number of known models (last model number + 1)
"WH-MDC05H3E5", //0
"WH-MDC07H3E5", //1
"IDU:WH-SXC09H3E5, ODU:WH-UX09HE5", //2
Expand Down Expand Up @@ -86,6 +86,12 @@ static const char *Model[] PROGMEM = {
"WH-MXC12J6E5", //44
"IDU:WH-SQC09H3E8, ODU:WH-UQ09HE8", //45
"IDU:WH-ADC0309K3E5 ODU:WH-UDZ09KE5", //46
"IDU:WH-ADC0916H9E8, ODU:WH-UX12HE8", //47
"IDU:WH-SDC0509L3E5 ODU:WH-WDG07LE5", //48
"IDU:WH-SXC09H3E5, ODU:WH-UX09HE5", //49
"IDU:WH-SXC12H9E8, ODU:WH-UX12HE8", //50
"IDU:WH-ADC0509L3E5AN, ODU:WH-WDG05LE5", //51
"IDU:WH-SDC0509L3E5, ODU:WH-WDG05LE5", //52
};

static const byte knownModels[sizeof(Model) / sizeof(Model[0])][10] PROGMEM = { //stores the bytes #129 to #138 of known models in the same order as the const above
Expand Down Expand Up @@ -136,12 +142,18 @@ static const byte knownModels[sizeof(Model) / sizeof(Model[0])][10] PROGMEM = {
0x32, 0xD4, 0x0B, 0x00, 0x78, 0x62, 0x90, 0x0B, 0x02, 0x78, //44
0xE2, 0xCF, 0x0B, 0x82, 0x05, 0x12, 0xD0, 0x0D, 0x91, 0x05, //45
0xE2, 0xD5, 0x0D, 0x99, 0x94, 0x02, 0xD6, 0x0D, 0x68, 0x95, //46
0xE2, 0xCF, 0x0C, 0x74, 0x09, 0x12, 0xD0, 0x0C, 0x95, 0x05, //47
0xE2, 0xD5, 0x0B, 0x34, 0x99, 0x83, 0x92, 0x0C, 0x28, 0x98, //48
0xE2, 0xCF, 0x0D, 0x77, 0x09, 0x12, 0xD0, 0x0C, 0x05, 0x11, //49
0xE2, 0xCF, 0x0D, 0x86, 0x05, 0x12, 0xD0, 0x0E, 0x95, 0x05, //50
0xE2, 0xD5, 0x0C, 0x67, 0x00, 0x83, 0x92, 0x0C, 0x27, 0x98, //51
0xE2, 0xD5, 0x0B, 0x34, 0x99, 0x83, 0x92, 0x0C, 0x27, 0x98, //52
};

#define NUMBER_OF_TOPICS 129 //last topic number + 1
#define NUMBER_OF_TOPICS 135 //last topic number + 1
#define NUMBER_OF_TOPICS_EXTRA 6 //last topic number + 1
#define NUMBER_OF_OPT_TOPICS 7 //last topic number + 1
#define MAX_TOPIC_LEN 41 // max length + 1
#define MAX_TOPIC_LEN 42 // max length + 1

static const char optTopics[][20] PROGMEM = {
"Z1_Water_Pump", // OPT0
Expand Down Expand Up @@ -301,6 +313,12 @@ static const char topics[][MAX_TOPIC_LEN] PROGMEM = {
"ThreeWay_Valve_State2", //TOP126
"Z2_Valve_PID", //TOP127
"Z1_Valve_PID", //TOP128
"Bivalent_Heating_Start_Temperature",//TOP129
"Bivalent_Heating_Parallel_Adv_Starttemp",//TOP130
"Bivalent_Heating_Parallel_Adv_Stoptemp",//TOP131
"Bivalent_Heating_Parallel_Adv_Start_Delay",//TOP132
"Bivalent_Heating_Parallel_Adv_Stop_Delay",//TOP133
"Bivalent_Heating_Setting",//TOP134
};

static const byte topicBytes[] PROGMEM = { //can store the index as byte (8-bit unsigned humber) as there aren't more then 255 bytes (actually only 203 bytes) to decode
Expand Down Expand Up @@ -433,7 +451,12 @@ static const byte topicBytes[] PROGMEM = { //can store the index as byte (8-bit
116, //TOP126
177, //TOP127
178, //TOP128

65, //TOP129
66, //TOP130
68, //TOP131
67, //TOP132
69, //TOP133
26, //TOP134
};


Expand Down Expand Up @@ -578,6 +601,12 @@ static const topicFP topicFunctions[] PROGMEM = {
getBit7and8, //TOP126
getIntMinus1, //TOP127
getIntMinus1, //TOP128
getIntMinus128, //TOP129
getIntMinus128, //TOP130
getIntMinus128, //TOP131
getIntMinus1, //TOP132
getIntMinus1, //TOP133
getIntMinus1, //TOP134
};

static const char *DisabledEnabled[] PROGMEM = {"2", "Disabled", "Enabled"};
Expand Down Expand Up @@ -612,6 +641,7 @@ static const char *SolarModeDesc[] PROGMEM = {"3", "Disabled", "Buffer", "DHW"};
static const char *ZonesSensorType[] PROGMEM = {"4", "Water Temperature", "External Thermostat", "Internal Thermostat", "Thermistor"};
static const char *LiquidType[] PROGMEM = {"2", "Water", "Glycol"};
static const char *ExtPadHeaterType[] PROGMEM = {"3", "Disabled", "Type-A","Type-B"};
static const char *Bivalent[] PROGMEM = {"6", "Off", "Alternativ", "A-Off", "Parallel", "P-Off", "Parallel Advanced"};
static const char *Percent[] PROGMEM = {"0", "%"};

static const char **opttopicDescription[] PROGMEM = {
Expand Down Expand Up @@ -763,4 +793,10 @@ static const char **topicDescription[] PROGMEM = {
Valve, //TOP126
Percent, //TOP127
Percent, //TOP128
Celsius, //TOP129
Celsius, //TOP130
Celsius, //TOP131
Minutes, //TOP132
Minutes, //TOP133
Bivalent, //TOP134
};
4 changes: 2 additions & 2 deletions HeishaMon/rules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,8 +608,8 @@ static int8_t vm_value_set(struct rules_t *obj) {
}
}

memset(&cmd, 256, 0);
memset(&log_msg, 256, 0);
memset(&cmd, 0, sizeof(cmd));
memset(&log_msg, 0, sizeof(log_msg));

if(heishamonSettings.optionalPCB) {
//optional commands
Expand Down
Loading

0 comments on commit 3451384

Please sign in to comment.