Ich hoffe ihr könnt mir bei meinem Problem weiter helfen.
Für das Display setzte ich den Script-Helper und Script welches nur die geänderten Werte an das Display senden sollte. Beides ist aus Tom's Quelle.
Ich hatte den Eindruck dass der DutyCyle etwas zu hoch ist. Deshalb bin ich dieser Vermutung etwas nachgegangen.
Mit Script-Testen in der CCU habe ich dies durchgeführt.
Der Inhalt meiner Variable "EPAPER_Buero.Lines" sieht wie folgend aus:
Code: Alles auswählen
/1 '@p03@t01@f4826.6 °C@p7839 %' /2 '@p03@t02@p4825.4 °C@p7840 %' /3 '@p03@t03@p78Aus ' /4 '@p03@t04@p4824.7 °C@p7850 %' /5 '@p03@t05@p4824.5 °C@p7842 %' /6 '@p03@t06@p4824.5 °C@p7845 %' /7 '@p03@t07@p4824.5 °C@p7848 %' /8 '@p03@t08@p4825.4 °C@p7844 %' /9 '@p03@t09@p4824.2 °C@p7843 %' /10 '@p03@t10@p78Aus'
Den Code habe ich etwas angepasst damit ich mehr Infos erhalte:
Code: Alles auswählen
! Werte Aussenfühler Nord
string tempAUT_N = dom.GetObject('CUxD.CUX9002001:1.TEMPERATURE').Value().ToString(1) # " °C";
string humAUT_N = dom.GetObject('CUxD.CUX9002001:1.HUMIDITY').Value().ToString(0) # " %";
! Werte Aussenfühler Süd
string tempAUT_S = dom.GetObject('CUxD.CUX9002005:1.TEMPERATURE').Value().ToString(1) # " °C";
string humAUT_S = dom.GetObject('CUxD.CUX9002005:1.HUMIDITY').Value().ToString(0) # " %";
! Werte Fühler Wohnzimmer
string tempRA_Wohnzimmer = dom.GetObject('CUxD.CUX9002002:1.TEMPERATURE').Value().ToString(1) # " °C";
string humRA_Wohnzimmer = dom.GetObject('CUxD.CUX9002002:1.HUMIDITY').Value().ToString(0) # " %";
! Werte Fühler Büro
string tempRA_Buero = dom.GetObject('CUxD.CUX9002004:1.TEMPERATURE').Value().ToString(1) # " °C";
string humRA_Buero = dom.GetObject('CUxD.CUX9002004:1.HUMIDITY').Value().ToString(0) # " %";
! Werte Fühler Gästezimmer
string tempRA_Gaestezimmer = dom.GetObject('CUxD.CUX9002007:1.TEMPERATURE').Value().ToString(1) # " °C";
string humRA_Gaestezimmer = dom.GetObject('CUxD.CUX9002007:1.HUMIDITY').Value().ToString(0) # " %";
! Werte Fühler MOBA
string tempRA_MOBA = dom.GetObject('CUxD.CUX9002010:1.TEMPERATURE').Value().ToString(1) # " °C";
string humRA_MOBA = dom.GetObject('CUxD.CUX9002010:1.HUMIDITY').Value().ToString(0) # " %";
! Werte Fühler Schlafzimmer
string tempRA_Schlafzimmer = dom.GetObject('BidCos-RF.IJ-CO2-001:1.TEMPERATURE').Value().ToString(1) # " °C";
string humRA_Schlafzimmer = dom.GetObject('BidCos-RF.IJ-CO2-001:1.HUMIDITY').Value().ToString(0) # " %";
! Werte Fühler Dusche
string tempRA_Dusche = dom.GetObject('CUxD.CUX9002006:1.TEMPERATURE').Value().ToString(1) # " °C";
string humRA_Dusche = dom.GetObject('CUxD.CUX9002006:1.HUMIDITY').Value().ToString(0) # " %";
! Lüftung Stufen auswerten
! Status Lüftung Aus
if ((dom.GetObject('BidCos-RF.OEQ1662144:1.STATE').Value() == false) && ((dom.GetObject('BidCos-RF.OEQ1662144:2.STATE').Value()) == false)) {
string LueftungStatus = "Aus ";
! Status Lüftung Stufe 1
} elseif (dom.GetObject('BidCos-RF.OEQ1662144:1.STATE').Value() == true) {
string LueftungStatus = "St.1";
}
! Status Lüftung Stufe 2
if (dom.GetObject('BidCos-RF.OEQ1868733:1.STATE').Value() == true) {
string LueftungStatus = "St.2";
}
! Status Lüftung Stufe 3
if (dom.GetObject('BidCos-RF.OEQ1662144:2.STATE').Value() == true) {
string LueftungStatus = "St.3";
}
! Natel Ladung auswerten auswerten
if (dom.GetObject('BidCos-RF.MEQ1323481:1.STATE').Value() == false) {
string LadungStatus = "Aus";
} elseif (dom.GetObject('BidCos-RF.MEQ1323481:1.STATE').Value() == true) {
string LadungStatus = "Ein";
}
string line1 = "/1 '@p03@t01@f48" # tempAUT_N # "@p78" # humAUT_N # "'";
string line2 = "/2 '@p03@t02@p48" # tempAUT_S # "@p78" # humAUT_S # "'";
string line3 = "/3 '@p03@t03@p78" # LueftungStatus # "'";
string line4 = "/4 '@p03@t04@p48" # tempRA_Wohnzimmer # "@p78" # humRA_Wohnzimmer # "'";
string line5 = "/5 '@p03@t05@p48" # tempRA_Buero # "@p78" # humRA_Buero # "'";
string line6 = "/6 '@p03@t06@p48" # tempRA_Gaestezimmer # "@p78" # humRA_Gaestezimmer # "'";
string line7 = "/7 '@p03@t07@p48" # tempRA_MOBA # "@p78" # humRA_MOBA # "'";
string line8 = "/8 '@p03@t08@p48" # tempRA_Schlafzimmer # "@p78" # humRA_Schlafzimmer # "'";
string line9 = "/9 '@p03@t09@p48" # tempRA_Dusche # "@p78" # humRA_Dusche # "'";
string line10 = "/10 '@p03@t10@p78" # LadungStatus # "'";
string lastLines = dom.GetObject("EPAPER_Buero.Lines").Value();
string index;
string linesDoNotUpdate = "";
integer i = 0;
WriteLine(lastLines);
WriteLine(index);
foreach (index, lastLines) {
if (index.Substr(0, 2) == "/1") {
WriteLine(index.Substr(0, 2) # "Linie1");
WriteLine(index);
i = i+1;
if (index == line1) {
linesDoNotUpdate = linesDoNotUpdate # "L01";
}
} elseif (index.Substr(0, 2) == "/2") {
WriteLine(index.Substr(0, 2));
WriteLine(index);
i = i+1;
if (index == line2) {
linesDoNotUpdate = linesDoNotUpdate # "L02";
}
} elseif (index.Substr(0, 2) == "/3") {
WriteLine(index.Substr(0, 2));
WriteLine(index);
i = i+1;
if (index == line3) {
linesDoNotUpdate = linesDoNotUpdate # "L03";
}
} elseif (index.Substr(0, 2) == "/4") {
WriteLine(index.Substr(0, 2));
WriteLine(index);
i = i+1;
if (index == line4) {
linesDoNotUpdate = linesDoNotUpdate # "L04";
}
} elseif (index.Substr(0, 2) == "/5") {
WriteLine(index.Substr(0, 2));
WriteLine(index);
i = i+1;
if (index == line5) {
linesDoNotUpdate = linesDoNotUpdate # "L05";
}
} elseif (index.Substr(0, 2) == "/6") {
WriteLine(index.Substr(0, 2));
WriteLine(index);
i = i+1;
if (index == line6) {
linesDoNotUpdate = linesDoNotUpdate # "L06";
}
} elseif (index.Substr(0, 2) == "/7") {
WriteLine(index.Substr(0, 2));
WriteLine(index);
i = i+1;
if (index == line7) {
linesDoNotUpdate = linesDoNotUpdate # "L07";
}
} elseif (index.Substr(0, 2) == "/8") {
WriteLine(index.Substr(0, 2));
WriteLine(index);
i = i+1;
if (index == line8) {
linesDoNotUpdate = linesDoNotUpdate # "L08";
}
} elseif (index.Substr(0, 2) == "/9") {
WriteLine(index.Substr(0, 2));
WriteLine(index);
i = i+1;
if (index == line9) {
linesDoNotUpdate = linesDoNotUpdate # "L09";
}
} elseif (index.Substr(0, 3) == "/10") {
WriteLine(index.Substr(0, 3) # "10");
WriteLine(index.Substr(0, 10));
WriteLine(index);
i = i+1;
if (index == line10) {
linesDoNotUpdate = linesDoNotUpdate # "L10";
}
}
}
WriteLine("");
WriteLine(i);
WriteLine(linesDoNotUpdate);
WriteLine("");
! Wegen einem Limit bei der RF Übertragung in der CCU kann man nicht alle 10 in einem Funktelegramm übertragen.
! Deswegen wird hier die Übertragung immer in 2 Funktelegramme aufgeteilt.
string displayCmdA = "IJDISEP001";
string displayCmdB = "IJDISEP001";
integer iChangedLinesA = 0;
integer iChangedLinesB = 0;
if (linesDoNotUpdate.Find("L01") < 0) {
displayCmdA = displayCmdA # " " # line1; iChangedLinesA = iChangedLinesA + 1;
}
if (linesDoNotUpdate.Find("L02") < 0) {
displayCmdA = displayCmdA # " " # line2; iChangedLinesA = iChangedLinesA + 1;
}
if (linesDoNotUpdate.Find("L03") < 0) {
displayCmdA = displayCmdA # " " # line3; iChangedLinesA = iChangedLinesA + 1;
}
if (linesDoNotUpdate.Find("L04") < 0) {
displayCmdA = displayCmdA # " " # line4; iChangedLinesA = iChangedLinesA + 1;
}
if (linesDoNotUpdate.Find("L05") < 0) {
displayCmdA = displayCmdA # " " # line5; iChangedLinesA = iChangedLinesA + 1;
}
if (linesDoNotUpdate.Find("L06") < 0) {
displayCmdB = displayCmdB # " " # line6; iChangedLinesB = iChangedLinesB + 1;
}
if (linesDoNotUpdate.Find("L07") < 0) {
displayCmdB = displayCmdB # " " # line7; iChangedLinesB = iChangedLinesB + 1;
}
if (linesDoNotUpdate.Find("L08") < 0) {
displayCmdB = displayCmdB # " " # line8; iChangedLinesB = iChangedLinesB + 1;
}
if (linesDoNotUpdate.Find("L09") < 0) {
displayCmdB = displayCmdB # " " # line9; iChangedLinesB = iChangedLinesB + 1;
}
if (linesDoNotUpdate.Find("L10") < 0) {
displayCmdB = displayCmdB # " " # line10; iChangedLinesB = iChangedLinesB + 1;
}
WriteLine(displayCmdA);
WriteLine(displayCmdB);
WriteLine("");
string currentLines = line1 # "\t" # line2 # "\t" # line3 # "\t" # line4 # "\t" # line5 # "\t" # line6 # "\t" # line7 # "\t" # line8 # "\t" # line9 # "\t" # line10;
WriteLine(currentLines);
Das Ergebnis der Ausgabe sieht dann so aus:
Code: Alles auswählen
/1Linie1
/1 '@p03@t01@f4826.6 °C@p7839 %'
/2
/2 '@p03@t02@p4825.4 °C@p7840 %'
/3
/3 '@p03@t03@p78Aus '
/4
/4 '@p03@t04@p4824.7 °C@p7850 %'
/5
/5 '@p03@t05@p4824.5 °C@p7842 %'
/6
/6 '@p03@t06@p4824.5 °C@p7845 %'
/7
/7 '@p03@t07@p4824.5 °C@p7848 %'
/8
/8 '@p03@t08@p4825.4 °C@p7844 %'
/9
/9 '@p03@t09@p4824.2 °C@p7843 %'
/1Linie1
/10 '@p03@t10@p78Aus'
10
L07
IJDISEP001 /1 '@p03@t01@f4821.8 °C@p7852 %' /2 '@p03@t02@p4823.8 °C@p7846 %' /3 '@p03@t03@p78St.1' /4 '@p03@t04@p4824.9 °C@p7852 %' /5 '@p03@t05@p4824.6 °C@p7843 %'
IJDISEP001 /6 '@p03@t06@p4824.5 °C@p7847 %' /8 '@p03@t08@p4825.3 °C@p7843 %' /9 '@p03@t09@p4824.3 °C@p7845 %' /10 '@p03@t10@p78Aus'
/1 '@p03@t01@f4821.8 °C@p7852 %' /2 '@p03@t02@p4823.8 °C@p7846 %' /3 '@p03@t03@p78St.1' /4 '@p03@t04@p4824.9 °C@p7852 %' /5 '@p03@t05@p4824.6 °C@p7843 %' /6 '@p03@t06@p4824.5 °C@p7847 %' /7 '@p03@t07@p4824.5 °C@p7848 %' /8 '@p03@t08@p4825.3 °C@p7843 %' /9 '@p03@t09@p4824.3 °C@p7845 %' /10 '@p03@t10@p78Aus'
Die 10 vor L07 gibt die Anzahl Durchläufe an. Der Text
wird aber in der ersten IF-Abfrage gebildet. Aus welchem Grund wird die 10te Abfrage nicht ausgeführt?
Aber aus einem Grund wird der Text in der ersten Zeile für die 10te ausgegeben.
Ich sehe den Fehler nicht. Hatte noch jemand das selbe Problem und konnte es lösen?
Für einen Tipp bin ich sehr dankbar. Nach mehreren Tagen komme ich hier nicht mehr weiter.
Gruss Ivo
_______________________________________________________________________________________________________
Raspberrymatic auf einem Raspi 4 4GB (HB-RF-USB-2) mit 2 LAN Gateways,
42 RF Geräte, 4 IP Geräte und 21 Cuxd Geräte, 24 RF Eigenbau Geräte
hm_pdetect, E-Mail, XML-API, JB HB Devices, HB-TM-Devices-AddOn, CUx-Daemon, CCU-Historian auf einem separaten Raspi