add mqtt-subscription for WWcirculation

This commit is contained in:
MichaelDvP
2020-01-12 13:46:05 +01:00
parent 041203936e
commit fc13004093
4 changed files with 34 additions and 1 deletions

View File

@@ -1013,13 +1013,33 @@ void ems_setWarmWaterOnetime(bool activated) {
EMS_TxTelegram.timestamp = millis(); // set timestamp
EMS_Sys_Status.txRetryCount = 0; // reset retry counter
EMS_TxTelegram.action = EMS_TX_TELEGRAM_WRITE;
EMS_TxTelegram.dest = EMS_Boiler.device_id;
EMS_TxTelegram.type = EMS_TYPE_UBAFlags;
EMS_TxTelegram.offset = EMS_OFFSET_UBAParameterWW_wwOneTime;
EMS_TxTelegram.length = EMS_MIN_TELEGRAM_LENGTH;
EMS_TxTelegram.type_validate = EMS_ID_NONE; // don't validate
EMS_TxTelegram.dataValue = (activated ? 0x22 : 0x02); // 0x22 is on, 0x02 is off for RC20RF
EMS_TxQueue.push(EMS_TxTelegram);
}
/**
* Activate / De-activate circulation of warm water 0x35
* true = on, false = off
*/
void ems_setWarmWaterCirculation(bool activated) {
myDebug_P(PSTR("Setting boiler warm water circulation %s"), activated ? "on" : "off");
_EMS_TxTelegram EMS_TxTelegram = EMS_TX_TELEGRAM_NEW; // create new Tx
EMS_TxTelegram.timestamp = millis(); // set timestamp
EMS_Sys_Status.txRetryCount = 0; // reset retry counter
EMS_TxTelegram.action = EMS_TX_TELEGRAM_WRITE;
EMS_TxTelegram.dest = EMS_Boiler.device_id;
EMS_TxTelegram.type = EMS_TYPE_UBAFlags;
EMS_TxTelegram.offset = EMS_OFFSET_UBAParameterWW_wwOneTime;
EMS_TxTelegram.length = EMS_MIN_TELEGRAM_LENGTH+1;
EMS_TxTelegram.type_validate = EMS_ID_NONE; // don't validate
// EMS_TxTelegram.dataValue = (activated ? 0x22 : 0x02); // 0x22 is on, 0x02 is off for RC20RF
EMS_TxTelegram.data[4] = 0x11;
EMS_TxTelegram.data[5] = (activated ? 0x33 : 0x11);