Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
69 changes: 69 additions & 0 deletions HeishaMon/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,75 @@ unsigned int set_external_error(char *msg, unsigned char *cmd, char *log_msg){
return sizeof(panasonicSendQuery);
}

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

const byte address=30;
byte value = 0b01;

if ( String(msg).toInt() == 1 ) {
value = 0b10;
}

{
char tmp[256] = { 0 };
snprintf_P(tmp, 255, PSTR("set heating control %d"), value - 1);
memcpy(log_msg, tmp, sizeof(tmp));
}

{
memcpy_P(cmd, panasonicSendQuery, sizeof(panasonicSendQuery));
cmd[address] = value << 2;
}

return sizeof(panasonicSendQuery);
}

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

const byte address=24;
byte value = 0b01;

if ( String(msg).toInt() == 1 ) {
value = 0b10;
}

{
char tmp[256] = { 0 };
snprintf_P(tmp, 255, PSTR("set smart dhw %d"), value - 1);
memcpy(log_msg, tmp, sizeof(tmp));
}

{
memcpy_P(cmd, panasonicSendQuery, sizeof(panasonicSendQuery));
cmd[address] = value << 6;
}

return sizeof(panasonicSendQuery);
}

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

const byte address=11;
byte value = 0b01;

if ( String(msg).toInt() == 1 ) {
value = 0b10;
}

{
char tmp[256] = { 0 };
snprintf_P(tmp, 255, PSTR("set quiet mode priority %d"), value - 1);
memcpy(log_msg, tmp, sizeof(tmp));
}

{
memcpy_P(cmd, panasonicSendQuery, sizeof(panasonicSendQuery));
cmd[address] = value << 4;
}

return sizeof(panasonicSendQuery);
}

