Skip to content

Commit

Permalink
wip(odyssee): implemented latest findings
Browse files Browse the repository at this point in the history
  • Loading branch information
tspopp committed Feb 11, 2025
1 parent 9692e05 commit 4080e1a
Show file tree
Hide file tree
Showing 17 changed files with 448 additions and 369 deletions.
2 changes: 2 additions & 0 deletions AquaMQTT/include/message/IMainMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ enum class MAIN_ATTR_FLOAT
EVAPORATOR_LOWER_TEMPERATURE,
COMPRESSOR_OUTLET_TEMPERATURE,
FAN_SPEED_PWM,
WATER_UPPER_TEMPERATURE,
WATER_LOWER_TEMPERATURE,
};

enum class MAIN_ATTR_BOOL
Expand Down
4 changes: 2 additions & 2 deletions AquaMQTT/include/message/legacy/HMIMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace aquamqtt::message::legacy
class HMIMessage : public IHMIMessage
{
public:
explicit HMIMessage(uint8_t* data, uint8_t* previous = nullptr);
explicit HMIMessage(uint8_t* data, const uint8_t* previous = nullptr);

~HMIMessage() override = default;

Expand Down Expand Up @@ -43,7 +43,7 @@ class HMIMessage : public IHMIMessage
bool hasChanged(HMI_ATTR_STR attr) const override;

private:
void compareWith(uint8_t* data);
void compareWith(const uint8_t* data);

bool mCreatedWithoutPrevious;
std::set<HMI_ATTR_U8> mHasChangedU8;
Expand Down
4 changes: 2 additions & 2 deletions AquaMQTT/include/message/legacy/MainStatusMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace aquamqtt::message::legacy
class MainStatusMessage : public IMainMessage
{
public:
explicit MainStatusMessage(uint8_t* data, uint8_t* previous = nullptr);
explicit MainStatusMessage(uint8_t* data, const uint8_t* previous = nullptr);

~MainStatusMessage() override = default;

Expand All @@ -39,7 +39,7 @@ class MainStatusMessage : public IMainMessage
bool hasChanged(MAIN_ATTR_U16 attr) const override;

private:
void compareWith(uint8_t* data);
void compareWith(const uint8_t* data);

bool mCreatedWithoutPrevious;
uint8_t* mData;
Expand Down
4 changes: 2 additions & 2 deletions AquaMQTT/include/message/next/HMIMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace aquamqtt::message::next
class HMIMessage : public IHMIMessage
{
public:
explicit HMIMessage(uint8_t* data, uint8_t* previous = nullptr);
explicit HMIMessage(uint8_t* data, const uint8_t* previous = nullptr);

~HMIMessage() override = default;

Expand Down Expand Up @@ -43,7 +43,7 @@ class HMIMessage : public IHMIMessage
bool hasChanged(HMI_ATTR_STR attr) const override;

private:
void compareWith(uint8_t* data);
void compareWith(const uint8_t* data);

bool mCreatedWithoutPrevious;
std::set<HMI_ATTR_U8> mHasChangedU8;
Expand Down
4 changes: 2 additions & 2 deletions AquaMQTT/include/message/next/MainStatusMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace aquamqtt::message::next
class MainStatusMessage : public IMainMessage
{
public:
explicit MainStatusMessage(uint8_t* data, uint8_t* previous = nullptr);
explicit MainStatusMessage(uint8_t* data, const uint8_t* previous = nullptr);

~MainStatusMessage() override = default;

Expand All @@ -39,7 +39,7 @@ class MainStatusMessage : public IMainMessage
bool hasChanged(MAIN_ATTR_U16 attr) const override;

private:
void compareWith(uint8_t* data);
void compareWith(const uint8_t* data);

bool mCreatedWithoutPrevious;
uint8_t* mData;
Expand Down
4 changes: 2 additions & 2 deletions AquaMQTT/include/message/odyssee/HMIMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace aquamqtt::message::odyssee
class HMIMessage : public IHMIMessage
{
public:
explicit HMIMessage(uint8_t* data, uint8_t* previous = nullptr);
explicit HMIMessage(uint8_t* data, const uint8_t* previous = nullptr);

~HMIMessage() override = default;

Expand Down Expand Up @@ -43,7 +43,7 @@ class HMIMessage : public IHMIMessage
bool hasChanged(HMI_ATTR_STR attr) const override;

private:
void compareWith(uint8_t* data);
void compareWith(const uint8_t* data);

bool mCreatedWithoutPrevious;
std::set<HMI_ATTR_U8> mHasChangedU8;
Expand Down
4 changes: 2 additions & 2 deletions AquaMQTT/include/message/odyssee/MainStatusMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace aquamqtt::message::odyssee
class MainStatusMessage : public IMainMessage
{
public:
explicit MainStatusMessage(uint8_t* data, uint8_t* previous = nullptr);
explicit MainStatusMessage(uint8_t* data, const uint8_t* previous = nullptr);

~MainStatusMessage() override = default;

Expand All @@ -39,7 +39,7 @@ class MainStatusMessage : public IMainMessage
bool hasChanged(MAIN_ATTR_U16 attr) const override;

private:
void compareWith(uint8_t* data);
void compareWith(const uint8_t* data);

bool mCreatedWithoutPrevious;
uint8_t* mData;
Expand Down
6 changes: 4 additions & 2 deletions AquaMQTT/include/mqtt/MQTTDefinitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ constexpr char ENUM_UNKNOWN[] = { "UNKNOWN" };
constexpr char ENUM_AQUAMQTT_MODE_LISTENER[] = { "LISTENER" };
constexpr char ENUM_AQUAMQTT_MODE_MITM[] = { "MITM" };

constexpr char ENUM_AQUAMQTT_PROTOCOL_LEGACY[] = { "LEGACY" };
constexpr char ENUM_AQUAMQTT_PROTOCOL_LEGACY[] = { "LEGACY" };
constexpr char ENUM_AQUAMQTT_PROTOCOL_NEXT[] = { "NEXT" };
constexpr char ENUM_AQUAMQTT_PROTOCOL_ODYSSEE[] = { "ODYSSEE" };
constexpr char ENUM_AQUAMQTT_PROTOCOL_ODYSSEE[] = { "ODYSSEE" };

constexpr char ENUM_BRAND_ATLANTIC[] = { "Atlantic" };
constexpr char ENUM_BRAND_THERMOR[] = { "Thermor" };
Expand Down Expand Up @@ -79,6 +79,8 @@ constexpr char ENUM_AQUAMQTT_OVERRIDE_MODE_PV_FULL[] = { "PV BOOST" };
// Subtopics
constexpr char MAIN_ERROR_CODE[] = { "errorCode" };
constexpr char MAIN_HOT_WATER_TEMP[] = { "waterTemp" };
constexpr char MAIN_HOT_WATER_TEMP_LOWER[] = { "waterTempLower" };
constexpr char MAIN_HOT_WATER_TEMP_UPPER[] = { "waterTempUpper" };
constexpr char MAIN_SUPPLY_AIR_TEMP[] = { "supplyAirTemp" };
constexpr char MAIN_EVAPORATOR_AIR_TEMP_UPPER[] = { "evaporatorAirTemp" };
constexpr char MAIN_EVAPORATOR_AIR_TEMP_LOWER[] = { "evaporatorAirTempLower" };
Expand Down
4 changes: 4 additions & 0 deletions AquaMQTT/include/task/MQTTTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ class MQTTTask
float mHotWaterTempFiltered;
SimpleKalmanFilter mCompressorTempFilter;
float mCompressorTempFiltered;
SimpleKalmanFilter mHotWaterTempUpperFilter;
float mHotWaterTempUpperFiltered;
SimpleKalmanFilter mHotWaterTempLowerFilter;
float mHotWaterTempLowerFiltered;

// helper to avoid code duplication
void publishFloat(const char* subtopic, const char* topic, float value, bool retained = false);
Expand Down
Loading

0 comments on commit 4080e1a

Please sign in to comment.