[HELP] Ochsner Wärmepumpe | Web2Com | SOAP | HTTPMOD

Begonnen von der.einstein, 08 März 2021, 10:12:18

Vorheriges Thema - Nächstes Thema

der.einstein

Hallo,
ich bin Besitzer einer Ochsner GMDW 8 Plus mit OTE 3 Raumterminal Touch.
D.h. eine Direktverdampferwärmepumpe mit Erdkollektoren im Garten, sowie das Terminal, dass eine komfortable Steuerung der Anlage ermöglicht und einen Webserver beinhaltet.
Durch letzteres soll das eBus-Problem umgangen werden, da das Terminal quasi auf dem eBus horcht und alles über ein Webinterface darstellt. Der Webserver stellt ebenfalls eine SOAP Schnittstelle zur Verfügung zum Anschluss an weitere Systeme bzw. Smart Home Systeme. Bedienungsanleitung ist anbei.
Die SOAP Schnittstelle kann ich von Ubuntu aus mit folgendem curl Aufruf ansteuern:
curl --anyauth -X POST -i -H "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction: http://ws01.lom.ch/soap/listDP" --data @request2.txt http://USER:123@ochsner-ote-web2com/ws
Ausgabe:

HTTP/1.1 401 Authorization Required
Date: Mon, 08 Mar 2021 08:57:39 GMT
WWW-Authenticate: Digest realm="RC7000", nonce="zYpCoAK9BQA=b4adc7bfc478b2174f8a5a8dac23f9119e6d4a33", algorithm=MD5, qop="auth"
Content-Length: 401
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 200 OK
Date: Mon, 08 Mar 2021 08:57:39 GMT
Cache-Control: no-cache
Content-Type: text/xml; charset=UTF-8
Transfer-Encoding: chunked

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="http://ws01.lom.ch/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
  <ns:getDpResponse>
   <ref>
    <oid>/(1) EBusRoot/(2) 519200768/(5) FUSSBODEN/(119) /(1) 00:00</oid>
    <prop>-r--</prop>
   </ref>
   <dpCfg>
    <index>1</index>
    <name>00:00</name>
    <prop>-r--</prop>
    <desc>Scalar Var</desc>
    <value>0.8</value>
    <unit>°C</unit>
    <type>13</type>
    <step>0.1</step>
    <minValue>-50.0</minValue>
    <maxValue>50.0</maxValue>
   </dpCfg>
  </ns:getDpResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Inhalt der request2.txt:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ws01.lom.ch/soap/">
<SOAP-ENV:Body>
   <ns:getDpRequest>
    <ref>
     <oid>/1/2/5/119/1</oid>
     <prop/>
    </ref>
    <startIndex>0</startIndex>
    <count>10</count>
   </ns:getDpRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

DIe Zahlenfolge "<oid>/1/2/5/119/1</oid>" bedeutet dabei den Wert aus der Schnittstelle. Hierzu muss man sich den Screenshot aus dem Webserver anschaun --> die Abfolge der roten Zahlen in Klammern sind quasi die Adresse des zu erfragenden Wertes.
Für Loxone gibt es bereits ein Plugin mit einem zugehörigen PHP-Script, dass die SOAP-Schnittstelle in eine reine HTTP Schnittstelle wandelt. Da hab ich mir bisl was abgekuckt: https://www.loxwiki.eu/display/LOXBERRY/Ochsner+WEB2COM+Plugin
In FHEM hab ich dann versucht per HTTPMOD den curl Aufruf nachzustellen, hier das define:

define web2com HTTPMOD http://USER:123@ochsner-ote-web2com/ws 60
attr web2com userattr reading01Name reading01Regex readingsName.01 readingsRegex.01 requestData.01 requestHeader.01 requestHeader1 requestHeader2
attr web2com enableControlSet 1
attr web2com enableCookies 1
attr web2com enforceGoodReadingNames 1
attr web2com handleRedirects 1
attr web2com reading01Name Aussentemperatur
attr web2com reading01Regex value.*
attr web2com requestData.01 '<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ws01.lom.ch/soap/">  <SOAP-ENV:Body>    <ns:getDpRequest>     <ref>      <oid>/1/2/5/119/1</oid>      <prop/>     </ref>     <startIndex>0</startIndex>     <count>10</count>    </ns:getDpRequest>  </SOAP-ENV:Body> </SOAP-ENV:Envelope>'
attr web2com requestHeader1 Content-Type: text/xml,charset=UTF-8
attr web2com requestHeader2 SOAPAction: http://ws01.lom.ch/soap/listDP

