mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 09:19:51 +03:00
started adding emsplus
This commit is contained in:
13
src/ems.cpp
13
src/ems.cpp
@@ -57,7 +57,8 @@ void _process_RC35StatusMessage(uint8_t type, uint8_t * data, uint8_t length);
|
||||
|
||||
// Easy
|
||||
void _process_EasyStatusMessage(uint8_t type, uint8_t * data, uint8_t length);
|
||||
|
||||
//EMS Plus
|
||||
void _process_EmsPlusStatusMessage(uint8_t type, uint8_t * data, uint8_t length);
|
||||
/*
|
||||
* Recognized EMS types and the functions they call to process the telegrams
|
||||
* Format: MODEL ID, TYPE ID, Description, function
|
||||
@@ -114,6 +115,8 @@ const _EMS_Type EMS_Types[] = {
|
||||
// Easy
|
||||
{EMS_MODEL_EASY, EMS_TYPE_EasyStatusMessage, "EasyStatusMessage", _process_EasyStatusMessage},
|
||||
{EMS_MODEL_BOSCHEASY, EMS_TYPE_EasyStatusMessage, "EasyStatusMessage", _process_EasyStatusMessage},
|
||||
//Ems plus
|
||||
{EMSP_MODEL_RC10, EMS_TYPE_EmsPlusStatusMessage, "EasyStatusMessage", _process_EmsPlusStatusMessage}
|
||||
|
||||
|
||||
};
|
||||
@@ -241,7 +244,7 @@ void ems_init() {
|
||||
strlcpy(EMS_Thermostat.version, "not set", sizeof(EMS_Thermostat.version));
|
||||
|
||||
// default logging is none
|
||||
ems_setLogging(EMS_SYS_LOGGING_DEFAULT);
|
||||
ems_setLogging(EMS_SYS_LOGGING_THERMOSTAT);
|
||||
}
|
||||
|
||||
// Getters and Setters for parameters
|
||||
@@ -1036,7 +1039,11 @@ void _process_EasyStatusMessage(uint8_t type, uint8_t * data, uint8_t length) {
|
||||
|
||||
EMS_Sys_Status.emsRefreshed = true; // triggers a send the values back via MQTT
|
||||
}
|
||||
|
||||
void _process_EmsPlusStatusMessage(uint8_t type, uint8_t * data, uint8_t length) {
|
||||
myDebug("The type is ", type);
|
||||
myDebug("The data is ", data);
|
||||
myDebug("The length is ", length);
|
||||
}
|
||||
/**
|
||||
* type 0xB0 - for reading the mode from the RC10 thermostat (0x17)
|
||||
* received only after requested
|
||||
|
||||
@@ -83,7 +83,10 @@
|
||||
#define EMS_TYPE_EasyStatusMessage 0x0A // reading values on an Easy Thermostat
|
||||
#define EMS_TYPE_EasyStatusMessage_setpoint 10 // setpoint temp
|
||||
#define EMS_TYPE_EasyStatusMessage_curr 8 // current temp
|
||||
|
||||
// Ems plus
|
||||
#define EMS_TYPE_EmsPlusStatusMessage 0x00 // reading values on an Easy Thermostat
|
||||
#define EMS_TYPE_EmsPlusStatusMessage_setpoint 0 // setpoint temp
|
||||
#define EMS_TYPE_EmsPlusStatusMessage_curr 0 // current temp
|
||||
// Known EMS types
|
||||
typedef enum {
|
||||
EMS_MODEL_NONE,
|
||||
@@ -102,7 +105,9 @@ typedef enum {
|
||||
EMS_MODEL_EASY,
|
||||
EMS_MODEL_BOSCHEASY,
|
||||
EMS_MODEL_RC310,
|
||||
EMS_MODEL_CW100
|
||||
EMS_MODEL_CW100,
|
||||
//Ems plus
|
||||
EMSP_MODEL_RC10
|
||||
|
||||
} _EMS_MODEL_ID;
|
||||
|
||||
@@ -140,6 +145,6 @@ const _Thermostat_Type Thermostat_Types[] = {
|
||||
{EMS_MODEL_BOSCHEASY, 206, 0x02, "Bosch Easy", EMS_THERMOSTAT_READ_YES, EMS_THERMOSTAT_WRITE_NO},
|
||||
{EMS_MODEL_RC310, 158, 0x10, "RC310", EMS_THERMOSTAT_READ_NO, EMS_THERMOSTAT_WRITE_NO},
|
||||
{EMS_MODEL_CW100, 255, 0x18, "Bosch CW100", EMS_THERMOSTAT_READ_NO, EMS_THERMOSTAT_WRITE_NO},
|
||||
{EMS_MODEL_RC10, 165, 0x02, "RC10/Nefit Moduline 1010)", EMS_THERMOSTAT_READ_YES, EMS_THERMOSTAT_WRITE_YES},
|
||||
{EMSP_MODEL_RC10, 165, 0x02, "RC10/Nefit Moduline 1010)", EMS_THERMOSTAT_READ_YES, EMS_THERMOSTAT_WRITE_YES},
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user