Würde gerne die Daten der folgenden Seite mit HTTPMOD auslesen
schaffe es aber überhaupt nicht mit REGEX
Könnte jemand helfen?
Screenshot.png
Danke im Vorraus
Wie kommen die Werte denn auf diese Seite? Vielleicht ist es einfacher dort "anzuzapfen".
Ansonsten können wir ohne den Quelltext der Seite nicht helfen. Zeig uns doch mal, was für regexes du mit den relevanten Stellen am Quelltext schon ausprobiert hast.
Ansonsten sind für das häufig mühsame Erstellen von Regexes Tools wie regex101.com sehr sehr sehr hilfreich, teilweise auch ChatGPT.
Die Seite kommt von einem Bootloader der Technischen Alternative mit dem ich in verbindung mit einer uvr1611 bin
Kann über den BL-Net sogar den regler steuern
Druck(.*)bar
bekomme ich
1,69
Mehr schaffe ich nicht
Habe eine zweite 1611er die mit einer cmi der ta verbunden ist da kann ich die Daten mit dem Modul CanOverEthernet abfangen
Aber für den Bootloader hab ich nichts gefunden als das Modul HttpNod aber dabei steh ich auf der leitung
Vieleicht gibt es ja ein anderes Modul dafür
Ok. Kenne mich mit der Hardware überhaupt nicht aus.
Aber wenn du die Website öffnest, schau dir mal den Quellcode der Seite an. Dann musst du nur die relevanten Stellen finden und dir die entsprechenden Regexes basteln (bzw. z.B. von ChatGPT basteln lassen).
Wenn du da nicht mehr weiter kommst, poste wie gesagt mal die jeweiligen relevanten Stellen des Quelltexts und dann können wir weiter schauen.
Zitat von: passibe am 19 Februar 2025, 03:35:52Aber wenn du die Website öffnest, schau dir mal den Quellcode der Seite an. Dann musst du nur die relevanten Stellen finden und dir die entsprechenden Regexes basteln (bzw. z.B. von ChatGPT basteln lassen).
Oder einfach mal ein HTTPMOD-Device anlegen, einfach die url der Seite angeben und irgendein (hohes) Intervall <- es geht erst mal nur drum zu sehen was kommt...
Dann beim HTTPMOD das Attribut showBody setzen. Dann warten bis ein Abruf kommt oder "reread" auslösen und hier posten, was dann eben in den INTERNALS steht <- kann lang sein ;)
Oder wie von passibe geschrieben selbst versuchen die passenden RegEx zu finden, für den Zugriff auf das was du wissen/haben willst.
Vorteil (gegenüber Abruf mit Browser und dann "show Source" oder so): du siehst gleich, ob HTTPMOD die Seite auch einfach so aufrufen kann...
Ein Browser macht oft viele Dinge automatisch: Cookies, Redirects, Java-Script usw.
Gruß, Joachim
Es gibt neben HTTPMOD auch CanOE (was du schon im Einsatz hast) und TA_CMI_JSON - was ich nutze um über die API des CMI Werte abzufragen.
Aber dein UVR1611 hängt nicht am CMI? Wie kommst du denn an die genannte und gezeigte Webseite?
Zitat von: tobi01001 am 19 Februar 2025, 11:26:18Es gibt neben HTTPMOD auch CanOE (was du schon im Einsatz hast) und TA_CMI_JSON - was ich nutze um über die API des CMI Werte abzufragen.
Aber dein UVR1611 hängt nicht am CMI? Wie kommst du denn an die genannte und gezeigte Webseite?
Bekomme ich über einen BOOTLoader BL-Net von der Technischen Alternative das ist der vorgänger der cmi
Hier mal der Quellcode ????
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html><head><meta http-equiv="content-type" content="text/html;charset=utf-8" /><meta http-equiv="expires" content="0"><style type="text/css">body {font-size: 14px; font-family: Verdana, Arial, Helvetica, sans-serif; background-repeat: no-repeat;} #g {position: relative;}#pa {top: 0px; left: 0px; position: absolute;}#p {top: 0px; left: 0px; position: absolute;} </style><script type="text/javascript">function sd (){document.title = this.data.Title; document.getElementById("g").style.width = this.data.Width; document.getElementById("g").style.height = this.data.Height; document.getElementById("pa").style.width = this.data.Width;document.getElementById("pa").style.height = this.data.Height;document.getElementById("p").src = this.data.GraphicFile; var rT = this.data.AutoRefreshTime; if(rT>29)window.setInterval("javascript:this.data.location.reload()", rT*1000); var rlt = this.data.RefreshLink;if(rlt!="") {var rL = document.createElement('a');rL.href="javascript:this.data.location.reload()"; rL.appendChild(document.createTextNode(rlt)); document.getElementById("rld").appendChild(rL);}} </script></head><body onload="sd ()"> <div align="center"><div id="g"> <img src="" border="0" id="p"> <iframe id="pa" src="GRAFIK1.htm" name="data" frameborder="0" scrolling="no" allowtransparency="yes"></iframe></div></div><div align="center" id="rld"></div></body></html>
Ich sehe hier aber keine Werte raus
Zitat von: MadMax-FHEM am 19 Februar 2025, 09:44:40Zitat von: passibe am 19 Februar 2025, 03:35:52Aber wenn du die Website öffnest, schau dir mal den Quellcode der Seite an. Dann musst du nur die relevanten Stellen finden und dir die entsprechenden Regexes basteln (bzw. z.B. von ChatGPT basteln lassen).
Oder einfach mal ein HTTPMOD-Device anlegen, einfach die url der Seite angeben und irgendein (hohes) Intervall <- es geht erst mal nur drum zu sehen was kommt...
Dann beim HTTPMOD das Attribut showBody setzen. Dann warten bis ein Abruf kommt oder "reread" auslösen und hier posten, was dann eben in den INTERNALS steht <- kann lang sein ;)
Oder wie von passibe geschrieben selbst versuchen die passenden RegEx zu finden, für den Zugriff auf das was du wissen/haben willst.
Vorteil (gegenüber Abruf mit Browser und dann "show Source" oder so): du siehst gleich, ob HTTPMOD die Seite auch einfach so aufrufen kann...
Ein Browser macht oft viele Dinge automatisch: Cookies, Redirects, Java-Script usw.
Gruß, Joachim
Hab ich gemacht und dabei kommt das gleiche wir der Quellcode oder?
httpbody
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html><head><meta http-equiv="content-type" content="text/html;charset=utf-8" /><meta http-equiv="expires" content="0"><style type="text/css">body {font-size: 14px; font-family: Verdana, Arial, Helvetica, sans-serif; background-repeat: no-repeat;} #g {position: relative;}#pa {top: 0px; left: 0px; position: absolute;}#p {top: 0px; left: 0px; position: absolute;} </style><script type="text/javascript">function sd (){document.title = this.data.Title; document.getElementById("g").style.width = this.data.Width; document.getElementById("g").style.height = this.data.Height; document.getElementById("pa").style.width = this.data.Width;document.getElementById("pa").style.height = this.data.Height;document.getElementById("p").src = this.data.GraphicFile; var rT = this.data.AutoRefreshTime; if(rT>29)window.setInterval("javascript:this.data.location.reload()", rT*1000); var rlt = this.data.RefreshLink;if(rlt!="") {var rL = document.createElement('a');rL.href="javascript:this.data.location.reload()"; rL.appendChild(document.createTextNode(rlt)); document.getElementById("rld").appendChild(rL);}} </script></head><body onload="sd ()"> <div align="center"><div id="g"> <img src="" border="0" id="p"> <iframe id="pa" src="GRAFIK1.htm" name="data" frameborder="0" scrolling="no" allowtransparency="yes"></iframe></div></div><div align="center" id="rld"></div></body></html>
Ist auf dem Handy schwer zu lesen aber es sieht so aus als würde auf die Seite ein fertiges Bild geladen?
Bzw. falls doch Daten kommen, dann per Javascript...
Daher wird es mit httpmod erst mal nix/schwierig...
Gruß, Joachim
Hab etwas gefunden
vieleicht hilft das um etwas zu basteln
Wenn ich im Browser
http://192.xxx.xxx.xxx:xx/c_index.htm?C=8D200101
eingebe bekomme ich
36,8 °C
Das wäre der TempVorlauf in meiner UVR1611
Hab ein Modul für iobroker gefunden
https://github.com/weberk/ioBroker.ta-blnet
das laut beschreibung alles auslesen kann
Gibt es sowas auch für fhem??
Oder könnte mann das in fhem einbauen??
Danke schon mal
Das hab ich auch noch
screen.jpg
Hier mal formatiert.
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta http-equiv="expires" content="0">
<style type="text/css">
[...]
</style>
<script
type="text/javascript">function sd() { document.title = this.data.Title; document.getElementById("g").style.width = this.data.Width; document.getElementById("g").style.height = this.data.Height; document.getElementById("pa").style.width = this.data.Width; document.getElementById("pa").style.height = this.data.Height; document.getElementById("p").src = this.data.GraphicFile; var rT = this.data.AutoRefreshTime; if (rT > 29) window.setInterval("javascript:this.data.location.reload()", rT * 1000); var rlt = this.data.RefreshLink; if (rlt != "") { var rL = document.createElement('a'); rL.href = "javascript:this.data.location.reload()"; rL.appendChild(document.createTextNode(rlt)); document.getElementById("rld").appendChild(rL); } } </script>
</head>
<body onload="sd ()">
<div align="center">
<div id="g"> <img src="" border="0" id="p"> <iframe id="pa" src="GRAFIK1.htm" name="data" frameborder="0"
scrolling="no" allowtransparency="yes"></iframe></div>
</div>
<div align="center" id="rld"></div>
</body>
</html>
Scheint so als würde da ein iframe geladen werden von GRAFIK1.htm? Was ist denn der Quellcode von http://192.xxx.xxx.xxx:xx/GRAFIK1.htm ? Vermutlich ist http://192.xxx.xxx.xxx:xx/GRAFIK1.htm das bessere Ziel einer HTTPMOD-Abfrage, sofern da tatsächlich nicht nur ein Bild geladen wird ...
Das sollte doch der Qeulltext sein oder?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<style type="text/css">
body {font-size: 14px; font-family: Verdana, Arial, Helvetica, sans-serif; background-repeat: no-repeat; background-color: transparent; background: transparent; margin: 0px; padding: 0px;}
#frame {text-align: left; vertical-align: top; position: relative; margin-left: 0;}
/*########## CSS-ID: Positionen und Darstellung der Anzeigeparameter ##########*/
#pos0{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:210px; left:504px; }
#pos1{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:192px; left:268px; }
#pos2{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:117px; left:274px; }
#pos3{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:224px; left:685px; }
#pos4{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:32px; left:57px; }
#pos5{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:52px; left:57px; }
#pos6{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:511px; left:367px; }
#pos7{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:412px; left:367px; }
#pos8{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:459px; left:366px; }
#pos9{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:436px; left:509px; }
#pos10{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:27px; left:219px; }
#pos11{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:45px; left:219px; }
#pos12{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:266px; left:423px; }
#pos13{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:256px; left:579px; }
#pos14{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:277px; left:219px; }
#pos15{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:226px; left:17px; }
#pos16{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:246px; left:17px; }
#pos17{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:260px; left:205px; }
#pos18{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:495px; left:354px; }
#pos19{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:395px; left:356px; }
#pos20{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:442px; left:354px; }
#pos21{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:209px; left:685px; }
#pos22{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:194px; left:504px; }
#pos23{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:249px; left:404px; }
#pos24{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:239px; left:555px; }
#pos25{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:175px; left:264px; }
#pos26{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:102px; left:252px; }
#pos27{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:382px; left:194px; }
#pos28{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:227px; left:503px; }
#pos29{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:242px; left:685px; }
#pos30{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:135px; left:274px; }
#pos31{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:210px; left:268px; }
#pos32{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:318px; left:218px; }
#pos33{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:302px; left:219px; }
#pos34{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:305px; left:666px; }
#pos35{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:306px; left:512px; }
</style>
<script type="text/javascript">
<!--
var Title ="Onlineschema"; // Titeltext im Browserfenster
var GraphicFile = "GRAFIK.gif"; // Pfad der Grafikdatei
var Width = "770px";
var Height = "550px";
//### Intervallzeit [in Sekunden] fr eine automatische Aktualisierung der Messwerte: ###
//### < "30" = keine automatische Aktualisierung ###
//--------------------------------------------------
var AutoRefreshTime = "0";
//### Linktext für manuelle Aktualisierung der Messwerte: ###
//### "" = kein Link für manuelle Aktualisierung ###
//--------------------------------------------------
var RefreshLink ="";
function set_dimenson_para (){
document.getElementById("frame").style.width = Width;
document.getElementById("frame").style.hight = Height;
}
-->
</script>
</head>
<body onload="set_dimenson_para ()">
<div id="frame">
<!--########## Definitionen der Anzeigeparameter ##########-->
<div id="pos0"> 33,1 °C </div>
<div id="pos1"> 21,0 °C </div>
<div id="pos2"> 22,1 °C </div>
<div id="pos3"> 33,0 °C </div>
<div id="pos4">TKollektor</div>
<div id="pos5">- 5,1 °C </div>
<div id="pos6"> 37,2 °C </div>
<div id="pos7"> 60,4 °C </div>
<div id="pos8"> 37,7 °C </div>
<div id="pos9">AnlagenVL 62,4 °C </div>
<div id="pos10">Temp.Aussen</div>
<div id="pos11">- 5,7 °C </div>
<div id="pos12">EIN</div>
<div id="pos13">EIN</div>
<div id="pos14">EIN</div>
<div id="pos15">Pumpe-Solar</div>
<div id="pos16">AUS</div>
<div id="pos17">Frost Wasser</div>
<div id="pos18">TPuffer.u</div>
<div id="pos19">TPuffer.o</div>
<div id="pos20">TPuffer.m</div>
<div id="pos21">T VL Wohnr</div>
<div id="pos22">T VL Keller</div>
<div id="pos23">P Keller</div>
<div id="pos24">P Wohnraum</div>
<div id="pos25">T Keller</div>
<div id="pos26">T Wohnraum</div>
<div id="pos27">HZ Druck 1,37 bar</div>
<div id="pos28"> 33,4 °C </div>
<div id="pos29"> 33,4 °C </div>
<div id="pos30"> 19,0 °C </div>
<div id="pos31"> 19,0 °C </div>
<div id="pos32">AUS</div>
<div id="pos33">UeberTemp</div>
<div id="pos34">aus</div>
<div id="pos35">aus</div>
</div>
</body>
</html>
Zitat von: ChrisA4 am 21 Februar 2025, 05:57:28Das sollte doch der Qeulltext sein oder?
Wenn du das sagst... :-)
Also doch eine ganz normale URL die du aufrufst und das zurück bekommst....
Weiter kommst du z.B. mit XPath (https://wiki.fhem.de/wiki/HTTPMOD#Parsing_http_/_XML_using_xpath)
attr dein_httpmod reading01Name meineTemperatur1
attr dein_httpmod reading01XPath //div[2]/text()
dann schaust was im Reading steht.
attr dein_httpmod showBody 1
attr dein_httpmod showError 1
attr dein_httpmod showMatched 1
hilft beim ausgestalten...
Danke das is es
Noch frage dazu
bei
attr Solardaten reading11Name TKeller_VL_Ist
attr Solardaten reading11XPath //div[1]/text()
bekomme ich einen zweiten wert dazu
READINGS:
2025-02-22 21:33:14 Kolektor - 2,6 °C
2025-02-22 21:33:14 Solarpumpe AUS
2025-02-22 21:33:14 TAussen - 1,8 °C
2025-02-22 21:33:14 TKeller_Ist 21,2 °C
2025-02-22 21:33:14 TKeller_Soll 22,0 °C
2025-02-22 21:33:14 TKeller_VL_Ist-1 37,9 °C
2025-02-22 21:33:14 TKeller_VL_Ist-2
2025-02-22 21:33:14 TKeller_VL_Sol 38,1 °C
2025-02-22 21:33:14 TPuffer_Mitte 58,4 °C
2025-02-22 21:33:14 TPuffer_Oben 74,9 °C
2025-02-22 21:33:14 TPuffer_Unten 38,7 °C
2025-02-22 21:33:14 TWohnraum_Ist 22,4 °C
2025-02-22 21:33:14 TWohnraum_Soll 23,0 °C
2025-02-22 21:33:14 TWohnraum_VL_Ist 39,5 °C
2025-02-22 21:33:14 TWohnraum_VL_Soll 39,6 °C
und der hat auch keinen wert?
Zitat von: ChrisA4 am 22 Februar 2025, 21:34:32bekomme ich einen zweiten wert dazu
Das kann glaube passieren wenn innerhalb des gesuchten (bzw. gefundenen) tags (Pfad) nicht nur der Wert, sondern wiederum mehrere Tags sind.
Falls das bei dir so ist, müsstest du für dieses Reading das innere Tag mit der Temperatur nehmen.
Wie finde ich da den richtigen wert ?
<div id="pos0"> 32,7 °C </div>
Ich verstehe die Frage nicht. Da steht doch nur ein Wert, sofern du die Temperatur möchtest.
Also ich geb für diese Zeile
<div id="pos0"> 32,7 °C </div>
das ein
reading11Name
TKeller_VL_Ist
deleteattr
reading11XPath
//div[1]/text()
und dabei bekomme ich eben die zwei werte
2025-02-22 21:33:14 TKeller_VL_Ist-1 32,7 °C
2025-02-22 21:33:14 TKeller_VL_Ist-2
Ich wüsste nicht was da falsch wäre
Zitat von: ChrisA4 am 25 Februar 2025, 20:41:41Ich wüsste nicht was da falsch wäre
Ich auch nicht, weil der Kontext fehlt.
Ein List vom Device mit
attr dein_httpmod showBody 1
kann helfen. ;-)
Dann sieht man die XPath Attribute und zusätzlich den zugehörigen Quelltext.
Zur Not holt man sich den einen Wert per RegEx...
Zitat von: tobi01001 am 26 Februar 2025, 15:11:22Zitat von: ChrisA4 am 25 Februar 2025, 20:41:41Ich wüsste nicht was da falsch wäre
Ich auch nicht, weil der Kontext fehlt.
Ein List vom Device mit
attr dein_httpmod showBody 1
kann helfen. ;-)
Dann sieht man die XPath Attribute und zusätzlich den zugehörigen Quelltext.
Zur Not holt man sich den einen Wert per RegEx...
<!--2.0-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<style type="text/css">
body {font-size: 14px; font-family: Verdana, Arial, Helvetica, sans-serif; background-repeat: no-repeat; background-color: transparent; background: transparent; margin: 0px; padding: 0px;}
#frame {text-align: left; vertical-align: top; position: relative; margin-left: 0;}
/*########## CSS-ID: Positionen und Darstellung der Anzeigeparameter ##########*/
#pos0{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:210px; left:504px; }
#pos1{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:192px; left:268px; }
#pos2{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:117px; left:274px; }
#pos3{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:224px; left:685px; }
#pos4{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:32px; left:57px; }
#pos5{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:52px; left:57px; }
#pos6{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:511px; left:367px; }
#pos7{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:412px; left:367px; }
#pos8{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:459px; left:366px; }
#pos9{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:436px; left:509px; }
#pos10{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:27px; left:219px; }
#pos11{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:45px; left:219px; }
#pos12{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:266px; left:423px; }
#pos13{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:256px; left:579px; }
#pos14{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:277px; left:219px; }
#pos15{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:226px; left:17px; }
#pos16{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:246px; left:17px; }
#pos17{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:260px; left:205px; }
#pos18{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:495px; left:354px; }
#pos19{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:395px; left:356px; }
#pos20{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:442px; left:354px; }
#pos21{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:209px; left:685px; }
#pos22{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:194px; left:504px; }
#pos23{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:249px; left:404px; }
#pos24{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:239px; left:555px; }
#pos25{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:175px; left:264px; }
#pos26{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:102px; left:252px; }
#pos27{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:382px; left:194px; }
#pos28{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:227px; left:503px; }
#pos29{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:242px; left:685px; }
#pos30{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:135px; left:274px; }
#pos31{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:210px; left:268px; }
#pos32{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:318px; left:218px; }
#pos33{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:302px; left:219px; }
#pos34{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:305px; left:666px; }
#pos35{position:absolute; font-family: Calibri; font-size: 12pt; color: rgb(0,0,0); font-style: normal; font-weight: bold; text-align: left; top:306px; left:512px; }
</style>
<script type="text/javascript">
<!--
var Title ="Onlineschema"; // Titeltext im Browserfenster
var GraphicFile = "GRAFIK.gif"; // Pfad der Grafikdatei
var Width = "770px";
var Height = "550px";
//### Intervallzeit [in Sekunden] fr eine automatische Aktualisierung der Messwerte: ###
//### < "30" = keine automatische Aktualisierung ###
//--------------------------------------------------
var AutoRefreshTime = "0";
//### Linktext für manuelle Aktualisierung der Messwerte: ###
//### "" = kein Link für manuelle Aktualisierung ###
//--------------------------------------------------
var RefreshLink ="";
function set_dimenson_para (){
document.getElementById("frame").style.width = Width;
document.getElementById("frame").style.hight = Height;
}
-->
</script>
</head>
<body onload="set_dimenson_para ()">
<div id="frame">
<!--########## Definitionen der Anzeigeparameter ##########-->
<div id="pos0"> 32,6 °C </div>
<div id="pos1"> 21,7 °C </div>
<div id="pos2"> 22,6 °C </div>
<div id="pos3"> 33,2 °C </div>
<div id="pos4">TKollektor</div>
<div id="pos5"> 29,3 °C </div>
<div id="pos6"> 40,5 °C </div>
<div id="pos7"> 76,5 °C </div>
<div id="pos8"> 58,1 °C </div>
<div id="pos9">AnlagenVL 73,1 °C </div>
<div id="pos10">Temp.Aussen</div>
<div id="pos11"> 8,6 °C </div>
<div id="pos12">EIN</div>
<div id="pos13">EIN</div>
<div id="pos14">AUS</div>
<div id="pos15">Pumpe-Solar</div>
<div id="pos16">AUS</div>
<div id="pos17">Frost Wasser</div>
<div id="pos18">TPuffer.u</div>
<div id="pos19">TPuffer.o</div>
<div id="pos20">TPuffer.m</div>
<div id="pos21">T VL Wohnr</div>
<div id="pos22">T VL Keller</div>
<div id="pos23">P Keller</div>
<div id="pos24">P Wohnraum</div>
<div id="pos25">T Keller</div>
<div id="pos26">T Wohnraum</div>
<div id="pos27">HZ Druck 1,61 bar</div>
<div id="pos28"> 32,0 °C </div>
<div id="pos29"> 33,6 °C </div>
<div id="pos30"> 23,0 °C </div>
<div id="pos31"> 22,0 °C </div>
<div id="pos32">AUS</div>
<div id="pos33">UeberTemp</div>
<div id="pos34">aus</div>
<div id="pos35">aus</div>
</div>
</body>
</html>
https://www.w3schools.com/Xml/xpath_syntax.asp (https://www.w3schools.com/Xml/xpath_syntax.asp)
attr Solardaten reading11Name TKeller_VL_Ist
attr Solardaten reading11XPath //div[@id='pos0']
Eine Frage hätte ich noch
Wie schaffe ich es ?
Aus
<div id="pos27">HZ Druck 2,10 bar</div>
nur den Wert "2,10" zu bekommen
ungetestet und ins blaue (da wieder ohne Kontext bzw die eigentlichen Attribute) als Beispiel:
attr Solardaten reading11XPath number(//div[@id='pos0'])
Vermutlich wird das mit number() nicht funktionieren, da number m.W. nur mit Dezimalpunkten arbeitet, nicht mit Dezimalkomma.
Zitat von: tobi01001 am 27 Februar 2025, 08:34:01ins blaue (da wieder ohne Kontext bzw die eigentlichen Attribute)
Dem kann ich nur zustimmen, es macht wirklich keinen Spaß, in diesem Thread helfen zu wollen, da man als Helfender viel zu viel raten muss.
Hier noch zwei Links, die dem Fragesteller bei seinen Experimenten vielleicht weiterhelfen können.
http://xpather.com
https://wiki.selfhtml.org/wiki/XML/XSL/XPath
Danke nochmals
Für die Unterstützung, Ansporn und Links
Ich hab meine readings zusammen