Leider klappt das nicht.
Hier das list:
Internals:
   BUSY       0
   CFGFN     
   DEF        http://USER:123@ochsner-ote-web2com/ws 60
   FUUID      60455151-f33f-4dde-e031-db6389a7369bebb6
   Interval   60
   MainURL    http://USER:123@ochsner-ote-web2com/ws
   ModuleVersion 4.0.12 - 24.10.2020
   NAME       web2com
   NOTIFYDEV  global
   NR         45084
   NTFY_ORDER 50-web2com
   STATE      ???
   TYPE       HTTPMOD
   value     
   CompiledRegexes:
   HttpUtils:
     NAME       
     addr       http://ochsner-ote-web2com:80
     auth       1
     code       500
     compress   1
     conn       
     data       '<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ws01.lom.ch/soap/">  <SOAP-ENV:Body>    <ns:getDpRequest>     <ref>      <oid>/1/2/5/119/1</oid>      <prop/>     </ref>     <startIndex>0</startIndex>     <count>10</count>    </ns:getDpRequest>  </SOAP-ENV:Body> </SOAP-ENV:Envelope>'
     displayurl http://USER:123@ochsner-ote-web2com/ws
     header     Content-Type: text/xml,charset=UTF-8
SOAPAction: http://ws01.lom.ch/soap/listDP
Authorization: Digest nc=00000001, qop="auth", response="874e12cea7117846607a2eb74d9ef8c1", nonce="I9bczQK9BQA=757374612853925acf760fcc6fcceb691993e21d", uri="/ws", realm="RC7000", username="USER", algorithm="MD5", cnonce="d6c639467c92860071cb3cd3f63bab7b"
     host       ochsner-ote-web2com
     httpheader HTTP/1.1 500 Internal Server Error
Date: Mon, 08 Mar 2021 09:10:24 GMT
Connection: close
Content-Type: text/plain
     httpversion 1.0
     hu_blocking 0
     hu_filecount 2
     hu_port    80
     hu_portSfx
     ignoreredirects 1
     loglevel   4
     path       /ws
     protocol   http
     pwd        123
     redirects  0
     timeout    2
     url        http://USER:123@ochsner-ote-web2com/ws
     user       USER
     sslargs:
   QUEUE:
   READINGS:
   REQUEST:
     context    reading
     data       '<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ws01.lom.ch/soap/">  <SOAP-ENV:Body>    <ns:getDpRequest>     <ref>      <oid>/1/2/5/119/1</oid>      <prop/>     </ref>     <startIndex>0</startIndex>     <count>10</count>    </ns:getDpRequest>  </SOAP-ENV:Body> </SOAP-ENV:Envelope>'
     header     Content-Type: text/xml,charset=UTF-8
SOAPAction: http://ws01.lom.ch/soap/listDP
     ignoreredirects 0
     num        0
     retryCount 0
     type       update
     url        http://USER:123@ochsner-ote-web2com/ws
Attributes:
   enableControlSet 1
   enableCookies 1
   enforceGoodReadingNames 1
   handleRedirects 1
   reading01Name Aussentemperatur
   reading01Regex value.*
   requestData.01 '<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ws01.lom.ch/soap/">  <SOAP-ENV:Body>    <ns:getDpRequest>     <ref>      <oid>/1/2/5/119/1</oid>      <prop/>     </ref>     <startIndex>0</startIndex>     <count>10</count>    </ns:getDpRequest>  </SOAP-ENV:Body> </SOAP-ENV:Envelope>'
   requestHeader1 Content-Type: text/xml,charset=UTF-8
   requestHeader2 SOAPAction: http://ws01.lom.ch/soap/listDP
   userattr   reading01Name reading01Regex readingsName.01 readingsRegex.01 requestData.01 requestHeader.01 requestHeader1 requestHeader2

Da steht mittendrin "httpheader HTTP/1.1 500 Internal Server Error".

Anzumerken ist auch, dass ich bei curl "--anyauth" setzen muss. Die Anmeldung erfolgt zwar per Angabe von Benutzername und Passwort in der URL, eine "basic auth" reicht aber nicht, da der Server einen Digest erwartet.

Kann mir einer sagen, ob das mit HTTPMOD funktionieren kann?
Wenn ja, was muss ich ggf. ändern?
Wenn nein, was sind meine Alternativen?

