Skip to content

Commit 198c20b

Browse files
committed
energy device optimizations and correct labelling
1 parent 96842c3 commit 198c20b

File tree

9 files changed

+5
-41
lines changed

9 files changed

+5
-41
lines changed

main/SQLHelper.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2432,10 +2432,6 @@ bool CSQLHelper::OpenDatabase()
24322432
if (nValue < 1)
24332433
nValue = 5;
24342434
m_ShortLogInterval = nValue;
2435-
if (!GetPreferencesVar("DisplayPowerUsageInkWhGraph", nValue))
2436-
{
2437-
UpdatePreferencesVar("DisplayPowerUsageInkWhGraph", 1);
2438-
}
24392435
//Start background thread
24402436
if (!StartThread())
24412437
return false;

main/WebServer.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6549,7 +6549,6 @@ namespace http {
65496549
}
65506550
m_sql.UpdatePreferencesVar("DoorbellCommand", atoi(request::findValue(&req, "DoorbellCommand").c_str()));
65516551
m_sql.UpdatePreferencesVar("SmartMeterType", atoi(request::findValue(&req, "SmartMeterType").c_str()));
6552-
m_sql.UpdatePreferencesVar("DisplayPowerUsageInkWhGraph", atoi(request::findValue(&req, "DisplayPowerUsageInkWhGraph").c_str()));
65536552

