How can I retrieve data from a not well formed html webpage with the http-binding?

Do I have to activate the transformations in paperui as well?

I’am thinking about to install

RegEx Transformation
XSLT Transformation

and may be

Javascript Transformation

Do I need that for the http-binding as well?

Make sure to only install bindings through PaperUI from now on. If you switch over to addons.cfg be aware that addons.cfg takes precidance. So any bindings you installed in PaperUI that do not appear in addons.cfg will be uninstalled.

And now I see the error. Follow the format for the binding config defined on the README.

http="<[<url>:<refreshintervalinmilliseconds>:<transformationrule>]"

What you are missing in the above is the direction (i.e. <), and the square brackets.

http="<[AC40CacheRaw:60000:REGEX((.*))]"

AC40_Raw is updatet now every 60s. The complete Webpage is logged in the karaf konsole (I hope later I can switch that of)

But still I have an error

==> /var/log/openhab2/openhab.log <==
2017-03-21 17:56:04.980 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'Process AC40': An error occured during the script execution: The name '<XMemberFeatureCallImplCustom>.state' cannot be resolved to an item or type.


Like I said above:

You only call .state once. .state is a method on the Item. Once you call toString you are dealing with a String and there is no .state method. There is also no need to call toString again. It’s already a String. Finally, you are dealing with just a String, so unless when you open this HTML in notepad is uses < instead of < you should use <. Finally, you need to escape double quotes within the String. Should be:

val AC40corrected = AC40_Raw.state.toString.replace("<br>", "<br/>").replace("<META HTTP-EQUIV='Refresh' CONTENT='30>'", "")

Oh, my fault, I did’nt reread the whole thread.

I changed it now to

rule "Process AC40"
when
    Item AC40_Raw received update
then
    val AC40corrected = AC40_Raw.state.toString.replace("<br>", "<br/>")
    val AC40_TL300E02B01 = transform("XSLT", "AC40_TL300E02B01.xsl", AC40corrected)
    

    // Process and post the tags and values to the appropriate Items
 
    TL300E02B01.sendCommand (AC40_TL300E02B01)

end

But I’am still not error free.

==> /var/log/openhab2/openhab.log <==
2017-03-21 18:13:10.415 [WARN ] [.core.transform.TransformationHelper] - Cannot get service reference for transformation service of type XSLT
2017-03-21 18:13:10.418 [WARN ] [ore.transform.actions.Transformation] - No transformation service 'XSLT' could be found.
2017-03-21 18:13:10.427 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'Process AC40': The argument 'command' must not be null or empty.


When I relogin to karaf at the very top I have the follwoing errors:

2017-03-21 18:10:09.508 [WARN ] [.core.transform.TransformationHelper] - Cannot get service reference for transformation service of type REGEX
2017-03-21 18:10:09.511 [WARN ] [ab.binding.http.internal.HttpBinding] - Couldn't transform response because transformationService of type 'REGEX' is unavailable
2017-03-21 18:10:09.564 [WARN ] [.core.transform.TransformationHelper] - Cannot get service reference for transformation service of type XSLT
2017-03-21 18:10:09.568 [WARN ] [ore.transform.actions.Transformation] - No transformation service 'XSLT' could be found.
2017-03-21 18:10:09.578 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'Process AC40': The argument 'command' must not be null or empty.
2017-03-21 18:11:09.781 [WARN ] [.core.transform.TransformationHelper] - Cannot get service reference for transformation service of type REGEX
2017-03-21 18:11:09.786 [WARN ] [ab.binding.http.internal.HttpBinding] - Couldn't transform response because transformationService of type 'REGEX' is unavailable
2017-03-21 18:11:09.833 [WARN ] [.core.transform.TransformationHelper] - Cannot get service reference for transformation service of type XSLT
2017-03-21 18:11:09.838 [WARN ] [ore.transform.actions.Transformation] - No transformation service 'XSLT' could be found.
2017-03-21 18:11:09.848 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'Process AC40': The argument 'command' must not be null or empty.