unsigned int set_external_compressor_control(char *msg, unsigned char *cmd, char *log_msg){
const byte off_state=64;
const byte address=23;
Expand Down
6 changes: 6 additions & 0 deletions HeishaMon/commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ unsigned int set_bivalent_ap_start_temp(char *msg, unsigned char *cmd, char *log
unsigned int set_bivalent_ap_stop_temp(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);
unsigned int set_heatingcontrol(char *msg, unsigned char *cmd, char *log_msg);
unsigned int set_smart_dhw(char *msg, unsigned char *cmd, char *log_msg);
unsigned int set_quiet_mode_priority(char *msg, unsigned char *cmd, char *log_msg);

//optional pcb commands
unsigned int set_heat_cool_mode(char *msg, char *log_msg);
Expand Down Expand Up @@ -153,6 +156,9 @@ const cmdStruct commands[] PROGMEM = {
{ "SetBivalentAPStartTemp", set_bivalent_ap_start_temp },
// bivalent AP stop temp - set from -15C to 35C
{ "SetBivalentAPStopTemp", set_bivalent_ap_stop_temp },
{ "SetHeatingControl", set_heatingcontrol },
{ "SetSmartDHW", set_smart_dhw },
{ "SetQuietModePriority", set_quiet_mode_priority },
};

struct optCmdStruct{
Expand Down
17 changes: 16 additions & 1 deletion HeishaMon/decode.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static const char _unknown[] PROGMEM = "unknown";



#define NUMBER_OF_TOPICS 139 //last topic number + 1
#define NUMBER_OF_TOPICS 142 //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 42 // max length + 1
Expand Down Expand Up @@ -215,6 +215,9 @@ static const char topics[][MAX_TOPIC_LEN] PROGMEM = {
"Bivalent_Advanced_Start_Delay",//TOP136
"Bivalent_Advanced_Stop_Delay",//TOP137
"Bivalent_Advanced_DHW_Delay",//TOP138
"Heating_Control", //TOP139
"Smart_DHW", //TOP140
"Quiet_Mode_Priority", //TOP141
};

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 @@ -357,6 +360,9 @@ static const byte topicBytes[] PROGMEM = { //can store the index as byte (8-bit
67, //TOP136
69, //TOP137
70, //TOP138
30, //TOP139
24, //TOP140
11, //TOP141
};


Expand Down Expand Up @@ -511,6 +517,9 @@ static const topicFP topicFunctions[] PROGMEM = {
getIntMinus1, //TOP136
getIntMinus1, //TOP137
getIntMinus1, //TOP138
getBit5and6, //TOP139
getBit1and2, //TOP140
getBit3and4, //TOP141
};

static const char *DisabledEnabled[] PROGMEM = {"2", "Disabled", "Enabled"};
Expand Down Expand Up @@ -548,6 +557,9 @@ static const char *ExtPadHeaterType[] PROGMEM = {"3", "Disabled", "Type-A","Type
static const char *Bivalent[] PROGMEM = {"3", "Alternative", "Parallel", "Advanced Parallel"};
static const char *Percent[] PROGMEM = {"0", "%"};
static const char *Model[] PROGMEM = {"0", "Model"};
static const char *HeatingControl[] PROGMEM = {"2", "Comfort", "Efficiency"};
static const char *SmartDHW[] PROGMEM = {"2", "Variable", "Standard"};
static const char *QuietModePriority[] PROGMEM = {"2", "Sound", "Capacity"};

static const char **opttopicDescription[] PROGMEM = {
OffOn, //OPT0
Expand Down Expand Up @@ -708,4 +720,7 @@ static const char **topicDescription[] PROGMEM = {
Minutes, //TOP136
Minutes, //TOP137
Minutes, //TOP138
HeatingControl, //TOP139
SmartDHW, //TOP140
QuietModePriority, //TOP141
};
6 changes: 6 additions & 0 deletions MQTT-Topics.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ TOP135 | main/Bivalent_Advanced_Stop_Temp | Bivalent adv. par. heat stop temp
TOP136 | main/Bivalent_Advanced_Start_Delay | Bivalent adv. par. heat start delay
TOP137 | main/Bivalent_Advanced_Stop_Delay | Bivalent adv. par. heat stop delay
TOP138 | main/Bivalent_Advanced_DHW_Delay | Bivalent adv. par. DHW delay
TOP139 | main/Heating_Control | Heating Control
TOP140 | main/Smart_DHW | Smart DHW
TOP141 | main/Quiet_Mode_Priority | Quiet Mode Priority (0=sound, 1=capacity)



Expand Down Expand Up @@ -222,6 +225,9 @@ SET35 | SetBivalentMode | Set bivalent mode | 0=alternative, 1=parallel, 2=advan
SET36 | SetBivalentStartTemp | Set bivalent start temp | -15 to 35
SET37 | SetBivalentAPStartTemp | Set bivalent adv. par. start temp | -15 to 35
SET38 | SetBivalentAPStopTemp | Set bivalent adv. par. stop temp | -15 to 35
SET39 | SetHeatingControl | Set heating control | 0=comfort, 1=efficiency
SET40 | SetSmartDHW | Set SmartDHW | 0=variable, 1=standard
SET41 | SetQuietModePriority | Set Quiet Mode Priority | 0=sound, 1=capacity


*If you operate your heatpump in water mode with direct temperature setup: topics ending xxxRequestTemperature will set the absolute target temperature.*
Expand Down
6 changes: 3 additions & 3 deletions ProtocolByteDecrypt.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
| TOP | 08 | 00 | | 0 byte |
| TOP58+TOP59 | 09 | 05 | 3rd & 4th bit = b01 Standard, b10 - DHW Standard/Variable (J-series only)<br/>5th & 6th bit = b01 DHW heater off, b10 - DHW heater on<br/>7rd & 8th bit = b01 Water heater off, b10 - Water heater on | DHW capacity (J-series only)<br/>Heaters enable allowed status|
| TOP | 10 | 00 | | 0 byte |
| TOP | 11 | 00 | 3rd & 4th bit = b01 - Sound , b10 - Capacity <br/> 7th & 8th bit = b01 - DHW Top sensor , b10 - DHW Center Sensor | Quiet Mode Priority (K/L series) <br/> Only All-In-One |
| TOP141 | 11 | 00 | 3rd & 4th bit = b01 - Sound , b10 - Capacity <br/> 7th & 8th bit = b01 - DHW Top sensor , b10 - DHW Center Sensor | Quiet Mode Priority (K/L series) <br/> Only All-In-One |
| TOP | 12 | 00 | | 0 byte |
| TOP | 13 | 00 | | 0 byte |
| TOP | 14 | 00 | | 0 byte |
Expand All @@ -26,13 +26,13 @@
| TOP | 21 | 15 | (hex) 15 - One Zone and Z1 as room , 19 - One Zone and Z1 as pool, 16 - Two Zones and Z2 as room, 26 - Two Zones ,Z2 as pool| No. of Zones and Zone Destination |
| TOP111+TOP112 | 22 | 11 |First digit -Z2 ,Second digit Z1 (hex) 1 - water temperature,2 - External Thermostat, 3 - Internal Thermostat, , 4 - Thermistor | Zone & sensor settings ( system setup - Installer ) |
| TOP119/120/121/122 | 23 | 55 | 1st/2nd bit = external compressor control, 3rd/4th bit = external error signal, 5th/6h bit = heat/cool-switch, 7th/8th bit = external control switch | External control, heat/cool switch, error signal and External compressor control switch (menu settings)|
| TOP99+TOP100+TOP101 | 24 | 16 | 1st & 2nd bit Smart DHW -All-In-One only, 3rd & 4th bit = solar buffer (0b01=no solar, 0b10=solar buffer, 0b11=solar dhw), 5th & 6th bit = buffer installed, 7th & 8th bit = DHW installed|
| TOP140+TOP99+TOP100+TOP101 | 24 | 16 | 1st & 2nd bit Smart DHW (L series) (b01=Variable, b10=Standard) <br/> 3rd & 4th bit = solar buffer (0b01=no solar, 0b10=solar buffer, 0b11=solar dhw) <br/> 5th & 6th bit = buffer installed <br/> 7th & 8th bit = DHW installed |
| TOP114 | 25 | 5e | 1st & 2nd bit = 10 <br/> 3rd & 4th bit = b01 no Pad Heater, b10 - Type A, b11 Type B <br/> 5th & 6th bit = b01 - Internal Heater 3kW, b10 - 6kW, b11 - 9kW <br/> 7th & 8th bit = b01 DHW Internal Heater , b10 - DHW External Heater | External Pad Heater <br/> Power of internal heater <br/> DHW heater Internal/External |
| TOP129/130/13/132 | 26 | 55 | (hex) Bivalent control, mode and ap settings. | Bivalent settings |
| TOP | 27 | 05 | SG Ready Control on/off (bit5and6) ,Demand Control on/off (bit7and8) | SG Ready Control, Demand Control |
| TOP76+TOP81 | 28 | 09 | (hex) 09 - Compensation curve heat and direct cool, 05 - both compensation curves , 0a - direct heat and direct cool, 06 - heat direct, cool compensation curve | Operation Setup -Installer -water temperature heating on status and cooling |
| TOP106 | 29 | 00 | 3rd & 4th bit = b01 - deltaT , b10 - Max. Duty | Pump flowrate (J/K/L series) |
| TOP | 30 | 00 | 5th & 6th bit = b01 - Comfort , b10 - Efficiency <br/> 7th & 8th bit = b01 - DHW Defrost NO , b10 - DHW Defrost YES | Heating Control (K/L series) <br/> DHW Defrost (K/L series) |
| TOP139 | 30 | 00 | 5th & 6th bit = Heating Control (b01=Comfort, b10=Efficiency) <br/> 7th & 8th bit = DHW Defrost (b01=No, b10=Yes) | Heating Control (K/L series) <br/> DHW Defrost (K/L series) |
| TOP | 31 | 00 | | 0 byte |
| TOP | 32 | 00 | | 0 byte |
| TOP | 33 | 00 | | 0 byte |
Expand Down