mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
AddedISM1SolarPumpWorkingTime
Added ISM1 Solar Pump Working Time
This commit is contained in:
@@ -461,6 +461,10 @@ void showInfo() {
|
|||||||
_renderShortValue("Bottom temperature", "C", EMS_SolarModule.bottomTemp);
|
_renderShortValue("Bottom temperature", "C", EMS_SolarModule.bottomTemp);
|
||||||
_renderIntValue("Pump modulation", "%", EMS_SolarModule.pumpModulation);
|
_renderIntValue("Pump modulation", "%", EMS_SolarModule.pumpModulation);
|
||||||
_renderBoolValue("Pump active", EMS_SolarModule.pump);
|
_renderBoolValue("Pump active", EMS_SolarModule.pump);
|
||||||
|
myDebug_P(PSTR("Pump working time: %d days %d hours %d minutes"),
|
||||||
|
EMS_SolarModule.pumpWorkMin / 1440,
|
||||||
|
(EMS_SolarModule.pumpWorkMin % 1440) / 60,
|
||||||
|
EMS_SolarModule.pumpWorkMin % 60);
|
||||||
_renderShortValue("Energy Last Hour", "Wh", EMS_SolarModule.EnergyLastHour, 1); // *10
|
_renderShortValue("Energy Last Hour", "Wh", EMS_SolarModule.EnergyLastHour, 1); // *10
|
||||||
_renderShortValue("Energy Today", "Wh", EMS_SolarModule.EnergyToday, 0);
|
_renderShortValue("Energy Today", "Wh", EMS_SolarModule.EnergyToday, 0);
|
||||||
_renderShortValue("Energy Total", "kWH", EMS_SolarModule.EnergyTotal, 1); // *10
|
_renderShortValue("Energy Total", "kWH", EMS_SolarModule.EnergyTotal, 1); // *10
|
||||||
@@ -785,6 +789,10 @@ void publishValues(bool force) {
|
|||||||
rootSM[SM_PUMP] = _bool_to_char(s, EMS_SolarModule.pump);
|
rootSM[SM_PUMP] = _bool_to_char(s, EMS_SolarModule.pump);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (EMS_SolarModule.pumpWorkMin != EMS_VALUE_LONG_NOTSET) {
|
||||||
|
rootSM[SM_PUMPWORKMIN] = (double)EMS_SolarModule.pumpWorkMin;
|
||||||
|
}
|
||||||
|
|
||||||
if (abs(EMS_SolarModule.EnergyLastHour) != EMS_VALUE_SHORT_NOTSET)
|
if (abs(EMS_SolarModule.EnergyLastHour) != EMS_VALUE_SHORT_NOTSET)
|
||||||
rootSM[SM_ENERGYLASTHOUR] = (double)EMS_SolarModule.EnergyLastHour / 10;
|
rootSM[SM_ENERGYLASTHOUR] = (double)EMS_SolarModule.EnergyLastHour / 10;
|
||||||
|
|
||||||
|
|||||||
23
src/ems.cpp
23
src/ems.cpp
@@ -305,17 +305,17 @@ void ems_init() {
|
|||||||
EMS_Boiler.pump_mod_min = EMS_VALUE_INT_NOTSET; // Boiler circuit pump modulation min. power
|
EMS_Boiler.pump_mod_min = EMS_VALUE_INT_NOTSET; // Boiler circuit pump modulation min. power
|
||||||
|
|
||||||
// Solar Module values
|
// Solar Module values
|
||||||
EMS_SolarModule.collectorTemp = EMS_VALUE_SHORT_NOTSET; // collector temp from SM10/SM100
|
EMS_SolarModule.collectorTemp = EMS_VALUE_SHORT_NOTSET; // collector temp from SM10/SM100
|
||||||
EMS_SolarModule.bottomTemp = EMS_VALUE_SHORT_NOTSET; // bottom temp from SM10/SM100
|
EMS_SolarModule.bottomTemp = EMS_VALUE_SHORT_NOTSET; // bottom temp from SM10/SM100
|
||||||
EMS_SolarModule.pumpModulation = EMS_VALUE_INT_NOTSET; // modulation solar pump SM10/SM100
|
EMS_SolarModule.pumpModulation = EMS_VALUE_INT_NOTSET; // modulation solar pump SM10/SM100
|
||||||
EMS_SolarModule.pump = EMS_VALUE_INT_NOTSET; // pump active
|
EMS_SolarModule.pump = EMS_VALUE_INT_NOTSET; // pump active
|
||||||
EMS_SolarModule.setpoint_maxBottomTemp = EMS_VALUE_SHORT_NOTSET; //setpoint for maximum solar boiler temperature
|
EMS_SolarModule.EnergyLastHour = EMS_VALUE_SHORT_NOTSET;
|
||||||
EMS_SolarModule.EnergyLastHour = EMS_VALUE_SHORT_NOTSET;
|
EMS_SolarModule.EnergyToday = EMS_VALUE_SHORT_NOTSET;
|
||||||
EMS_SolarModule.EnergyToday = EMS_VALUE_SHORT_NOTSET;
|
EMS_SolarModule.EnergyTotal = EMS_VALUE_SHORT_NOTSET;
|
||||||
EMS_SolarModule.EnergyTotal = EMS_VALUE_SHORT_NOTSET;
|
EMS_SolarModule.device_id = EMS_ID_NONE;
|
||||||
EMS_SolarModule.device_id = EMS_ID_NONE;
|
EMS_SolarModule.model_id = EMS_MODEL_NONE;
|
||||||
EMS_SolarModule.model_id = EMS_MODEL_NONE;
|
EMS_SolarModule.product_id = EMS_ID_NONE;
|
||||||
EMS_SolarModule.product_id = EMS_ID_NONE;
|
EMS_SolarModule.pumpWorkMin = EMS_VALUE_LONG_NOTSET;
|
||||||
|
|
||||||
// Other EMS devices values
|
// Other EMS devices values
|
||||||
EMS_Other.HPModulation = EMS_VALUE_INT_NOTSET;
|
EMS_Other.HPModulation = EMS_VALUE_INT_NOTSET;
|
||||||
@@ -1509,6 +1509,7 @@ void _process_ISM1StatusMessage(_EMS_RxTelegram * EMS_RxTelegram) {
|
|||||||
EMS_SolarModule.bottomTemp = _toShort(6); // Temperature Bottom of Solar Boiler
|
EMS_SolarModule.bottomTemp = _toShort(6); // Temperature Bottom of Solar Boiler
|
||||||
EMS_SolarModule.EnergyLastHour = _toShort(2) * 10; // Solar Energy produced in last hour
|
EMS_SolarModule.EnergyLastHour = _toShort(2) * 10; // Solar Energy produced in last hour
|
||||||
EMS_SolarModule.pump = _bitRead(8, 0); // Solar pump on (1) or off (0)
|
EMS_SolarModule.pump = _bitRead(8, 0); // Solar pump on (1) or off (0)
|
||||||
|
EMS_SolarModule.pumpWorkMin = _toLong(10);
|
||||||
// EMS_Other.SM = true;
|
// EMS_Other.SM = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -276,6 +276,7 @@ typedef struct {
|
|||||||
int16_t EnergyLastHour;
|
int16_t EnergyLastHour;
|
||||||
int16_t EnergyToday;
|
int16_t EnergyToday;
|
||||||
int16_t EnergyTotal;
|
int16_t EnergyTotal;
|
||||||
|
uint32_t pumpWorkMin; // Total solar pump operating time
|
||||||
uint8_t device_id; // the device ID of the Solar Module / Heat Pump (e.g. 0x30)
|
uint8_t device_id; // the device ID of the Solar Module / Heat Pump (e.g. 0x30)
|
||||||
uint8_t model_id; // Solar Module / Heat Pump model (e.g. 3 > EMS_MODEL_OTHER )
|
uint8_t model_id; // Solar Module / Heat Pump model (e.g. 3 > EMS_MODEL_OTHER )
|
||||||
uint8_t product_id; // (e.g. 101)
|
uint8_t product_id; // (e.g. 101)
|
||||||
|
|||||||
@@ -57,6 +57,7 @@
|
|||||||
#define SM_ENERGYLASTHOUR "energylasthour" // energy last hour
|
#define SM_ENERGYLASTHOUR "energylasthour" // energy last hour
|
||||||
#define SM_ENERGYTODAY "energytoday" // energy today
|
#define SM_ENERGYTODAY "energytoday" // energy today
|
||||||
#define SM_ENERGYTOTAL "energytotal" // energy total
|
#define SM_ENERGYTOTAL "energytotal" // energy total
|
||||||
|
#define SM_PUMPWORKMIN "pumpWorkMin" // Total minutes
|
||||||
|
|
||||||
// MQTT for HP (HeatPump)
|
// MQTT for HP (HeatPump)
|
||||||
#define TOPIC_HP_DATA "hp_data" // topic name
|
#define TOPIC_HP_DATA "hp_data" // topic name
|
||||||
|
|||||||
Reference in New Issue
Block a user