Danke euch!  ;D

StefanStrobel

Hallo,

prinzipiell sollte das funktionieren.
vielleicht kommt der Server mit den Post-Daten nicht klar.
Versuch doch mal die Post-Daten Zeile für Zeile als

attr web2com requestData01 <?xml version="1.0" encoding="UTF-8"?>
attr web2com requestData02 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ws01.lom.ch/soap/">
attr web2com requestData03  <SOAP-ENV:Body>

usw. einzugeben.
Semikolons könnten dabei problematisch sein.

Ich würde dann verbose auf 5 setzen und nochmal kontrollieren, was tatsächlich gesendet wird.

Gruss
   Stefan

StefanStrobel

Ergänzung: Du kannst die Post-Daten auch aus einem File lesen lassen.

Wenn Du einen get-Befehl definierst, gibt es eine "DatExpr"-Expression, z.B.:

attr web2com get01Name Aussentemperatur
attr web2com get01Regex value.*
attr web2com get01Header1 Content-Type: text/xml,charset=UTF-8
attr web2com get01Header2 SOAPAction: http://ws01.lom.ch/soap/listDP
attr web2com get01DatExpr qx(cat /opt/fhem/testData.txt)
attr web2com get01Poll 1


Dann sollte nichts mit den Umbrüchen und Semikolons schief gehen.

Gruss
   Stefan


der.einstein

Hi,
super vielen Dank für die schnelle Antwort!
Die von dir vorgeschlagenen Änderungen mache ich gleich.
Hier erstmal der bisherige Output im FHEM Logfile bei Verbose=5:
2021.03.09 09:10:07 4: http://USER:123@ochsner-ote-web2com/ws: HTTP response code 401
2021.03.09 09:10:07 5: HttpUtils url=http://USER:123@ochsner-ote-web2com/ws
2021.03.09 09:10:07 4: IP: ochsner-ote-web2com -> 192.168.178.48
2021.03.09 09:10:07 5: HttpUtils request header:
POST /ws HTTP/1.0
Host: ochsner-ote-web2com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Content-Type: text/xml,charset=UTF-8
SOAPAction: http://ws01.lom.ch/soap/listDP
Authorization: Digest qop="auth", nc=00000001, response="84300e7885b30893a7c4911ec0b05e5e", nonce="R3r9Hxa9BQA=d081009f0dce5df7038476c0bce92a2b24e19f4a", uri="/ws", username="USER", realm="RC7000", algorithm="MD5", cnonce="18b1f0398e33bc635e1aa5643cfeb7f8"
Content-Length: 528

2021.03.09 09:10:07 4: http://USER:123@ochsner-ote-web2com/ws: HTTP response code 500
2021.03.09 09:10:07 5: HttpUtils http://USER:123@ochsner-ote-web2com/ws: Got data, length: 2
2021.03.09 09:10:07 5: HttpUtils response header:
HTTP/1.1 500 Internal Server Error
Date: Tue, 09 Mar 2021 08:13:27 GMT
Connection: close
Content-Type: text/plain
2021.03.09 09:10:07 5: web2com: ReadCallback called from __ANON__
2021.03.09 09:10:07 4: web2com: Read callback: request type was update retry 0,
header: HTTP/1.1 500 Internal Server Error
Date: Tue, 09 Mar 2021 08:13:27 GMT
Connection: close
Content-Type: text/plain, body length 2
2021.03.09 09:10:07 5: web2com: Read callback: body


2021.03.09 09:10:07 4: web2com: BodyDecode found no charset header (bodyDecode was set to auto)
2021.03.09 09:10:07 5: web2com: GetCookies is looking for Cookies
2021.03.09 09:10:07 5: web2com: ExtractSid called, context reading, num 0
2021.03.09 09:10:07 4: web2com: checking for redirects, code=500, ignore=0
2021.03.09 09:10:07 4: web2com: no redirects to handle
2021.03.09 09:10:07 5: web2com: Read callback sets LAST_REQUEST to update
2021.03.09 09:10:07 5: web2com: CheckAuth decided no authentication required
2021.03.09 09:10:07 5: web2com: Read starts parsing response to update with defined readings: 01
2021.03.09 09:10:07 5: web2com: ExtractReading Aussentemperatur with regex /(?^:value.*)/...
2021.03.09 09:10:07 5: web2com: ExtractReading Aussentemperatur did not match
2021.03.09 09:10:07 4: web2com: Read response to update didn't match any Reading
2021.03.09 09:10:07 5: web2com: HandleSendQueue called from HTTPMOD::ReadCallback, qlen = 0
2021.03.09 09:10:07 5: web2com: HandleSendQueue found no usable entry in queue


