This commit is contained in:
Paul
2019-11-13 22:22:51 +01:00
parent f7dda6bd54
commit b56e12f33e
5 changed files with 26 additions and 4 deletions

View File

@@ -103,7 +103,7 @@ static const command_t project_cmds[] PROGMEM = {
{true, "tx_mode <n>", "changes Tx logic. 1=EMS generic, 2=EMS+, 3=HT3"}, {true, "tx_mode <n>", "changes Tx logic. 1=EMS generic, 2=EMS+, 3=HT3"},
{false, "info", "show current values deciphered from the EMS messages"}, {false, "info", "show current values deciphered from the EMS messages"},
{false, "log <n | b | t | s | r | j | v>", "set logging mode to none, basic, thermostat only, solar module only, raw, jabber or verbose"}, {false, "log <n | b | t | s | r | j | v | number>", "set logging to none, basic, thermostat, solar module, raw, jabber, verbose or specific type"},
#ifdef TESTS #ifdef TESTS
{false, "test <n>", "insert a test telegram on to the EMS bus"}, {false, "test <n>", "insert a test telegram on to the EMS bus"},

View File

@@ -48,6 +48,9 @@ void _process_UBATotalUptimeMessage(_EMS_RxTelegram * EMS_RxTelegram);
void _process_UBAParametersMessage(_EMS_RxTelegram * EMS_RxTelegram); void _process_UBAParametersMessage(_EMS_RxTelegram * EMS_RxTelegram);
void _process_SetPoints(_EMS_RxTelegram * EMS_RxTelegram); void _process_SetPoints(_EMS_RxTelegram * EMS_RxTelegram);
// EMS+ specific
void _process_UBAOutdoorTemp(_EMS_RxTelegram * EMS_RxTelegram);
// SM10 // SM10
void _process_SM10Monitor(_EMS_RxTelegram * EMS_RxTelegram); void _process_SM10Monitor(_EMS_RxTelegram * EMS_RxTelegram);
@@ -120,6 +123,9 @@ const _EMS_Type EMS_Types[] = {
{EMS_TYPE_UBAParametersMessage, "UBAParametersMessage", _process_UBAParametersMessage}, {EMS_TYPE_UBAParametersMessage, "UBAParametersMessage", _process_UBAParametersMessage},
{EMS_TYPE_UBASetPoints, "UBASetPoints", _process_SetPoints}, {EMS_TYPE_UBASetPoints, "UBASetPoints", _process_SetPoints},
// UBA/Boiler EMS+
{EMS_TYPE_UBAOutdoorTemp, "UBAOutdoorTemp", _process_UBAOutdoorTemp},
// Solar Module devices // Solar Module devices
{EMS_TYPE_SM10Monitor, "SM10Monitor", _process_SM10Monitor}, {EMS_TYPE_SM10Monitor, "SM10Monitor", _process_SM10Monitor},
{EMS_TYPE_SM100Monitor, "SM100Monitor", _process_SM100Monitor}, {EMS_TYPE_SM100Monitor, "SM100Monitor", _process_SM100Monitor},
@@ -1307,9 +1313,12 @@ void _process_UBAMonitorFast(_EMS_RxTelegram * EMS_RxTelegram) {
/** /**
* UBAMonitorSlow - type 0x19 - central heating monitor part 2 (27 bytes long) * UBAMonitorSlow - type 0x19 - central heating monitor part 2 (27 bytes long)
* received every 60 seconds * received every 60 seconds
* e.g. 08 00 19 00 80 00 02 41 80 00 00 00 00 00 03 91 7B 05 B8 40 00 00 00 04 92 AD 00 5E EE 80 00 (CRC=C9) #data=27
*/ */
void _process_UBAMonitorSlow(_EMS_RxTelegram * EMS_RxTelegram) { void _process_UBAMonitorSlow(_EMS_RxTelegram * EMS_RxTelegram) {
EMS_Boiler.extTemp = _toShort(0); // 0x8000 if not available if (_toShort(0) != EMS_VALUE_USHORT_NOTSET) { // 0x8000 if not available
EMS_Boiler.extTemp = _toShort(0);
}
// set boiler temp only if we actually have a real value // set boiler temp only if we actually have a real value
if (_toShort(2) != EMS_VALUE_USHORT_NOTSET) { if (_toShort(2) != EMS_VALUE_USHORT_NOTSET) {
@@ -1323,6 +1332,15 @@ void _process_UBAMonitorSlow(_EMS_RxTelegram * EMS_RxTelegram) {
EMS_Boiler.switchTemp = _toShort(25); EMS_Boiler.switchTemp = _toShort(25);
} }
/**
* UBAOutdoorTemp - type 0xD1 - external temperature
*/
void _process_UBAOutdoorTemp(_EMS_RxTelegram * EMS_RxTelegram) {
if (_toShort(0) != EMS_VALUE_USHORT_NOTSET) { // 0x8000 if not available
EMS_Boiler.extTemp = _toShort(0);
}
}
/** /**
* type 0xB1 - data from the RC10 thermostat (0x17) * type 0xB1 - data from the RC10 thermostat (0x17)
* For reading the temp values only * For reading the temp values only

View File

@@ -32,6 +32,9 @@
#define EMS_TYPE_UBASetPoints 0x1A #define EMS_TYPE_UBASetPoints 0x1A
#define EMS_TYPE_UBAFunctionTest 0x1D #define EMS_TYPE_UBAFunctionTest 0x1D
// EMS+ specific
#define EMS_TYPE_UBAOutdoorTemp 0xD1 // external temp
#define EMS_OFFSET_UBAParameterWW_wwtemp 2 // WW Temperature #define EMS_OFFSET_UBAParameterWW_wwtemp 2 // WW Temperature
#define EMS_OFFSET_UBAParameterWW_wwactivated 1 // WW Activated #define EMS_OFFSET_UBAParameterWW_wwactivated 1 // WW Activated
#define EMS_OFFSET_UBAParameterWW_wwOneTime 0x00 // WW OneTime loading #define EMS_OFFSET_UBAParameterWW_wwOneTime 0x00 // WW OneTime loading

View File

@@ -108,7 +108,7 @@ char * _ushort_to_char(char * s, uint16_t value, uint8_t decimals) {
} }
// takes a signed short value (2 bytes), converts to a fraction and prints it // takes a signed short value (2 bytes), converts to a fraction and prints it
// decimals: 0 = no division, 1=divide value by 10, 2=divide by 2, 10=divide value by 100 // decimals: 0=no division, 1=divide value by 10 (default), 2=divide by 2, 10=divide value by 100
void _renderShortValue(const char * prefix, const char * postfix, int16_t value, uint8_t decimals) { void _renderShortValue(const char * prefix, const char * postfix, int16_t value, uint8_t decimals) {
static char buffer[200] = {0}; static char buffer[200] = {0};
static char s[20] = {0}; static char s[20] = {0};

View File

@@ -54,7 +54,8 @@ static const char * TEST_DATA[] = {
"88 00 19 00 00 DC 80 00 80 00 FF FF 00 00 00 21 9A 06 E1 7C 00 00 00 06 C2 13 00 1E 90 80 00", // test 49 - check max length "88 00 19 00 00 DC 80 00 80 00 FF FF 00 00 00 21 9A 06 E1 7C 00 00 00 06 C2 13 00 1E 90 80 00", // test 49 - check max length
"30 00 FF 00 02 8E 00 00 41 82 00 00 28 36 00 00 82 21", // test 50 - SM100 "30 00 FF 00 02 8E 00 00 41 82 00 00 28 36 00 00 82 21", // test 50 - SM100
"10 00 FF 08 01 B9 26", // test 51 - EMS+ 0x1B9 set temp "10 00 FF 08 01 B9 26", // test 51 - EMS+ 0x1B9 set temp
"10 00 F7 00 FF 01 B9 21 E9" // test 52 - EMS+ 0x1B9 F7 test "10 00 F7 00 FF 01 B9 21 E9", // test 52 - EMS+ 0x1B9 F7 test
"08 00 D1 00 00 80" // test 53 - outdoor temp
}; };