65546553
std::string EnableTabFloorplans = request::findValue(&req, "EnableTabFloorplans");
65556554
m_sql.UpdatePreferencesVar("EnableTabFloorplans", (EnableTabFloorplans == "on" ? 1 : 0));
@@ -11142,10 +11141,6 @@ namespace http {
1114211141
{
1114311142
root["SmartMeterType"] = nValue;
1114411143
}
11145-
else if (Key == "DisplayPowerUsageInkWhGraph")
11146-
{
11147-
root["DisplayPowerUsageInkWhGraph"] = nValue;
11148-
}
1114911144
else if (Key == "EnableTabFloorplans")
1115011145
{
1115111146
root["EnableTabFloorplans"] = nValue;
@@ -12295,19 +12290,6 @@ namespace http {
1229512290
if ((dType == pTypeYouLess) && ((metertype == MTYPE_ENERGY) || (metertype == MTYPE_ENERGY_GENERATED)))
1229612291
method = 1;
1229712292

12298-
int iDisplayInPower = 1;
12299-
m_sql.GetPreferencesVar("DisplayPowerUsageInkWhGraph", iDisplayInPower);
12300-
if (!iDisplayInPower)
12301-
{
12302-
// Force Value graph even if device should show Value graph
12303-
if ((method == 1) && (
12304-
((dType == pTypeENERGY) && ((dSubType == sTypeELEC2) || (dSubType == sTypeELEC3))) ||
12305-
((dType == pTypeGeneral) && (dSubType == sTypeKwh))
12306-
)) {
12307-
//_log.Log(LOG_ERROR, "Energy/CMxxx or General/kWh device graph method should be 0!");
12308-
method = 0;
12309-
}
12310-
}
1231112293
if (method != 0)
1231212294
{
1231312295
//realtime graph

www/app/SetupController.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,6 @@ define(['app'], function (app) {
447447
if (typeof data.SmartMeterType != 'undefined') {
448448
$("#p1metertable #comboP1MeterType").val(data.SmartMeterType);
449449
}
450-
if (typeof data.DisplayPowerUsageInkWhGraph != 'undefined') {
451-
$("#kwhshortlogtable #combokWhShotlogDisplay").val(data.DisplayPowerUsageInkWhGraph);
452-
}
453450
if (typeof data.EnableTabFloorplans != 'undefined') {
454451
$("#activemenustable #EnableTabFloorplans").prop('checked',data.EnableTabFloorplans==1);
455452
}

www/html5.appcache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# ref 1251
2+
# ref 1254
33

44
CACHE:
55
# CSS

www/images/down2.png

1.7 KB
Loading

www/images/up2.png

1.76 KB
Loading

www/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ <h2 data-i18n="Year">Year</h2>
10411041
<a class="btnstylerev" onclick="ShowP1YearReportGas(0)" data-i18n="Back">Back</a>&nbsp;
10421042
<h1 id="theader" data-i18n="Usage this Month">Usage this Month</h1>
10431043
<br>
1044-
<span data-i18n="Total Usage">Total Usage</span>: <span id="tu">-</span> <span id="munit">m3</span><br>
1044+
<span data-i18n="Total Usage" id="spanmonthgastotalusage">Total Usage</span>: <span id="tu">-</span> <span id="munit">m3</span><br>
10451045
<span data-i18n="Monthly Cost">Monthly Cost</span>: <span id="mc">-</span><br>
10461046
<br>
10471047
</div>
@@ -1067,7 +1067,7 @@ <h1 id="theader" data-i18n="Usage this Year">Usage this Year</h1>
10671067
</tr>
10681068
</table>
10691069
<br>
1070-
<span data-i18n="Total Usage">Total Usage</span>: <span id="tu">-</span> <span id="munit">m3</span><br>
1070+
<span data-i18n="Total Usage" id="spanyeargastotalusage">Total Usage</span>: <span id="tu">-</span> <span id="munit">m3</span><br>
10711071
<span data-i18n="Counter">Counter</span>: <span id="cntr">-</span><br>
10721072
<span data-i18n="Year Cost">Year Cost</span>: <span id="mc">-</span><br>
10731073
<br>
@@ -1197,7 +1197,7 @@ <h1 id="theader"></h1>
11971197
<th width="30" align="right" data-i18n="Day">Day</th>
11981198
<th width="70" align="left"></th>
11991199
<th width="60" align="right" data-i18n="Counter">Counter</th>
1200-
<th width="60" align="right" data-i18n="Usage">Usage</th>
1200+
<th width="60" align="right" data-i18n="Usage" id="thmonthgasusage">Usage</th>
12011201
<th width="60" align="right" data-i18n="Costs">Costs</th>
12021202
<th width="40" align="right">&lt;&gt;</th>
12031203
</tr>
@@ -1211,7 +1211,7 @@ <h1 id="theader"></h1>
12111211
<thead>
12121212
<tr valign="middle">
12131213
<th width="30" align="right" data-i18n="Month">Month</th>
1214-
<th width="60" align="right" data-i18n="Usage">Usage</th>
1214+
<th width="60" align="right" data-i18n="Usage" id="thyeargasusage">Usage</th>
12151215
<th width="60" align="right" data-i18n="Costs">Costs</th>
12161216
<th width="40" align="right">&lt;&gt;</th>
12171217
</tr>

www/js/domoticz.js.gz

850 Bytes
Binary file not shown.

www/views/setup.html

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -769,17 +769,6 @@ <h2><span data-i18n="P1 Smart Meter Type"></span>:</h2>
769769
</select></td>
770770
</tr>
771771
</table>
772-
<br>
773-
<h2><span data-i18n="General/kWh Day Graph with Power">General/kWh Day Graph with Power</span>:</h2>
774-
<table class="display" id="kwhshortlogtable" border="0" cellpadding="0" cellspacing="0">
775-
<tr>
776-
<td align="right" style="width:60px"><label><span data-i18n="Display"></span>: </label></td>
777-
<td><select id="combokWhShotlogDisplay" name="DisplayPowerUsageInkWhGraph" style="width:180px" class="combobox ui-corner-all">
778-
<option value="0" data-i18n="Energy day graph">Energy day graph</option>
779-
<option value="1" data-i18n="Power day graph">Power day graph</option>
780-
</select></td>
781-
</tr>
782-
</table>
783772
</section>
784773
</div>
785774
<div class="tab-pane" id="tabfloorplan">

0 commit comments

Comments
 (0)