Dann mal schauen, was sich nach der Änderung hier dran ändert...

der.einstein

So, habe den Vorschlag mit den mehreren Zeilen befolgt  8)
Ich bekomme nun ein Reading:
READINGS:
     2021-03-10 19:47:19   Aussentemperatur 1

Es sollte jedoch immer 1 Nachkommastelle haben!
Der Aufruf mit curl liefert hier:
curl --anyauth -X POST -i -H "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction: http://ws01.lom.ch/soap/listDP" --data @request2.txt http://USER:123@ochsner-ote-web2com/ws
HTTP/1.1 401 Authorization Required
Date: Wed, 10 Mar 2021 18:51:34 GMT
WWW-Authenticate: Digest realm="RC7000", nonce="CQLsJzO9BQA=c0232b27705b15c7a67219759ad5dcb07c72119b", algorithm=MD5, qop="auth"
Content-Length: 401
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 200 OK
Date: Wed, 10 Mar 2021 18:51:34 GMT
Cache-Control: no-cache
Content-Type: text/xml; charset=UTF-8
Transfer-Encoding: chunked

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="http://ws01.lom.ch/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
  <ns:getDpResponse>
   <ref>
    <oid>/(1) EBusRoot/(2) 519200768/(5) FUSSBODEN/(119) /(1) 00:00</oid>
    <prop>-r--</prop>
   </ref>
   <dpCfg>
    <index>1</index>
    <name>00:00</name>
    <prop>-r--</prop>
    <desc>Scalar Var</desc>
    <value>1.8</value>
    <unit>°C</unit>
    <type>13</type>
    <step>0.1</step>
    <minValue>-50.0</minValue>
    <maxValue>50.0</maxValue>
   </dpCfg>
  </ns:getDpResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Wichtig ist hier die Zeile "<value>1.8</value>", d.h. die Zahl "1" ist korrekt, es fehlt aber der Punkt und die Nachkommestelle.
Ich denke der relevante Teil im Device lautet "reading01Regex value.*" --> da sollte doch alles bei sein in der Zeile?
Was kann ich hier machen?

Schon mal super vielen Dank bis hierher!

StefanStrobel

Hallo,

es fehlen dann noch Klammern um das .*.
Sonst gibt es keine Capture-Gruppe.

Gruß
    Stefan

der.einstein

Geil!
Mit folgender Regex hab ich es hinbekommen:
reading01Regex value>(.*)<
Resultat:
READINGS:
     2021-03-10 20:08:05   Aussentemperatur 1.6


Damit sollte ich nun alle anderen Readings auch hinbekommen!

Danke dir!

der.einstein

ALso ein Problem hat sich nun doch noch ergeben:
Folgende Zeile der POST-Daten müssen ja pro Reading angepasst werden:
"<oid>/1/2/5/119/1</oid>"
Die Zahlen da drin ändern sich ja!

Heisst, dass, ich muss pro Reading ein Device machen, oder kann ich pro Reading diese Zahlen anders festlegen?
Das Paar "reading01" - "requestData01" past ja hier so nicht.
Oder hab ich was verpasst?

StefanStrobel

Einfach für jeden Fall ein eigenes get definieren:

getURL http://gemeinsame.url.fuer.alle.gets
get01Name Aussentemp
get01Poll 1
get01Regex value>(.*)<
get01Data <oid>/1/2/5/119/1</oid>

get02Name Aussenfeuchte
...

geoker

Hallo,

kann mir jemand helfen wie die finale Lösung aussieht?
Ich habe auch so eine Ochsner-Web2Com Schnittstelle und würde die 1.) gerne auslesen und 2.) später gerne Werte ändern (z.B. Solltemperaturen abhängig von der Eigenerzeugung anheben)

