Added TOP139-141 and SET39-42

This commit is contained in:
ElVit 2026-03-21 22:09:31 +01:00
parent 76c78cfee8
commit b9affba2e1
10 changed files with 139 additions and 2 deletions

View File

@ -117,7 +117,8 @@ water_heater:
```
Thanks to [oxyde42](https://github.com/oxyde42) there is also an exmaple yaml code for the HeishaMon Large Board:
- [example_heishamon_large.yaml](../../prototypes/panasonic_heatpump/example_heishamon_large.yaml)
* [example_heishamon_large.yaml](../../prototypes/panasonic_heatpump/example_heishamon_large.yaml)
## Configuration variables
@ -451,6 +452,12 @@ text_sensor:
name: "ThreeWay Valve State2"
top130:
name: "Bivalent Mode"
top139:
name: "HeatingControl"
top140:
name: "SmartDHW"
top141:
name: "Quiet Mode Priority"
```
### Numbers
@ -592,6 +599,14 @@ select:
name: "Set External PadHeater"
set35:
name: "Set Bivalent Mode"
set39:
name: "Set Heating Control"
set40:
name: "Set Smart DHW"
set41:
name: "Set Quiet Mode Priority"
set42:
name: "Set Pump Flow Rate Mode"
```
### Climates

View File

@ -21,6 +21,9 @@ constexpr const char* const PanasonicDecode::ZoneSensorType[];
constexpr const char* const PanasonicDecode::LiquidType[];
constexpr const char* const PanasonicDecode::ExtPadHeaterType[];
constexpr const char* const PanasonicDecode::BivalentMode[];
constexpr const char* const PanasonicDecode::HeatingControl[];
constexpr const char* const PanasonicDecode::SmartDHW[];
constexpr const char* const PanasonicDecode::QuietModePriority[];
constexpr const char* const PanasonicDecode::ModelNames[];
constexpr const uint8_t KnownModels[NUMBER_OF_MODELS][10] = {

View File

@ -67,6 +67,9 @@ class PanasonicDecode {
static const constexpr char* const ZoneState[] = {"3", "Zone 1", "Zone 2", "Zone 1 & 2"};
static const constexpr char* const ExtPadHeaterType[] = {"3", "Disabled", "Type-A", "Type-B"};
static const constexpr char* const BivalentMode[] = {"3", "Alternative", "Parallel", "Advanced Parallel"};
static const constexpr char* const HeatingControl[] = {"2", "Comfort", "Efficiency"};
static const constexpr char* const SmartDHW[] = {"2", "Variable", "Standard"};
static const constexpr char* const QuietModePriority[] = {"2", "Sound", "Capacity"};
static const constexpr char* const ModelNames[] = {
"58", // string representation of number of known models (last model number + 1)
"WH-MDC05H3E5", // 0

View File

@ -12,7 +12,7 @@
#include "commands.h"
#ifndef PANASONIC_HEATPUMP_VERSION
#define PANASONIC_HEATPUMP_VERSION "0.0.7-beta.2"
#define PANASONIC_HEATPUMP_VERSION "0.0.7-beta.4"
#endif
namespace esphome {

View File

@ -16,6 +16,10 @@ CONF_SET9 = "set9" # Set Operation Mode
CONF_SET17 = "set17" # Set Zones
CONF_SET26 = "set26" # Set External PadHeater
CONF_SET35 = "set35" # Set Bivalent Mode
CONF_SET39 = "set39" # Set Heating Control
CONF_SET40 = "set40" # Set Smart DHW
CONF_SET41 = "set41" # Set Quiet Mode Priority
CONF_SET42 = "set42" # Set Pump Flow Rate Mode
TYPES = [
CONF_SET2,
@ -25,6 +29,10 @@ TYPES = [
CONF_SET17,
CONF_SET26,
CONF_SET35,
CONF_SET39,
CONF_SET40,
CONF_SET41,
CONF_SET42,
]
CONF_SELECTS = [
@ -57,6 +65,22 @@ CONF_SELECTS = [
],
["Disabled", "Type-A", "Type-B"],
["Alternative", "Parallel", "Advanced Parallel"],
[
"Comfort,",
"Efficiency",
],
[
"Variable",
"Standard",
],
[
"Sound",
"Capacity",
],
[
"DeltaT",
"Max. Duty",
],
]
CONF_SELECT_COOL_MODE = [
@ -100,6 +124,18 @@ CONFIG_SCHEMA = cv.Schema(
cv.Optional(CONF_SET35): select.select_schema(
PanasonicHeatpumpSelect,
),
cv.Optional(CONF_SET39): select.select_schema(
PanasonicHeatpumpSelect,
),
cv.Optional(CONF_SET40): select.select_schema(
PanasonicHeatpumpSelect,
),
cv.Optional(CONF_SET41): select.select_schema(
PanasonicHeatpumpSelect,
),
cv.Optional(CONF_SET42): select.select_schema(
PanasonicHeatpumpSelect,
),
}
).extend(cv.COMPONENT_SCHEMA)

View File

@ -37,6 +37,18 @@ void PanasonicHeatpumpSelect::control(const std::string& value) {
case SelectIds::CONF_SET35:
this->parent_->set_command_byte(PanasonicCommand::setPlus1Multiply4(index), 26);
break;
case SelectIds::CONF_SET39:
this->parent_->set_command_byte(PanasonicCommand::setPlus1Multiply4(value), 30);
break;
case SelectIds::CONF_SET40:
this->parent_->set_command_byte(PanasonicCommand::setPlus1Multiply64(value), 24);
break;
case SelectIds::CONF_SET41:
this->parent_->set_command_byte(PanasonicCommand::setPlus1Multiply16(value), 11);
break;
case SelectIds::CONF_SET42:
this->parent_->set_command_byte(PanasonicCommand::setPlus1Multiply16(value), 29);
break;
default:
return;
};
@ -92,6 +104,26 @@ void PanasonicHeatpumpSelect::publish_new_state(const std::vector<uint8_t>& data
if (this->has_state() && this->current_option() == new_state)
return;
break;
case SelectIds::CONF_SET39:
new_state = PanasonicDecode::getTextState(PanasonicDecode::HeatingControl, PanasonicDecode::getBit5and6(data[30]));
if (this->has_state() && this->current_option() == new_state)
return;
break;
case SelectIds::CONF_SET40:
new_state = PanasonicDecode::getTextState(PanasonicDecode::SmartDHW, PanasonicDecode::getBit1and2(data[24]));
if (this->has_state() && this->current_option() == new_state)
return;
break;
case SelectIds::CONF_SET41:
new_state = PanasonicDecode::getTextState(PanasonicDecode::QuietModePriority, PanasonicDecode::getBit3and4(data[11]));
if (this->has_state() && this->current_option() == new_state)
return;
break;
case SelectIds::CONF_SET42:
new_state = PanasonicDecode::getTextState(PanasonicDecode::PumpFlowRateMode, PanasonicDecode::getBit3and4(data[29]));
if (this->has_state() && this->current_option() == new_state)
return;
break;
default:
return;
};

View File

@ -15,6 +15,10 @@ enum SelectIds : uint8_t {
CONF_SET17,
CONF_SET26,
CONF_SET35,
CONF_SET39,
CONF_SET40,
CONF_SET41,
CONF_SET42,
};
class PanasonicHeatpumpSelect : public select::Select,

View File

@ -47,6 +47,9 @@ CONF_TOP114 = "top114" # External Pad Heater
CONF_TOP125 = "top125" # TwoWay Valve State
CONF_TOP126 = "top126" # ThreeWay Valve State2
CONF_TOP130 = "top130" # Bivalent Mode
CONF_TOP139 = "top139" # HeatingControl
CONF_TOP140 = "top140" # SmartDHW
CONF_TOP141 = "top141" # Quiet Mode Priority
TYPES = [
CONF_TOP4,
@ -70,6 +73,9 @@ TYPES = [
CONF_TOP125,
CONF_TOP126,
CONF_TOP130,
CONF_TOP139,
CONF_TOP140,
CONF_TOP141,
]
PanasonicHeatpumpTextSensor = panasonic_heatpump_ns.class_(
@ -165,6 +171,15 @@ CONFIG_SCHEMA = cv.Schema(
PanasonicHeatpumpTextSensor,
icon=ICON_BIVALENT,
),
cv.Optional(CONF_TOP139): text_sensor.text_sensor_schema(
PanasonicHeatpumpTextSensor,
),
cv.Optional(CONF_TOP140): text_sensor.text_sensor_schema(
PanasonicHeatpumpTextSensor,
),
cv.Optional(CONF_TOP141): text_sensor.text_sensor_schema(
PanasonicHeatpumpTextSensor,
),
}
).extend(cv.COMPONENT_SCHEMA)

View File

@ -127,6 +127,21 @@ void PanasonicHeatpumpTextSensor::publish_new_state(const std::vector<uint8_t>&
if (this->has_state() && this->get_state() == new_state)
return;
break;
case TextSensorIds::CONF_TOP139:
new_state = PanasonicDecode::getTextState(PanasonicDecode::HeatingControl, PanasonicDecode::getBit5and6(data[30]));
if (this->has_state() && this->get_state() == new_state)
return;
break;
case TextSensorIds::CONF_TOP140:
new_state = PanasonicDecode::getTextState(PanasonicDecode::SmartDHW, PanasonicDecode::getBit1and2(data[24]));
if (this->has_state() && this->get_state() == new_state)
return;
break;
case TextSensorIds::CONF_TOP141:
new_state = PanasonicDecode::getTextState(PanasonicDecode::QuietModePriority, PanasonicDecode::getBit3and4(data[11]));
if (this->has_state() && this->get_state() == new_state)
return;
break;
default:
return;
};

View File

@ -386,6 +386,12 @@ text_sensor:
name: "ThreeWay Valve State2"
top130:
name: "Bivalent Mode"
top139:
name: "HeatingControl"
top140:
name: "SmartDHW"
top141:
name: "Quiet Mode Priority"
number:
- platform: panasonic_heatpump
@ -502,6 +508,14 @@ select:
name: "Set External PadHeater"
set35:
name: "Set Bivalent Mode"
set39:
name: "Set Heating Control"
set40:
name: "Set Smart DHW"
set41:
name: "Set Quiet Mode Priority"
set42:
name: "Set Pump Flow Rate Mode"
climate:
- platform: panasonic_heatpump