Änderungen

Wechseln zu: Navigation, Suche

HM-ES-TX-WM/Strom-Script01

1.985 Byte hinzugefügt, 19:29, 12. Feb. 2015
<br/><br/><br/><br/><br/><br/><br/><br/><br/>Es werden folgende Systemvariablen für Script 1 und Script 2 benötigt:
{| border="1" cellpadding="1" cellspacing="1"
&nbsp;
<div style="background:#eee; border:1px solid #ccc; padding:5px 10px">
:<code>!! Energy Costs Part 3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br/>!!<br/>!! Berechnet die verbrauchten kWh seit der letzten Abrechnung des Energielieferanten<br/>!!<br/>!! kann beliebig oft laufen<br/>!!<br/>!! 02/15&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br/>!! (c) by thkl<br/>!!<br/>!! Benötigte SystemVariablen:<br/>!! Name&nbsp;: eLastInvoice Typ:Zahl -> hier den Zählerstand der letzten Energieabrechnung in kWh eintragen.<br/>!! Name&nbsp;: eStart Typ: Zeichenkette -> hier den aktuellen Zählerstand und den Zählerstand des Energiemessgerätes in ganzen kWh eintragen und zwar wie folgt:<br/>!! Zählerstand EZähler|Zählerstand HM Zähler (Beispiel 17456|5&nbsp;; wenn der Schwarze Kasten im E-Verteiler 17456 zeigt und gleichzeitig das HM Gerät 5) Achtung das HM Gerät zählt in WattStunden<br/>!! also / 1000<br/>!! Name&nbsp;: eUsedEnergyCost Typ: Zahl Einheit&nbsp;:EUR&nbsp;<br/>!! Name&nbsp;: eUsedEnergyCount Typ: Zahl Einheit&nbsp;:kWh<br/>!! Name&nbsp;: eTotalEnergyCount Typ: Zahl Einheit&nbsp;:kWh<br/>!! Energiekosten werden nach Scriptlauf in eUsedEnergyCost gespeichert<br/>!! Verbrauchte KwH werden nach Scriptlauf in eUsedEnergyCount gespeichert<br/>!! aktueller Stand des Stromzählers wird in eTotalEnergyCount gespeichert</code><br/><div id="bloop_customfont" style="margin: 0px;"><div id="bloop_customfont" style="margin: 0px;"><div style="color: rgb(0, 0, 0); font-family: Helvetica, Arial;"><code>!! useAsGasCounter = 0 - E Zähler&nbsp;; = 1 Gas Zähler</code></div><div style="color: rgb(0, 0, 0); font-family: Helvetica, Arial;"><code>!! cuxddevice = Seriennummer des CuxD Exec Devices. Wenn nicht vorhanden leer lassen dann wird system.exec genommen</code></div><div style="color: rgb(0, 0, 0); font-family: Helvetica, Arial;"><br/></div><div style="color: rgb(0, 0, 0); font-family: Helvetica, Arial;"><br/></div></div></div><div id="bloop_customfont" style="font-family: Helvetica, Arial; color: rgb(0, 0, 0); margin: 0px;"><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var serialCounter = "";</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var useAsGasCounter = 0;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var cuxddevice = "";</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>!! ================ ab hier nichts mehr aendern</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var dpname = "ENERGY_COUNTER";</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>if (useAsGasCounter==1) {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; dpname = "GAS_ENERGY_COUNTER";</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>}</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var svLastInvoice = dom.GetObject("eLastInvoice");</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var svMemory = dom.GetObject("eStart");</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var svUsedEnergyCost = dom.GetObject("eUsedEnergyCost");</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var svUsedEnergyCount = dom.GetObject("eUsedEnergyCount");</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var svTotalEnergyCount = dom.GetObject("eTotalEnergyCount");</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var memory = svMemory.State();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var countLastIncoice = svLastInvoice.State();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>object devEnergyDP = dom.GetObject("BidCos-RF."#serialCounter#":1."#dpname);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real oec = memory.StrValueByIndex("|",0).ToFloat();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real shc = memory.StrValueByIndex("|",1).ToFloat();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real chc = devEnergyDP.State();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>string stdout;string stderr;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>string cmd = "/bin/sh -c 'cat /etc/config/energyPrice|sed -r \"s/\\"//g\"'";</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>if (cuxddevice!="") {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; dom.GetObject("CUxD."#cuxddevice#":1.CMD_SETS").State(cmd);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; dom.GetObject("CUxD."#cuxddevice#":1.CMD_QUERY_RET").State(1);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; stdout = dom.GetObject("CUxD."#cuxddevice#":1.CMD_RETS").State();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>} else {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; system.Exec(cmd, &stdout, &stderr);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>}</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>string sep = "\n";</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>string part;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>string strCur;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real pricekwh=0;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real condvalue=0;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real heatvalue=0;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>foreach(part,stdout.Split(sep)) {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; string key = part.StrValueByIndex(":",0);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; string val = part.StrValueByIndex(":",1);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp;&nbsp;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; if (useAsGasCounter==1) {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; if (key=="gasHeatingValue"){</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; &nbsp; heatvalue = val.ToFloat();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; }</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; if (key=="gasConditionNumber"){</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; &nbsp; condvalue = val.ToFloat();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; }</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; if (key=="gasPrice"){</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; &nbsp; pricekwh = val.ToFloat();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; }</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; } else {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; &nbsp; if (key=="curPrice"){</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; &nbsp; pricekwh = val.ToFloat();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; }</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; }</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; if (key=="currency") {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; &nbsp; strCur=val;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; }</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>}</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>if (useAsGasCounter==1) {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real cec = (chc - shc)+oec;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real uec = cec-countLastIncoice.ToFloat();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real consumtion = heatvalue * condvalue * uec;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real costyear = pricekwh * consumtion;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>svUsedEnergyCost.State(costyear);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>svUsedEnergyCount.State(uec);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>svTotalEnergyCount.State(cec);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>} else {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; &nbsp; &nbsp; &nbsp; real cec = ((chc/1000) - shc)+oec;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real uec = cec-countLastIncoice.ToFloat();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real costyear = pricekwh * (uec);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>svUsedEnergyCost.State(costyear);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>svUsedEnergyCount.State(uec);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>svTotalEnergyCount.State(cec);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>}</code></div><div><br/></div></div><code>!! serialCounter mit Seriennummer des HM Zählers füllen</code>:<code>!! Energy Costs Part 3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br/>!!<br/>!! Berechnet die verbrauchten kWh/m3 seit der letzten Abrechnung des Energielieferanten<br/>!!<br/>!! kann beliebig oft laufen<br/>!!<br/>!! 02/15&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br/>!! (c) by thkl<br/>!!<br/>!! Benötigte SystemVariablen:<br/>!! Name&nbsp;: eLastInvoice Typ:Zahl -> hier den Zählerstand der letzten Energieabrechnung in kWh oder m3 eintragen.<br/>!! Name&nbsp;: eStart Typ: Zeichenkette -> hier den aktuellen Zählerstand und den Zählerstand des Energiemessgerätes in ganzen kWh eintragen und zwar wie folgt:<br/>!! Zählerstand EZähler|Zählerstand HM Zähler (Beispiel 17456|5&nbsp;; wenn der Schwarze Kasten im E-Verteiler 17456 zeigt und gleichzeitig das HM Gerät 5) Achtung das HM Gerät zählt in WattStunden (alternativ natürlich die Gaszählerwerte)<br/>!! also / 1000<br/>!! Name&nbsp;: eUsedEnergyCost Typ: Zahl Einheit&nbsp;:EUR&nbsp;<br/>!! Name&nbsp;: eUsedEnergyCount Typ: Zahl Einheit&nbsp;:kWh oder m3<br/>!! Name&nbsp;: eTotalEnergyCount Typ: Zahl Einheit&nbsp;:kWh oder m3<br/>!! Energiekosten werden nach Scriptlauf in eUsedEnergyCost gespeichert<br/>!! Verbrauchte KwH werden nach Scriptlauf in eUsedEnergyCount gespeichert<br/>!! aktueller Stand des Stromzählers wird in eTotalEnergyCount gespeichert</code><br/><div id="bloop_customfont" style="margin: 0px;"><div id="bloop_customfont" style="margin: 0px;"><div style="color: rgb(0, 0, 0); font-family: Helvetica, Arial;"><code>!! useAsGasCounter = 0 - E Zähler&nbsp;; = 1 Gas Zähler</code></div><div style="color: rgb(0, 0, 0); font-family: Helvetica, Arial;"><code>!! cuxddevice = Seriennummer des CuxD Exec Devices. Wenn nicht vorhanden leer lassen dann wird system.exec genommen</code></div><div style="color: rgb(0, 0, 0); font-family: Helvetica, Arial;"><br/></div><div style="color: rgb(0, 0, 0); font-family: Helvetica, Arial;"><br/></div></div></div><div id="bloop_customfont" style="font-family: Helvetica, Arial; color: rgb(0, 0, 0); margin: 0px;"><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var serialCounter = "";</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var useAsGasCounter = 0;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var cuxddevice = "";</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>!! ================ ab hier nichts mehr aendern</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var dpname = "ENERGY_COUNTER";</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>if (useAsGasCounter==1) {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; dpname = "GAS_ENERGY_COUNTER";</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>}</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var svLastInvoice = dom.GetObject("eLastInvoice");</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var svMemory = dom.GetObject("eStart");</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var svUsedEnergyCost = dom.GetObject("eUsedEnergyCost");</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var svUsedEnergyCount = dom.GetObject("eUsedEnergyCount");</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var svTotalEnergyCount = dom.GetObject("eTotalEnergyCount");</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var memory = svMemory.State();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>var countLastIncoice = svLastInvoice.State();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>object devEnergyDP = dom.GetObject("BidCos-RF."#serialCounter#":1."#dpname);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real oec = memory.StrValueByIndex("|",0).ToFloat();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real shc = memory.StrValueByIndex("|",1).ToFloat();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real chc = devEnergyDP.State();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>string stdout;string stderr;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>string cmd = "/bin/sh -c 'cat /etc/config/energyPrice|sed -r \"s/\\"//g\"'";</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>if (cuxddevice!="") {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; dom.GetObject("CUxD."#cuxddevice#":1.CMD_SETS").State(cmd);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; dom.GetObject("CUxD."#cuxddevice#":1.CMD_QUERY_RET").State(1);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; stdout = dom.GetObject("CUxD."#cuxddevice#":1.CMD_RETS").State();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>} else {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; system.Exec(cmd, &stdout, &stderr);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>}</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>string sep = "\n";</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>string part;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>string strCur;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real pricekwh=0;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real condvalue=0;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>real heatvalue=0;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>foreach(part,stdout.Split(sep)) {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; string key = part.StrValueByIndex(":",0);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; string val = part.StrValueByIndex(":",1);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp;&nbsp;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; if (useAsGasCounter==1) {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; if (key=="gasHeatingValue"){</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; &nbsp; heatvalue = val.ToFloat();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; }</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; if (key=="gasConditionNumber"){</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; &nbsp; condvalue = val.ToFloat();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; }</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; if (key=="gasPrice"){</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; &nbsp; pricekwh = val.ToFloat();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; }</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; } else {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; &nbsp; if (key=="curPrice"){</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; &nbsp; pricekwh = val.ToFloat();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; }</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; }</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; if (key=="currency") {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; &nbsp; strCur=val;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; }</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>}</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><br/></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>if (useAsGasCounter==1) {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code></code><span style="color: rgb(0, 0, 0); font-family: monospace; line-height: 19.5px; background-color: rgb(238, 238, 238);">&nbsp; &nbsp; &nbsp; &nbsp;</span><code>real cec = (chc - shc)+oec;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code></code><span style="color: rgb(0, 0, 0); font-family: monospace; line-height: 19.5px; background-color: rgb(238, 238, 238);">&nbsp; &nbsp; &nbsp; &nbsp;</span><code>real uec = cec-countLastIncoice.ToFloat();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code></code><span style="color: rgb(0, 0, 0); font-family: monospace; line-height: 19.5px; background-color: rgb(238, 238, 238);">&nbsp; &nbsp; &nbsp; &nbsp;</span><code>real consumtion = heatvalue * condvalue * uec;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code></code><span style="color: rgb(0, 0, 0); font-family: monospace; line-height: 19.5px; background-color: rgb(238, 238, 238);">&nbsp; &nbsp; &nbsp; &nbsp;</span><code>real costyear = pricekwh * consumtion;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code></code><span style="color: rgb(0, 0, 0); font-family: monospace; line-height: 19.5px; background-color: rgb(238, 238, 238);">&nbsp; &nbsp; &nbsp; &nbsp;</span><code>svUsedEnergyCost.State(costyear);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code></code><span style="color: rgb(0, 0, 0); font-family: monospace; line-height: 19.5px; background-color: rgb(238, 238, 238);">&nbsp; &nbsp; &nbsp; &nbsp;</span><code>svUsedEnergyCount.State(uec);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code></code><span style="color: rgb(0, 0, 0); font-family: monospace; line-height: 19.5px; background-color: rgb(238, 238, 238);">&nbsp; &nbsp; &nbsp; &nbsp;</span><code>svTotalEnergyCount.State(cec);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>} else {</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>&nbsp; &nbsp; &nbsp; &nbsp;real cec = ((chc/1000) - shc)+oec;</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code></code><span style="color: rgb(0, 0, 0); font-family: monospace; line-height: 19.5px; background-color: rgb(238, 238, 238);">&nbsp; &nbsp; &nbsp; &nbsp;</span><code>real uec = cec-countLastIncoice.ToFloat();</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code></code><span style="color: rgb(0, 0, 0); font-family: monospace; line-height: 19.5px; background-color: rgb(238, 238, 238);">&nbsp; &nbsp; &nbsp; &nbsp;</span><code>real costyear = pricekwh * (uec);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code></code><span style="color: rgb(0, 0, 0); font-family: monospace; line-height: 19.5px; background-color: rgb(238, 238, 238);">&nbsp; &nbsp; &nbsp; &nbsp;</span><code>svUsedEnergyCost.State(costyear);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code></code><span style="color: rgb(0, 0, 0); font-family: monospace; line-height: 19.5px; background-color: rgb(238, 238, 238);">&nbsp; &nbsp; &nbsp; &nbsp;</span><code>svUsedEnergyCount.State(uec);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code></code><span style="color: rgb(0, 0, 0); font-family: monospace; line-height: 19.5px; background-color: rgb(238, 238, 238);">&nbsp; &nbsp; &nbsp; &nbsp;</span><code>svTotalEnergyCount.State(cec);</code></div><div id="bloop_customfont" style="line-height: 19.5px; margin: 0px;"><code>}</code></div><div><br/></div></div>
</div>
&nbsp;
16
Bearbeitungen