Ich scheitere allerdings bereits beim CURL-Abruf:
geoker@pi3:~$  curl --anyauth -X POST -i -H "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction: http://ws01.lom.ch/soap/listDP" --data @request2.txt http://USER:123@192.168.1.141/ws
HTTP/1.1 401 Authorization Required
Date: Fri, 25 Mar 2022 07:48:37 GMT
WWW-Authenticate: Digest realm="RC7000", nonce="PVO/MAbbBQA=a649f73ce11ef99d1e8f79c04867759ed9a1daa6", algorithm=MD5, qop="auth"
Content-Length: 401
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 500 Internal Server Error
Date: Fri, 25 Mar 2022 07:48:37 GMT
Server: gSOAP/2.8
Content-Type: text/xml; charset=utf-8
Content-Length: 516
Connection: close

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ws01.lom.ch/soap/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:VersionMismatch</faultcode><faultstring>Invalid SOAP message or SOAP version mismatch</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>



Wobei ich die entsprechenden OID-Kennungen in der Request2.txt schon angepasst/überprüft habe.

Anmerkung:
Ochsner Schnittstelle: Seite 3.10 Version 3.21

Turtle

Hallo,

hätte auch Interesse an der finalen Lösung. :)

Turtle

#11
1 Reading habe ich jetzt mit folgendem RAW rausbekommen.
jetzt muss ich probieren wie es mit den weiteren Readings funktioniert.

defmod web2com HTTPMOD http://USER:123@192.168.188.43/ws 60
attr web2com userattr readingsName.01 readingsRegex.01 requestHeader.01
attr web2com enableControlSet 1
attr web2com enableCookies 1
attr web2com enforceGoodReadingNames 1
attr web2com handleRedirects 1
attr web2com reading01Name Betriebsstunden
attr web2com reading01Regex value>(.*)<
attr web2com requestData.01 <?xml version="1.0" encoding="UTF-8"?>
attr web2com requestData.02 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ws01.lom.ch/soap/">
attr web2com requestData.03 <SOAP-ENV:Body>
attr web2com requestData.04 <ns:getDpRequest>
attr web2com requestData.05 <ref>
attr web2com requestData.06 <oid>/1/2/1/125/6</oid>
attr web2com requestData.07 <prop/>
attr web2com requestData.08 </ref>
attr web2com requestData.09 <startIndex>0</startIndex>
attr web2com requestData.10 <count>10</count>
attr web2com requestData.11 </ns:getDpRequest>
attr web2com requestData.12 </SOAP-ENV:Body>
attr web2com requestData.13 </SOAP-ENV:Envelope>'
attr web2com requestHeader1 Content-Type: text/xml,charset=UTF-8
attr web2com requestHeader2 SOAPAction: http://ws01.lom.ch/soap/listDP
attr web2com verbose 5



Turtle

#12
Zitat von: StefanStrobel am 15 März 2021, 20:49:52
Einfach für jeden Fall ein eigenes get definieren:

getURL http://gemeinsame.url.fuer.alle.gets
get01Name Aussentemp
get01Poll 1
get01Regex value>(.*)<
get01Data <oid>/1/2/5/119/1</oid>

get02Name Aussenfeuchte
...


hab es jetzt dank des Posts von StefanStrobel hinbekommen.

Readings kann ich alle abrufen, jedoch kann ich nichts an die Wärmepumpe weitergeben.
Da ich überhaupt keinen Plan von dem HTTPMOD habe gebe ich mich damit auch zufrieden.


