set first active hc for mqtt and terminal commands, some fixes for #410

This commit is contained in:
MichaelDvP
2020-06-25 10:28:58 +02:00
parent 1c73af88d2
commit c644990c14
8 changed files with 62 additions and 11 deletions

View File

@@ -216,7 +216,11 @@ void Solar::process_SM100Energy(std::shared_ptr<const Telegram> telegram) {
void Solar::process_ISM1StatusMessage(std::shared_ptr<const Telegram> telegram) {
telegram->read_value(collectorTemp_, 4); // Collector Temperature
telegram->read_value(bottomTemp_, 6); // Temperature Bottom of Solar Boiler
telegram->read_value(energyLastHour_, 0); // Solar Energy produced in last hour - is * 10 and handled in ems-esp.cpp
uint16_t Wh = 0xFFFF;
telegram->read_value(Wh, 2); // Solar Energy produced in last hour only ushort, is not * 10
if (Wh != 0xFFFF) {
energyLastHour_ = Wh * 10; // set to *10
}
telegram->read_bitvalue(pump_, 8, 0); // Solar pump on (1) or off (0)
telegram->read_value(pumpWorkMin_, 10, 3); // force to 3 bytes
}