You must also install the REGEX transform.

I installed now

REGEX and XSLT Transform

I changed to

    val AC40corrected = AC40_Raw.state.toString.replace("<br>", "<br/>").replace("<META HTTP-EQUIV='Refresh' CONTENT='30>'", "")

AC40_Raw is still marked with an error. “The method or field AC40_Raw is undefined”

In the log I get

==> /var/log/openhab2/openhab.log <==
2017-03-21 18:35:35.401 [ERROR] [t.internal.XsltTransformationService] - transformation throws exception
javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: The declaration for the entity "HTML.Version" must end with '>'.
 

An other problem is, that I get the page in one call two times.

 "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="30">
<title> Address List </title>
<style type="text/css">
body { background-color:#C0C0C0; color:#0000FF; }
</style>
</head>

<body>

<h2>Liste der ausgew&auml;hlten FG-Adressen:</h2>
----------------------------------------------------------------------------------------------------
<br><pre><b>TA300A00B91       </b>Dachgeschosstemperatur              Analogeingang mit Grenzwert
<br>21-03-17  19:36:30            <a href="fga/TA300A00B91     " target="_blank">22.63681 </a>
<br></pre>                                                                                           
----------------------------------------------------------------------------------------------------
<br><pre><b>TH300A00Z01       </b>Stromzaehler Heizung                Zaehlwert mit Grenzwert
<br>21-03-17  19:36:30            <a href="fga/TH300A00Z01     " target="_blank">1556.001 </a>
<br></pre>                                                                                               
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300A00A01       </b>Generalbefehl                       1 stufiger Befehlspunkt
<br>21-03-17  19:36:30            <a href="fga/TL300A00A01     " target="_blank">EIN1  </a>
<br></pre>                                                                                                  
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300A00A02       </b>Sommerbetrieb                       1 stufiger Befehlspunkt
<br>21-03-17  19:36:30            <a href="fga/TL300A00A02     " target="_blank">AUS  </a>
<br></pre>                                                                                                   
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300A00Q10       </b>Aussenluftklappen AUF               1 stufiger Befehlspunkt
<br>21-03-17  19:36:30            <a href="fga/TL300A00Q10     " target="_blank">EIN1  </a>
<br></pre>                                                                                                  
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300A00Q11       </b>Aussenluftklappen FRG               1 stufiger Befehlspunkt
<br>21-03-17  19:36:30            <a href="fga/TL300A00Q11     " target="_blank">AUS  </a>
<br></pre>                                                                                                   
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300A00Q12       </b>Aussenluftklappen AUF               1 stufiger Befehlspunkt
<br>21-03-17  19:36:30            <a href="fga/TL300A00Q12     " target="_blank">AUS  </a>
<br></pre>                                                                                                   
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E01B01       </b>Aussenluftlufttemperatur            Analogeingang mit Grenzwert
<br>21-03-17  19:36:30            <a href="fga/TL300E01B01     " target="_blank">7.338314 </a>
<br></pre>                                                                                           
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E01F11       </b>Frostschutz                         Alarmmeldung
<br>21-03-17  19:36:30            <a href="fga/TL300E01F11     " target="_blank">  </a>
<br></pre>                                                                                                                 
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E01Z01       </b>Stromzaehler Vorerhitzer            Zaehlwert mit Grenzwert
<br>21-03-17  19:36:30            <a href="fga/TL300E01Z01     " target="_blank">15.8 </a>
<br></pre>                                                                                                   
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E02A01       </b>Freigabe Heizstab                   1 stufiger Befehlspunkt
<br>21-03-17  19:36:30            <a href="fga/TL300E02A01     " target="_blank">EIN1  </a>
<br></pre>                                                                                                  
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E02B01       </b>Zulufttemperatur                    Analogeingang mit Grenzwert
<br>21-03-17  19:36:30            <a href="fga/TL300E02B01     " target="_blank">20.14925 </a>
<br></pre>                                                                                           
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E02D01       </b>SW Zulufttemperatur                 Analogausgang
<br>21-03-17  19:36:30            <a href="fga/TL300E02D01     " target="_blank">20 </a>
<br></pre>                                                                                                               
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E02Q01       </b>Heizstab                            Analogausgang
<br>21-03-17  19:36:30            <a href="fga/TL300E02Q01     " target="_blank">26.52808 </a>
<br></pre>                                                                                                         
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E02Z01       </b>Stromzaehler Erhitzer               Zaehlwert mit Grenzwert
<br>21-03-17  19:36:30            <a href="fga/TL300E02Z01     " target="_blank">1528.202 </a>
<br></pre>                                                                                               
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E51B01       </b>Raumablufttemperatur                Analogeingang mit Grenzwert
<br>21-03-17  19:36:30            <a href="fga/TL300E51B01     " target="_blank">19.90049 </a>
<br></pre>                                                                                           
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300G01M01       </b>Zuluftventilator                    1 stufiger Befehlspunkt
<br>21-03-17  19:36:30            <a href="fga/TL300G01M01     " target="_blank">EIN1  </a>
<br></pre>                                                                                                  
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300G01Z01       </b>Stromzaehler Ventilator             Zaehlwert mit Grenzwert
<br>21-03-17  19:36:30            <a href="fga/TL300G01Z01     " target="_blank">1294.539 </a>
<br></pre>                                                                                               
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300G51B01       </b>Fortlufttemperatur                  Analogeingang mit Grenzwert
<br>21-03-17  19:36:30            <a href="fga/TL300G51B01     " target="_blank">14.67662 </a>
<br></pre>                                                                                           
</body>
</html> to <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="30">
<title> Address List </title>
<style type="text/css">
body { background-color:#C0C0C0; color:#0000FF; }
</style>
</head>

<body>

<h2>Liste der ausgew&auml;hlten FG-Adressen:</h2>
----------------------------------------------------------------------------------------------------
<br><pre><b>TA300A00B91       </b>Dachgeschosstemperatur              Analogeingang mit Grenzwert
<br>21-03-17  19:37:30            <a href="fga/TA300A00B91     " target="_blank">22.63681 </a>
<br></pre>                                                                                           
----------------------------------------------------------------------------------------------------
<br><pre><b>TH300A00Z01       </b>Stromzaehler Heizung                Zaehlwert mit Grenzwert
<br>21-03-17  19:37:30            <a href="fga/TH300A00Z01     " target="_blank">1556.001 </a>
<br></pre>                                                                                               
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300A00A01       </b>Generalbefehl                       1 stufiger Befehlspunkt
<br>21-03-17  19:37:30            <a href="fga/TL300A00A01     " target="_blank">EIN1  </a>
<br></pre>                                                                                                  
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300A00A02       </b>Sommerbetrieb                       1 stufiger Befehlspunkt
<br>21-03-17  19:37:30            <a href="fga/TL300A00A02     " target="_blank">AUS  </a>
<br></pre>                                                                                                   
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300A00Q10       </b>Aussenluftklappen AUF               1 stufiger Befehlspunkt
<br>21-03-17  19:37:30            <a href="fga/TL300A00Q10     " target="_blank">EIN1  </a>
<br></pre>                                                                                                  
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300A00Q11       </b>Aussenluftklappen FRG               1 stufiger Befehlspunkt
<br>21-03-17  19:37:30            <a href="fga/TL300A00Q11     " target="_blank">AUS  </a>
<br></pre>                                                                                                   
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300A00Q12       </b>Aussenluftklappen AUF               1 stufiger Befehlspunkt
<br>21-03-17  19:37:30            <a href="fga/TL300A00Q12     " target="_blank">AUS  </a>
<br></pre>                                                                                                   
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E01B01       </b>Aussenluftlufttemperatur            Analogeingang mit Grenzwert
<br>21-03-17  19:37:30            <a href="fga/TL300E01B01     " target="_blank">2.363186 </a>
<br></pre>                                                                                           
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E01F11       </b>Frostschutz                         Alarmmeldung
<br>21-03-17  19:37:30            <a href="fga/TL300E01F11     " target="_blank">  </a>
<br></pre>                                                                                                                 
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E01Z01       </b>Stromzaehler Vorerhitzer            Zaehlwert mit Grenzwert
<br>21-03-17  19:37:30            <a href="fga/TL300E01Z01     " target="_blank">15.8 </a>
<br></pre>                                                                                                   
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E02A01       </b>Freigabe Heizstab                   1 stufiger Befehlspunkt
<br>21-03-17  19:37:30            <a href="fga/TL300E02A01     " target="_blank">EIN1  </a>
<br></pre>                                                                                                  
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E02B01       </b>Zulufttemperatur                    Analogeingang mit Grenzwert
<br>21-03-17  19:37:30            <a href="fga/TL300E02B01     " target="_blank">20.02488 </a>
<br></pre>                                                                                           
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E02D01       </b>SW Zulufttemperatur                 Analogausgang
<br>21-03-17  19:37:30            <a href="fga/TL300E02D01     " target="_blank">20 </a>
<br></pre>                                                                                                               
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E02Q01       </b>Heizstab                            Analogausgang
<br>21-03-17  19:37:30            <a href="fga/TL300E02Q01     " target="_blank">24.94317 </a>
<br></pre>                                                                                                         
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E02Z01       </b>Stromzaehler Erhitzer               Zaehlwert mit Grenzwert
<br>21-03-17  19:37:30            <a href="fga/TL300E02Z01     " target="_blank">1528.202 </a>
<br></pre>                                                                                               
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300E51B01       </b>Raumablufttemperatur                Analogeingang mit Grenzwert
<br>21-03-17  19:37:30            <a href="fga/TL300E51B01     " target="_blank">15.04975 </a>
<br></pre>                                                                                           
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300G01M01       </b>Zuluftventilator                    1 stufiger Befehlspunkt
<br>21-03-17  19:37:30            <a href="fga/TL300G01M01     " target="_blank">EIN1  </a>
<br></pre>                                                                                                  
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300G01Z01       </b>Stromzaehler Ventilator             Zaehlwert mit Grenzwert
<br>21-03-17  19:37:30            <a href="fga/TL300G01Z01     " target="_blank">1294.539 </a>
<br></pre>                                                                                               
----------------------------------------------------------------------------------------------------
<br><pre><b>TL300G51B01       </b>Fortlufttemperatur                  Analogeingang mit Grenzwert
<br>21-03-17  19:37:30            <a href="fga/TL300G51B01     " target="_blank">9.701497 </a>
<br></pre>                                                                                           
</body>
</html>
2017-03-21 18:44:54.558 [ItemStateChangedEvent     ] - MB_I_Reg_03 changed from 285 to 291

I supose the

<META HTTP-EQUIV="Refresh" CONTENT="30">

the auto refresh every 30 seconds may cause this problem. I will change the rule refresh time to 30 seconds

The error indicates you need to make more changes to the HTML to make it valid XML.

This could be caused by receiving the page twice.

What do you mean by that.

I deleted the line

AC40CacheRaw.updateInterval=60000  // deleted in http.cfg

After that the first event had only one time the page, but with the second event the page comes allwas double with a time difference of exact 60 Seconds. It looks like the cache file contains allways the newest an the last before page. Is that right? (I just tried with 20 seconds, an I get the page twice with a timeoffset of 20 second)

If we check in the rule the state of that item, do we see both pages or just the last one?

I added some loginfo lines

    logInfo("Process AC40", "Beginn Auswertung")
    val AC40corrected = AC40_Raw.state.toString.replace("<br>", "<br/>").replace("<META HTTP-EQUIV='Refresh' CONTENT='30>'", "")
    logInfo("Process AC40", AC40corrected)
    logInfo("Process AC40", "Ende Auswertung")

and get following result. As you can see, the first replace is working the second not! So we have a problem with the double quotes.

2017-03-21 19:33:32.232 [INFO ] [.smarthome.model.script.Process AC40] - Beginn Auswertung
2017-03-21 19:33:32.242 [INFO ] [.smarthome.model.script.Process AC40] - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="30">
<title> Address List </title>
<style type="text/css">
body { background-color:#C0C0C0; color:#0000FF; }
</style>
</head>

<body>

<h2>Liste der ausgew&auml;hlten FG-Adressen:</h2>
----------------------------------------------------------------------------------------------------
<br/><pre><b>TA300A00B91       </b>Dachgeschosstemperatur              Analogeingang mit Grenzwert
<br/>21-03-17  20:26:40            <a href="fga/TA300A00B91     " target="_blank">22.88558 </a>
<br/></pre>                                                                                           
----------------------------------------------------------------------------------------------------
<br/><pre><b>TL300E01B01       </b>Aussenluftlufttemperatur            Analogeingang mit Grenzwert
<br/>21-03-17  20:26:40            <a href="fga/TL300E01B01     " target="_blank">1.865673 </a>
<br/></pre>                                                                                           
----------------------------------------------------------------------------------------------------
<br/><pre><b>TL300E02B01       </b>Zulufttemperatur                    Analogeingang mit Grenzwert
<br/>21-03-17  20:26:40            <a href="fga/TL300E02B01     " target="_blank">20.14925 </a>
<br/></pre>                                                                                           
----------------------------------------------------------------------------------------------------
<br/><pre><b>TL300E51B01       </b>Raumablufttemperatur                Analogeingang mit Grenzwert
<br/>21-03-17  20:26:40            <a href="fga/TL300E51B01     " target="_blank">15.29851 </a>
<br/></pre>                                                                                           
----------------------------------------------------------------------------------------------------
<br/><pre><b>TL300G51B01       </b>Fortlufttemperatur                  Analogeingang mit Grenzwert
<br/>21-03-17  20:26:40            <a href="fga/TL300G51B01     " target="_blank">9.452741 </a>
<br/></pre>                                                                                           
</body>
</html>
2017-03-21 19:33:32.247 [INFO ] [.smarthome.model.script.Process AC40] - Ende Auswertung

Replace looks for exact matches. You can’t just replace " with ‘`’.

But you can escape the double quotes:

replace("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"30\">", "")

Also, in your line above your closing ' is in the wrong place, is should be '30'> not '30>'

by trying different ways to replace to double quotes I messed it up. Sorry about that.

Now both replaces are working. Yeah!!!

But I still get the error

2017-03-21 21:11:51.234 [INFO ] [.smarthome.model.script.Process AC40] - Ende Auswertung
2017-03-21 21:12:06.560 [ERROR] [t.internal.XsltTransformationService] - transformation throws exception
javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: The declaration for the entity "HTML.Version" must end with '>'.
  

I supose I have a problem with the first two lines of the html

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">

They look correct. May be that the xslt transformer has a problem with the line break? Does the Transformer expect a oneliner?

Is it a real line break or just a line wrap?

Typically new lines don’t matter but I I know that the header element of an XML document follows different rules. That is the first thing I would try to fix it.

I called the webpage in firefox and copied to notepad++

There I showed all characters

Also in the source of firefox you can assume that there is a real line break. Because it has its own line number

I just tried to replace the first line with nothing and the second line as full line.

But this is not working

AC40corrected.replace("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"","")

If I append the replace after the first two replaces it works. Is it not possible to replace text in variable?

The String with the replaced text gets returned. The original String remains unchanged. You would need to use:

AC40corrected = AC40corrected.replace("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"","")

I’ve written it now in a very long oneliner.

But I still get this version error!

Thank for the tip with the variable. I should have seen that, but I was concentrated with escaping the double quotes :slight_smile:

The missing “>” has to be a different place and perhabs nothing to do with the version.

Here comes the complete error log

==> /var/log/openhab2/openhab.log <==
2017-03-21 22:04:14.978 [ERROR] [t.internal.XsltTransformationService] - transformation throws exception
javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: The declaration for the entity "HTML.Version" must end with '>'.
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:749)[:1.8.0_112]
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:351)[:1.8.0_112]
        at org.eclipse.smarthome.transform.xslt.internal.XsltTransformationService.transform(XsltTransformationService.java:82)
        at org.eclipse.smarthome.core.transform.actions.Transformation.transform(Transformation.java:43)
        at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_112]
        at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_112]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.invokeOperation(XbaseInterpreter.java:1085)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.invokeOperation(XbaseInterpreter.java:1060)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._invokeFeature(XbaseInterpreter.java:1046)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.invokeFeature(XbaseInterpreter.java:991)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.smarthome.model.script.interpreter.ScriptInterpreter.invokeFeature(ScriptInterpreter.java:114)[129:org.eclipse.smarthome.model.script:0.9.0.b4]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._doEvaluate(XbaseInterpreter.java:901)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._doEvaluate(XbaseInterpreter.java:864)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.doEvaluate(XbaseInterpreter.java:223)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:203)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._doEvaluate(XbaseInterpreter.java:826)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.doEvaluate(XbaseInterpreter.java:263)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:203)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._doEvaluate(XbaseInterpreter.java:446)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.doEvaluate(XbaseInterpreter.java:227)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:203)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.evaluate(XbaseInterpreter.java:189)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.smarthome.model.script.runtime.internal.engine.ScriptImpl.execute(ScriptImpl.java:77)[130:org.eclipse.smarthome.model.script.runtime:0.9.0.b4]
        at org.eclipse.smarthome.model.script.engine.ScriptExecutionThread.run(ScriptExecutionThread.java:42)[129:org.eclipse.smarthome.model.script:0.9.0.b4]