defmod web2com HTTPMOD http://USER:123@192.168.188.43/ws 60
attr web2com enableControlSet 1
attr web2com enableCookies 1
attr web2com enforceGoodReadingNames 1
attr web2com get01Data.01 <?xml version="1.0" encoding="UTF-8"?>
attr web2com get01Data.02 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ws01.lom.ch/soap/">
attr web2com get01Data.03 <SOAP-ENV:Body>
attr web2com get01Data.04 <ns:getDpRequest>
attr web2com get01Data.05 <ref>
attr web2com get01Data.06 <oid>/1/2/5/119/1</oid>
attr web2com get01Data.07 <prop/>
attr web2com get01Data.08 </ref>
attr web2com get01Data.09 <startIndex>0</startIndex>
attr web2com get01Data.10 <count>10</count>
attr web2com get01Data.11 </ns:getDpRequest>
attr web2com get01Data.12 </SOAP-ENV:Body>
attr web2com get01Data.13 </SOAP-ENV:Envelope>'
attr web2com get01Header1 Content-Type: text/xml,charset=UTF-8
attr web2com get01Header2 SOAPAction: http://ws01.lom.ch/soap/listDP
attr web2com get01Name Aussentemperatur
attr web2com get01Poll 1
attr web2com get01Regex value>(.*)<
attr web2com get02Data.01 <?xml version="1.0" encoding="UTF-8"?>
attr web2com get02Data.02 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ws01.lom.ch/soap/">
attr web2com get02Data.03 <SOAP-ENV:Body>
attr web2com get02Data.04 <ns:getDpRequest>
attr web2com get02Data.05 <ref>
attr web2com get02Data.06 <oid>/1/2/5/119/3</oid>
attr web2com get02Data.07 <prop/>
attr web2com get02Data.08 </ref>
attr web2com get02Data.09 <startIndex>0</startIndex>
attr web2com get02Data.10 <count>10</count>
attr web2com get02Data.11 </ns:getDpRequest>
attr web2com get02Data.12 </SOAP-ENV:Body>
attr web2com get02Data.13 </SOAP-ENV:Envelope>'
attr web2com get02Header1 Content-Type: text/xml,charset=UTF-8
attr web2com get02Header2 SOAPAction: http://ws01.lom.ch/soap/listDP
attr web2com get02Name Raumtemperatur
attr web2com get02Poll 1
attr web2com get02Regex value>(.*)<
attr web2com get03Data.01 <?xml version="1.0" encoding="UTF-8"?>
attr web2com get03Data.02 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ws01.lom.ch/soap/">
attr web2com get03Data.03 <SOAP-ENV:Body>
attr web2com get03Data.04 <ns:getDpRequest>
attr web2com get03Data.05 <ref>
attr web2com get03Data.06 <oid>/1/2/8/122/2</oid>
attr web2com get03Data.07 <prop/>
attr web2com get03Data.08 </ref>
attr web2com get03Data.09 <startIndex>0</startIndex>
attr web2com get03Data.10 <count>10</count>
attr web2com get03Data.11 </ns:getDpRequest>
attr web2com get03Data.12 </SOAP-ENV:Body>
attr web2com get03Data.13 </SOAP-ENV:Envelope>'
attr web2com get03Header1 Content-Type: text/xml,charset=UTF-8
attr web2com get03Header2 SOAPAction: http://ws01.lom.ch/soap/listDP
attr web2com get03Name Anlage_Vorlauftemperatur
attr web2com get03Poll 1
attr web2com get03Regex value>(.*)<
attr web2com get04Data.01 <?xml version="1.0" encoding="UTF-8"?>
attr web2com get04Data.02 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ws01.lom.ch/soap/">
attr web2com get04Data.03 <SOAP-ENV:Body>
attr web2com get04Data.04 <ns:getDpRequest>
attr web2com get04Data.05 <ref>
attr web2com get04Data.06 <oid>/1/2/5/119/7</oid>
attr web2com get04Data.07 <prop/>
attr web2com get04Data.08 </ref>
attr web2com get04Data.09 <startIndex>0</startIndex>
attr web2com get04Data.10 <count>10</count>
attr web2com get04Data.11 </ns:getDpRequest>
attr web2com get04Data.12 </SOAP-ENV:Body>
attr web2com get04Data.13 </SOAP-ENV:Envelope>'
attr web2com get04Header1 Content-Type: text/xml,charset=UTF-8
attr web2com get04Header2 SOAPAction: http://ws01.lom.ch/soap/listDP
attr web2com get04Name Relative_Feuchte
attr web2com get04Poll 1
attr web2com get04Regex value>(.*)<
attr web2com get05Data.01 <?xml version="1.0" encoding="UTF-8"?>
attr web2com get05Data.02 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ws01.lom.ch/soap/">
attr web2com get05Data.03 <SOAP-ENV:Body>
attr web2com get05Data.04 <ns:getDpRequest>
attr web2com get05Data.05 <ref>
attr web2com get05Data.06 <oid>/1/2/7/121/1</oid>
attr web2com get05Data.07 <prop/>
attr web2com get05Data.08 </ref>
attr web2com get05Data.09 <startIndex>0</startIndex>
attr web2com get05Data.10 <count>10</count>
attr web2com get05Data.11 </ns:getDpRequest>
attr web2com get05Data.12 </SOAP-ENV:Body>
attr web2com get05Data.13 </SOAP-ENV:Envelope>'
attr web2com get05Header1 Content-Type: text/xml,charset=UTF-8
attr web2com get05Header2 SOAPAction: http://ws01.lom.ch/soap/listDP
attr web2com get05Name Warmwassertemperatur
attr web2com get05Poll 1
attr web2com get05Regex value>(.*)<
attr web2com handleRedirects 1
attr web2com verbose 0

