Skip to content

Commit cb09fac

Browse files
committed
Added files via upload
1 parent 685e79b commit cb09fac

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

main/WebServer.cpp

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ namespace http {
458458
RegisterCommandCode("downloadready", boost::bind(&CWebServer::Cmd_DownloadReady, this, _1, _2, _3));
459459
RegisterCommandCode("deletedatapoint", boost::bind(&CWebServer::Cmd_DeleteDatePoint, this, _1, _2, _3));
460460

461+
RegisterCommandCode("setactivetimerplan", boost::bind(&CWebServer::Cmd_SetActiveTimerPlan, this, _1, _2, _3));
461462
RegisterCommandCode("addtimer", boost::bind(&CWebServer::Cmd_AddTimer, this, _1, _2, _3));
462463
RegisterCommandCode("updatetimer", boost::bind(&CWebServer::Cmd_UpdateTimer, this, _1, _2, _3));
463464
RegisterCommandCode("deletetimer", boost::bind(&CWebServer::Cmd_DeleteTimer, this, _1, _2, _3));
@@ -481,6 +482,8 @@ namespace http {
481482
RegisterCommandCode("addsetpointtimer", boost::bind(&CWebServer::Cmd_AddSetpointTimer, this, _1, _2, _3));
482483
RegisterCommandCode("updatesetpointtimer", boost::bind(&CWebServer::Cmd_UpdateSetpointTimer, this, _1, _2, _3));
483484
RegisterCommandCode("deletesetpointtimer", boost::bind(&CWebServer::Cmd_DeleteSetpointTimer, this, _1, _2, _3));
485+
RegisterCommandCode("enablesetpointtimer", boost::bind(&CWebServer::Cmd_EnableSetpointTimer, this, _1, _2, _3));
486+
RegisterCommandCode("disablesetpointtimer", boost::bind(&CWebServer::Cmd_DisableSetpointTimer, this, _1, _2, _3));
484487
RegisterCommandCode("clearsetpointtimers", boost::bind(&CWebServer::Cmd_ClearSetpointTimers, this, _1, _2, _3));
485488

486489
RegisterCommandCode("serial_devices", boost::bind(&CWebServer::Cmd_GetSerialDevices, this, _1, _2, _3));
@@ -578,6 +581,7 @@ namespace http {
578581
m_pWebEm->RegisterPageCode("/ozwcp/admpost.html", boost::bind(&CWebServer::ZWaveCPAdminCommand, this, _1, _2, _3));
579582
m_pWebEm->RegisterPageCode("/ozwcp/nodepost.html", boost::bind(&CWebServer::ZWaveCPNodeChange, this, _1, _2, _3));
580583
m_pWebEm->RegisterPageCode("/ozwcp/savepost.html", boost::bind(&CWebServer::ZWaveCPSaveConfig, this, _1, _2, _3));
584+
m_pWebEm->RegisterPageCode("/ozwcp/thpost.html", boost::bind(&CWebServer::ZWaveCPTestHeal, this, _1, _2, _3));
581585
m_pWebEm->RegisterPageCode("/ozwcp/topopost.html", boost::bind(&CWebServer::ZWaveCPGetTopo, this, _1, _2, _3));
582586
m_pWebEm->RegisterPageCode("/ozwcp/statpost.html", boost::bind(&CWebServer::ZWaveCPGetStats, this, _1, _2, _3));
583587
//grouppost.html
@@ -2106,7 +2110,7 @@ namespace http {
21062110
machine = "armv7l";
21072111
}
21082112

2109-
if (((machine != "armv6l") && (machine != "armv7l") && (systemname!="windows") && (machine != "x86_64")) || (strstr(my_uname.release, "ARCH+") != NULL))
2113+
if (((machine != "armv6l") && (machine != "armv7l") && (systemname!="windows") && (machine != "x86_64") && (machine != "aarch64")) || (strstr(my_uname.release, "ARCH+") != NULL))
21102114
szHistoryURL = "http://www.domoticz.com/download.php?channel=beta&type=history";
21112115
else
21122116
szHistoryURL = "http://www.domoticz.com/download.php?channel=beta&type=history&system=" + systemname + "&machine=" + machine;
@@ -3539,7 +3543,7 @@ namespace http {
35393543
std::map<std::string, std::string> selectorStatuses;
35403544
GetSelectorSwitchStatuses(options, selectorStatuses);
35413545
bool levelOffHidden = options["LevelOffHidden"] == "true";
3542-
for(int i = 0; i < selectorStatuses.size(); i++) {
3546+
for(int i = 0; i < (int)selectorStatuses.size(); i++) {
35433547
if (levelOffHidden && (i == 0)) {
35443548
continue;
35453549
}
@@ -8546,7 +8550,8 @@ namespace http {
85468550
sprintf(szTmp, "%.03f m3", musage);
85478551
break;
85488552
case MTYPE_WATER:
8549-
sprintf(szTmp, "%llu Liter", total_real);
8553+
musage = float(total_real) / (WaterDivider/1000.0f);
8554+
sprintf(szTmp, "%d Liter", round(musage));
85508555
break;
85518556
case MTYPE_COUNTER:
85528557
sprintf(szTmp, "%llu %s", total_real, ValueUnits.c_str());
@@ -12603,15 +12608,15 @@ namespace http {
1260312608
{
1260412609
std::vector<std::string> sd = *itt;
1260512610

12606-
if (method == 0)
12611+
//If method == 1, provide BOTH hourly and instant usage for combined graph
1260712612
{
1260812613
//bars / hour
1260912614
std::string actDateTimeHour = sd[2].substr(0, 13);
12610-
if (actDateTimeHour != LastDateTime)
12615+
if (actDateTimeHour != LastDateTime || ((method == 1) && (itt + 1 == result.end())))
1261112616
{
1261212617
if (bHaveFirstValue)
1261312618
{
12614-
root["result"][ii]["d"] = LastDateTime + ":00";
12619+
root["result"][ii]["d"] = LastDateTime + (method == 1 ? ":30" : ":00");
1261512620

1261612621
long long ulTotalValue = ulLastValue - ulFirstValue;
1261712622
if (ulTotalValue == 0)
@@ -12637,7 +12642,7 @@ namespace http {
1263712642
sprintf(szTmp, "%.1f", TotalValue);
1263812643
break;
1263912644
}
12640-
root["result"][ii]["v"] = szTmp;
12645+
root["result"][ii][method==1 ? "eu" : "v"] = szTmp;
1264112646
ii++;
1264212647
}
1264312648
LastDateTime = actDateTimeHour;
@@ -12661,7 +12666,8 @@ namespace http {
1266112666
ulFirstRealValue = ulLastValue;
1266212667
}
1266312668
}
12664-
else
12669+
12670+
if (method == 1)
1266512671
{
1266612672
std::stringstream s_str1(sd[1]);
1266712673
long long actValue;

0 commit comments

Comments
 (0)