Caused by: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: The declaration for the entity "HTML.Version" must end with '>'.
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(TransformerImpl.java:578)[:1.8.0_112]
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:739)[:1.8.0_112]
        ... 24 more
Caused by: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: The declaration for the entity "HTML.Version" must end with '>'.
        at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:427)[:1.8.0_112]
        at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:215)[:1.8.0_112]
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(TransformerImpl.java:556)[:1.8.0_112]
        ... 25 more
2017-03-21 22:04:15.015 [ERROR] [ore.transform.actions.Transformation] - Error executing the transformation 'XSLT': transformation throws exception
2017-03-21 22:04:15.021 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'Process AC40': The argument 'command' must not be null or empty.

An tis is the prepared xml for the transforming.

2017-03-21 22:05:59.862 [INFO ] [.smarthome.model.script.Process AC40] - Beginn Auswertung
2017-03-21 22:05:59.885 [INFO ] [.smarthome.model.script.Process AC40] -
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>

<title> Address List </title>
<style type="text/css">
body { background-color:#C0C0C0; color:#0000FF; }
</style>
</head>

<body>

<h2>Liste der ausgew&auml;hlten FG-Adressen:</h2>
----------------------------------------------------------------------------------------------------
<br/><pre><b>TA300A00B91       </b>Dachgeschosstemperatur              Analogeingang mit Grenzwert
<br/>21-03-17  22:59:08            <a href="fga/TA300A00B91     " target="_blank">22.76119 </a>
<br/></pre>
----------------------------------------------------------------------------------------------------
<br/><pre><b>TL300E01B01       </b>Aussenluftlufttemperatur            Analogeingang mit Grenzwert
<br/>21-03-17  22:59:08            <a href="fga/TL300E01B01     " target="_blank">6.592045 </a>
<br/></pre>
----------------------------------------------------------------------------------------------------
<br/><pre><b>TL300E02B01       </b>Zulufttemperatur                    Analogeingang mit Grenzwert
<br/>21-03-17  22:59:08            <a href="fga/TL300E02B01     " target="_blank">21.39304 </a>
<br/></pre>
----------------------------------------------------------------------------------------------------
<br/><pre><b>TL300E51B01       </b>Raumablufttemperatur                Analogeingang mit Grenzwert
<br/>21-03-17  22:59:08            <a href="fga/TL300E51B01     " target="_blank">21.89055 </a>
<br/></pre>
----------------------------------------------------------------------------------------------------
<br/><pre><b>TL300G51B01       </b>Fortlufttemperatur                  Analogeingang mit Grenzwert
<br/>21-03-17  22:59:08            <a href="fga/TL300G51B01     " target="_blank">16.54229 </a>
<br/></pre>
</body>
</html>
2017-03-21 22:05:59.891 [INFO ] [.smarthome.model.script.Process AC40] - Ende Auswertung


Try eliminating that first line entirely. I don’t think XSLT requires a DOCTYPE to work.

Done

No the error log has changed

2017-03-21 22:13:01.093 [ERROR] [t.internal.XsltTransformationService] - transformation throws exception
javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: The entity "auml" was referenced, but not declared.
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:749)[:1.8.0_112]
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:351)[:1.8.0_112]
        at org.eclipse.smarthome.transform.xslt.internal.XsltTransformationService.transform(XsltTransformationService.java:82)
        at org.eclipse.smarthome.core.transform.actions.Transformation.transform(Transformation.java:43)
        at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_112]
        at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_112]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.invokeOperation(XbaseInterpreter.java:1085)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.invokeOperation(XbaseInterpreter.java:1060)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._invokeFeature(XbaseInterpreter.java:1046)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.invokeFeature(XbaseInterpreter.java:991)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.smarthome.model.script.interpreter.ScriptInterpreter.invokeFeature(ScriptInterpreter.java:114)[129:org.eclipse.smarthome.model.script:0.9.0.b4]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._doEvaluate(XbaseInterpreter.java:901)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._doEvaluate(XbaseInterpreter.java:864)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.doEvaluate(XbaseInterpreter.java:223)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:203)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._doEvaluate(XbaseInterpreter.java:826)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.doEvaluate(XbaseInterpreter.java:263)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:203)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._doEvaluate(XbaseInterpreter.java:446)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.doEvaluate(XbaseInterpreter.java:227)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:203)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.evaluate(XbaseInterpreter.java:189)[145:org.eclipse.xtext.xbase:2.9.2.v20160428-1452]
        at org.eclipse.smarthome.model.script.runtime.internal.engine.ScriptImpl.execute(ScriptImpl.java:77)[130:org.eclipse.smarthome.model.script.runtime:0.9.0.b4]
        at org.eclipse.smarthome.model.script.engine.ScriptExecutionThread.run(ScriptExecutionThread.java:42)[129:org.eclipse.smarthome.model.script:0.9.0.b4]
Caused by: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: The entity "auml" was referenced, but not declared.
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(TransformerImpl.java:578)[:1.8.0_112]
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:739)[:1.8.0_112]
        ... 24 more
Caused by: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: The entity "auml" was referenced, but not declared.
        at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:427)[:1.8.0_112]
        at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:215)[:1.8.0_112]
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(TransformerImpl.java:556)[:1.8.0_112]
        ... 25 more
2017-03-21 22:13:01.129 [ERROR] [ore.transform.actions.Transformation] - Error executing the transformation 'XSLT': transformation throws exception
2017-03-21 22:13:01.136 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'Process AC40': The argument 'command' must not be null or empty.


I eleminated this line as well

<h2>Liste der ausgew&auml;hlten FG-Adressen:</h2>

No I’am missing the error logs. :grinning:

But what I was trying to do? Ah I wanted to transfer some important values to an item.

This still fails

2017-03-21 22:18:02.420 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'Process AC40': The argument 'command' must not be null or empty.


It doesn’t like this part of the header string.

That is the HTML escaped character for the ä.

XML does not include everything that HMTL does when it comes to escaped characters and such so it is likely this is not part of standard XML.

Try replace("&auml;", "ä").

Look for other places where there might be an HMTL escaped character and replace those as well.