Turtle

#13
Hallo Zusammen,

ich habe jetzt viel probiert und bekomme es einfach nicht hin Werte an die Wärmepumpe zu übermitteln.
Lt. der Dokumentation für das Loxone Plugin müsste ich bei folgendem HTTP Befehl den blau markierten Wert "attr web2com get06Data.13 <value><v></value> " ändern.

attr web2com get06Data.01 <?xml version="1.0" encoding="UTF-8"?>
attr web2com get06Data.02 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ws01.lom.ch/soap/">
attr web2com get06Data.03 <SOAP-ENV:Body>
attr web2com get06Data.04 <ns:writeDpRequest>
attr web2com get06Data.05 <ref>
attr web2com get06Data.06 <oid>/1/2/5/108/0</oid>
attr web2com get06Data.07 <prop/>
attr web2com get06Data.08 </ref>
attr web2com get06Data.09 <dp>
attr web2com get06Data.10 <index>1</index>
attr web2com get06Data.11 <name/>
attr web2com get06Data.12 <desc/>
attr web2com get06Data.13 <value><v></value>
attr web2com get06Data.14 <unit/>
attr web2com get06Data.15 <timestamp>0</timestamp>
attr web2com get06Data.16 </dp>
attr web2com get06Data.17 </ns:writeDpRequest>
attr web2com get06Data.18 </SOAP-ENV:Body>
attr web2com get06Data.19 </SOAP-ENV:Envelope>
attr web2com get06Header1 Content-Type: text/xml,charset=UTF-8
attr web2com get06Header2 SOAPAction: http://ws01.lom.ch/soap/listDP
attr web2com get06Name FusspunktVLT
attr web2com get06Poll 1
attr web2com get06Regex value>(.*)<


Kann mir jemand dabei helfen ?

anbei noch das LOG und der Link zur Anleitung von Loxone und ein Link einer Anleitung für KNX. Loxone: https://docs.google.com/document/d/1yLv0sr7XpnxQWRG5UP7Pw57SWApBGzdQgvDRvWiWSgk/edit KNX:https://knx-user-forum.de/forum/%C3%B6ffentlicher-bereich/knx-eib-forum/1040604-anleitung-widgeterstellung-und-zugeh%C3%B6rige-logik-bsp-w%C3%A4rmepumpe-mit-web2com 2022.07.16 05:02:43 5: web2com: get called with FusspunktVLT
2022.07.16 05:02:43 5: web2com: get found option FusspunktVLT in attribute get06Name
2022.07.16 05:02:43 4: web2com: get will now request FusspunktVLT, no optional value
2022.07.16 05:02:43 5: web2com: AddToQueue adds type get06 to URL http://USER:123@192.168.188.43/ws, data <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ws01.lom.ch/soap/">
<SOAP-ENV:Body>
<ns:writeDpRequest>
<ref>
<oid>/1/2/5/108/0</oid>
<prop/>
</ref>
<dp>
<index>1</index>
<name/>
<desc/>
<value><v></value>
<unit/>
<timestamp>0</timestamp>
</dp>
</ns:writeDpRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>, header Content-Type: text/xml,charset=UTF-8
SOAPAction: http://ws01.lom.ch/soap/listDP, retry 0, initial queue len: 0
2022.07.16 05:02:43 5: web2com: HandleSendQueue called from AddToSendQueue, qlen = 1
2022.07.16 05:02:43 4: web2com: HandleSendQueue sends get06 with timeout 2 to http://USER:123@192.168.188.43/ws,
data: <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://ws01.lom.ch/soap/">
<SOAP-ENV:Body>
<ns:writeDpRequest>
<ref>
<oid>/1/2/5/108/0</oid>
<prop/>
</ref>
<dp>
<index>1</index>
<name/>
<desc/>
<value><v></value>
<unit/>
<timestamp>0</timestamp>
</dp>
</ns:writeDpRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>,
header: Content-Type: text/xml,charset=UTF-8
SOAPAction: http://ws01.lom.ch/soap/listDP
2022.07.16 05:02:43 5: web2com: ReadCallback called from __ANON__
2022.07.16 05:02:43 4: web2com: Read callback: request type was get06 retry 0,
header: HTTP/1.1 200 OK
Date: Sat, 16 Jul 2022 04:32:16 GMT
Cache-Control: no-cache
Content-Type: text/xml; charset=UTF-8
Connection: close, body length 528
2022.07.16 05:02:43 5: web2com: Read callback: body
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="http://ws01.lom.ch/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
  <ns:writeDpResponse>
   <ref>
    <oid>/(1) EBusRoot/(2) 520200730/(5) HEIZKREIS 2/(108) /(0) 03:01</oid>
    <prop></prop>
   </ref>
  </ns:writeDpResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

