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
23 changes: 23 additions & 0 deletions HeishaMon/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,29 @@ unsigned int set_pump_flowrate_mode(char *msg, unsigned char *cmd, char *log_msg
return sizeof(panasonicSendQuery);
}

unsigned int set_dhw_sensor_selection(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 dhw sensor selection %d"), value - 1);
memcpy(log_msg, tmp, sizeof(tmp));
}

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

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
2 changes: 2 additions & 0 deletions HeishaMon/commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ 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);
unsigned int set_pump_flowrate_mode(char *msg, unsigned char *cmd, char *log_msg);
unsigned int set_dhw_sensor_selection(char *msg, unsigned char *cmd, char *log_msg);


//optional pcb commands
Expand Down Expand Up @@ -162,6 +163,7 @@ const cmdStruct commands[] PROGMEM = {
{ "SetSmartDHW", set_smart_dhw },
{ "SetQuietModePriority", set_quiet_mode_priority },
{ "SetPumpFlowrateMode", set_pump_flowrate_mode },
{ "SetDHWSensorSelection", set_dhw_sensor_selection },
};

struct optCmdStruct{
Expand Down
7 changes: 6 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 143 //last topic number + 1
#define NUMBER_OF_TOPICS 144 //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 @@ -219,6 +219,7 @@ static const char topics[][MAX_TOPIC_LEN] PROGMEM = {
"Smart_DHW", //TOP140
"Quiet_Mode_Priority", //TOP141
"Expansion_Valve", //TOP142
"DHW_Sensor_Selection", //TOP143
};

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 @@ -365,6 +366,7 @@ static const byte topicBytes[] PROGMEM = { //can store the index as byte (8-bit
24, //TOP140
11, //TOP141
175, //TOP142
11, //TOP143
};


Expand Down Expand Up @@ -523,6 +525,7 @@ static const topicFP topicFunctions[] PROGMEM = {
getBit1and2, //TOP140
getBit3and4, //TOP141
getIntMinus1, //TOP142
getBit7and8, //TOP143
};

static const char *DisabledEnabled[] PROGMEM = {"2", "Disabled", "Enabled"};
Expand Down Expand Up @@ -563,6 +566,7 @@ 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 *DHWSensorType[] PROGMEM = {"2", "Top", "Center"};
static const char *Steps[] PROGMEM = {"0", "Steps"};

static const char **opttopicDescription[] PROGMEM = {
Expand Down Expand Up @@ -728,4 +732,5 @@ static const char **topicDescription[] PROGMEM = {
SmartDHW, //TOP140
QuietModePriority, //TOP141
Steps, //TOP142
DHWSensorType, //TOP143
};
2 changes: 2 additions & 0 deletions MQTT-Topics.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ TOP139 | main/Heating_Control | Heating Control
TOP140 | main/Smart_DHW | Smart DHW
TOP141 | main/Quiet_Mode_Priority | Quiet Mode Priority (0=sound, 1=capacity)
TOP142 | main/Expansion_Valve | Expansion Valve (Steps)
TOP143 | main/DHW_Sensor_Selection | DHW tank sensor selection (0=Top, 1=Center) (K/L series All-In-One only)



Expand Down Expand Up @@ -230,6 +231,7 @@ 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
SET42 | SetPumpFlowrateMode | Set Pump Flowrate Mode | 0=deltaT, 1=max. duty
SET43 | SetDHWSensorSelection | Set DHW tank sensor selection (K/L series All-In-One only) | 0=Top, 1=Center

*If you operate your heatpump in water mode with direct temperature setup: topics ending xxxRequestTemperature will set the absolute target temperature.*

Expand Down
2 changes: 1 addition & 1 deletion 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 |
| 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 |
| TOP141+TOP143 | 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/> DHW Sensor Selection (K/L series All-In-One only) |
| TOP | 12 | 00 | | 0 byte |
| TOP | 13 | 00 | | 0 byte |
| TOP | 14 | 00 | | 0 byte |
Expand Down
Loading