Skip to content

Commit

Permalink
Add support for wpl13
Browse files Browse the repository at this point in the history
  • Loading branch information
kr0ner committed Dec 4, 2024
1 parent ae2fb81 commit a84e578
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 1 deletion.
3 changes: 2 additions & 1 deletion esp32-poe-technik.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ packages:
watermeter: !include OneESP32ToRuleThemAll/yaml/watermeter.yaml
sensors: !include OneESP32ToRuleThemAll/yaml/sensors.yaml
# thz404: !include OneESP32ToRuleThemAll/yaml/thz404.yaml
thz504: !include OneESP32ToRuleThemAll/yaml/thz504.yaml
# thz504: !include OneESP32ToRuleThemAll/yaml/thz504.yaml
# thz55eco: !include OneESP32ToRuleThemAll/yaml/thz5_5_eco.yaml
# ttf07: !include OneESP32ToRuleThemAll/yaml/ttf07.yaml
wpl13: !include OneESP32ToRuleThemAll/yaml/wpl13.yaml
kondensatpumpe: !include OneESP32ToRuleThemAll/yaml/kondensatpumpe.yaml

#########################################
Expand Down
5 changes: 5 additions & 0 deletions src/communication.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ struct CanMember {
static const CanMember ESPClient{0x6a2, "ESPClient"};
static const CanMember Anfrage{0x6a1, "Anfrage"};
static const CanMember Kessel{0x180, "Kessel"};
#if defined(WPL_13)
static const CanMember HK1{0x480, "HK1"};
static const CanMember HK2{0x500, "HK2"};
#else
static const CanMember HK1{0x301, "HK1"};
static const CanMember HK2{0x302, "HK2"};
#endif

using Request = std::pair<const CanMember, const Property>;
static std::queue<Request> request_queue;
Expand Down
6 changes: 6 additions & 0 deletions src/property.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ struct Property : public detail::Property {
PROPERTY(ANLAGENFROST, 0x0a00, Type::et_dec_val);
PROPERTY(WW_ECO, 0x0a06, Type::et_dec_val);
#endif

#if defined(WPL_13)
PROPERTY(VERDICHTER_STARTS, 0xc0f4);
PROPERTY(VERDICHTER_STARTS_K, 0xc0f5);
PROPERTY(VORLAUFISTTEMP, 0x000f, Type::et_dec_val);
#endif
};

#endif
58 changes: 58 additions & 0 deletions yaml/wpl13.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
esphome:
platformio_options:
build_flags:
- "-DWPL_13"

packages:
COMMON: !include { file: common.yaml}

#########################################
# #
# CANbus configuration #
# #
#########################################
canbus:
- id: !extend wp_can
on_frame:

#########################################
# #
# KESSEL messages #
# #
#########################################
- can_id: 0x180
then:
- lambda: |-
const auto property_value_pair = processCanMessage(x);
Property property{property_value_pair.first};
SimpleVariant value{property_value_pair.second};
auto callback = CallbackHandler::instance().getCallback(std::make_pair(Kessel,property));
callback(value);
#########################################
# #
# HK1 messages #
# #
#########################################
- can_id: 0x480
then:
- lambda: |-
const auto property_value_pair = processCanMessage(x);
Property property{property_value_pair.first};
SimpleVariant value{property_value_pair.second};
auto callback = CallbackHandler::instance().getCallback(std::make_pair(HK1,property));
callback(value);
#########################################
# #
# HK2 messages #
# #
#########################################
- can_id: 0x500
then:
- lambda: |-
const auto property_value_pair = processCanMessage(x);
Property property{property_value_pair.first};
SimpleVariant value{property_value_pair.second};
auto callback = CallbackHandler::instance().getCallback(std::make_pair(HK2,property));
callback(value);

0 comments on commit a84e578

Please sign in to comment.