2022.07.16 05:02:43 4: web2com: BodyDecode is not decoding the response body (charset UTF-8, bodyDecode defaults to none)
2022.07.16 05:02:43 5: web2com: GetCookies is looking for Cookies
2022.07.16 05:02:43 5: web2com: ExtractSid called, context get, num 06
2022.07.16 05:02:43 4: web2com: checking for redirects, code=200, ignore=0
2022.07.16 05:02:43 4: web2com: no redirects to handle
2022.07.16 05:02:43 5: web2com: Read callback sets LAST_REQUEST to get06
2022.07.16 05:02:43 5: web2com: CheckAuth decided no authentication required
2022.07.16 05:02:43 5: web2com: ExtractReading FusspunktVLT with regex /(?^:value>(.*)<)/...
2022.07.16 05:02:43 5: web2com: ExtractReading FusspunktVLT did not match
2022.07.16 05:02:43 5: web2com: UpdateReadingList created list of reading.* nums to parse during getUpdate as
2022.07.16 05:02:43 4: web2com: Read response to get06 didn't match any Reading
2022.07.16 05:02:43 5: web2com: HandleSendQueue called from ReadCallback, qlen = 0
2022.07.16 05:02:43 5: web2com: HandleSendQueue found no usable entry in queue

Turtle

#14
Dank geoker funktioniert jetzt alles mit dem PHP Script für Loxone.

Ich habe dazu auf dem Raspberry Apache installiert
sudo apt-get install apache2
sudo apt-get install php
sudo apt-get install php-curl
danach das web2com.php Script https://github.com/christianTF/Loxone-Ochsner-web2com/blob/master/web2com.php
in das Verzeichnis /var/www/html/ kopiert.

jetzt konnte ich mit http://192.168.188.48/web2com.php?host=192.168.188.43
rot = IP von der Web2com Schnittstelle
blau = IP von Apache Webserver

Die Seite des PHP Scripts aufrufen.

hier noch die Anleitung von Christian Fenzl
https://docs.google.com/document/d/1yLv0sr7XpnxQWRG5UP7Pw57SWApBGzdQgvDRvWiWSgk/edit#

define und Attribute

http://pi3.local/web2com.php?host=192.168.1.141&user=USER&pass=NNNN&getoid=1/2/4/119/0;1/2/4/119/1;1/2/4/119/2;1/2/4/119/3;1/2/4/119/4;1/2/4/119/5


devStateIcon {my $Tist = ReadingsVal($name,"HKR1_T_Vorlauf_ist",0); my $light = ReadingsVal($name,"WP_status",0) eq "0" ? "off" : "on"; "<div>$Tist °C <a href=\"/fhem?cmd.dummy=set $name toggle&XHR=1\">".FW_makeImage($light)."</a></div>" }
reading1Name HKR1_Status
reading1Regex "1/2/4/119/0": ([\d\.]+)
reading2Name HKR1_TAussen_aktuell
reading2Regex "1/2/4/119/1": ([\d\.]+)
reading3Name HKR1_TAussen_Mittel
reading3Regex "1/2/4/119/2": ([\d\.]+)
reading4Name HKR1_TSoll_Raum
reading4Regex "1/2/4/119/3": ([\d\.]+)
reading5Name HKR1_T_Vorlauf_ist
reading5Regex "1/2/4/119/4": ([\d\.]+)
reading6Name HKR1_T_Vorlauf_soll
reading6Regex "1/2/4/119/5": ([\d\.]+)
room Heizung

set01Hint 10,20,25,30,35
set01Max 35
set01Min 6
set01Name Sollwert_Hand
set01URL http://pi3.local/web2com.php?host=192.168.1.141&user=USER&pass=NNNN&setoid=1/2/4/107/1&value=$val
set02Hint Standby,Automatik,Handbetrieb
set02IMap 0:Standby, 1:Automatik, 7:Handbetrieb
set02Max 7
set02Min 0
set02Name Betriebswahl
set02URL http://pi3.local/web2com.php?host=192.168.1.141&user=USER&pass=NNNN&setoid=1/2/4/107/0&value=$val