You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (AllSensors == false) // Check whether individual zone sensors has been activated
320
+
{
321
+
result = m_sql.safe_query("SELECT HardwareID, DeviceID FROM DeviceStatus WHERE (HardwareID==%d) AND (Type==%d) AND (Unit >= 13) AND (Unit <= 24)", m_HwdID, (int)pTypeEvohomeZone);
322
+
if (result.size() != 0)
323
+
AllSensors = true;
324
+
// Check if the dummy sensor exists and delete
325
+
result = m_sql.safe_query("SELECT HardwareID, DeviceID FROM DeviceStatus WHERE (HardwareID==%d) AND (DeviceID == 'FFFFFF') AND (Type==%d) AND (Unit == 13)", m_HwdID, (int)pTypeEvohomeZone);
326
+
if (result.size() != 0)
327
+
m_sql.safe_query("DELETE FROM DeviceStatus WHERE (HardwareID==%d) AND (DeviceID=='FFFFFF' AND (Type==%d) AND (Unit == 13))", m_HwdID, (int)pTypeEvohomeZone);
if(tsen.EVOHOME2.temperature!=0x7FFF)//afaik this is the error value just ignore it right now as we have no way to report errors...also perhaps could be returned if DHW is not installed?
result = m_sql.safe_query("SELECT Unit FROM DeviceStatus WHERE (HardwareID==%d) AND (DeviceID == '%q') AND (Type == %d)", m_HwdID, zstrid.c_str(), (int)pTypeEvohomeZone);
1145
+
if (result.size() != 0) // Update existing temp sensor with value directly from sensor
else// If matching relay with same deviceID then create a new Zone Temp sensor with zone number offset by 12
1152
+
{
1153
+
result = m_sql.safe_query("SELECT Unit FROM DeviceStatus WHERE (HardwareID==%d) AND (DeviceID == '%q') AND (Type == %d)", m_HwdID, zstrid.c_str(), (int)pTypeEvohomeRelay);
Log(true,LOG_STATUS,"evohome: %s: WARNING: got a sensor temperature msg with an unexpected payload size: %d", tag, msg.payloadsize);
1119
1165
}
@@ -1917,6 +1963,21 @@ namespace http {
1917
1963
}
1918
1964
elseif (type == "OutdoorSensor")
1919
1965
nID = pEvoHW->Bind(0, CEvohomeID::devSensor);
1966
+
elseif (type == "AllSensors")
1967
+
{
1968
+
// Check if All Sensors has already been activated, if not create a temporary dummy sensor
1969
+
std::vector<std::vector<std::string> > result;
1970
+
result = m_sql.safe_query("SELECT HardwareID, DeviceID FROM DeviceStatus WHERE (HardwareID==%d) AND (Type==%d) AND (Unit > 12) AND (Unit <= 24)", HwdID, (int)pTypeEvohomeZone);
0 commit comments