Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

[HTTP Binding] Encoding bug with umlauts in website #5514

Open
Mr-iX opened this issue Mar 12, 2018 · 37 comments
Open

[HTTP Binding] Encoding bug with umlauts in website #5514

Mr-iX opened this issue Mar 12, 2018 · 37 comments

Comments

@Mr-iX
Copy link

Mr-iX commented Mar 12, 2018

The binding does not support umlauts on a html site with the encoding ISO-8859-1.
When I print out the value saved in a item, I get the following output:
11. M�rz 2018

This is my item:
String Temp_Date "Datum [%s]" <calendar> { http="<[datenlogger:3000:REGEX((?s).*Datum.*([1-3 ][0-9]. [A-zöäü]+ [0-9]{4})..font.*)]" }

Website code:

<tr><td width="22%" height="47"><font color="Gray"><b><nobr>Datum</nobr></b></font></td>
<td align="center" width="7%" height="47"><img border="0" src="cal.gif" width="51" height="40"></td>
<td align="center" width="52%" height="47" colspan="7"><b><font size="4">Mittwoch, 7. März 2018</font></b></td></tr>
<tr><td width="22%" height="46"><font color="Gray"><b><nobr>Zeit</nobr></b></font></td>
<td align="center" width="7%" height="46"><img border="0" src="clock.gif" width="41" height="40"></td>
<td align="center" width="52%" height="47" colspan="7"><b><font size="5">19:30</font></b></td></tr>
<tr><td width="22%" height="46"><font color="Gray"><b><nobr>Temperatur Innen</nobr></b></font></td>

Meta tags from the website:

<!doctype html public "-//w3c//dtd html 3.2//en">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">

We already adressed this issue in this OpenHAB Community Thread: https://community.openhab.org/t/http-binding-problem-with-umlauts/41355

I'm using OpenHAB 2.2 Release on a Debian 8 environment.

@9037568
Copy link
Contributor

9037568 commented Mar 13, 2018

I don't believe there's anything wrong with the binding.

Here's what I see in Basic UI:

image

@9037568
Copy link
Contributor

9037568 commented Mar 13, 2018

Here's my item:

String Anne "Anne [%s]" {http="<[http://www.staor.net/months.html:30000:XPATH(//ul/li[3])]"}

@9037568
Copy link
Contributor

9037568 commented Mar 13, 2018

And this is the input HTML:

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <title>Something something</title>
  </head>
  <body>
    Here's some text.
    <p/>
    Month names:
    <ul id="months">
      <li>Januar</li>
      <li>Februar</li>
      <li>März</li>
      <li>April</li>
      <li>Mai</li>
      <li>Juni</li>
      <li>Juli</li>
      <li>August</li>
      <li>September</li>
      <li>Oktober</li>
      <li>November</li>
      <li>Dezember</li>
    </ul>
  </body>
</html>

@Mr-iX
Copy link
Author

Mr-iX commented Mar 14, 2018

So now I've got some time to test your item.

I have added the item as you wrote it
String Anne "Anne [%s]" {http="<[http://www.staor.net/months.html:3000:XPATH(//ul/li[3])]"}
and I get the following output in the Basic UI:
bildschirmfoto 2018-03-14 um 21 03 03

I have also tried reinstalling the HTTP-Binding without success.
Have you also installed this version? binding-http1 - 1.11.0

@9037568
Copy link
Contributor

9037568 commented Mar 14, 2018

In regard to the version, 1.11.0 is the same as the current snapshot. No changes have been made.

This is beginning to smell like a UI problem. What browser are you using?

Also, if you check the events.log, you should see the value update:

2018-03-14 18:07:09.562 [ItemStateChangedEvent     ] - Anne changed from NULL to März

Here's the byte view:

000077a0h: 20 5D 20 2D 20 41 6E 6E 65 20 63 68 61 6E 67 65 ;  ] - Anne change
000077b0h: 64 20 66 72 6F 6D 20 4E 55 4C 4C 20 74 6F 20 4D ; d from NULL to M
000077c0h: E4 72 7A                                        ; ärz

@9037568 9037568 changed the title [http] Encoding bug with umlauts in website [HTTP] Encoding bug with umlauts in website Mar 14, 2018
@Mr-iX
Copy link
Author

Mr-iX commented Mar 15, 2018

I tried it with the iOS OpenHAB App, Safari on macOS, Chromium and Firefox on Windows. In every browser the same behavior.

So in the events.log I get this message:
2018-03-15 19:26:21.147 [vent.ItemStateChangedEvent] - Anne changed from NULL to M�rz
I don't know how I can see the log message in byte view.

@9037568
Copy link
Contributor

9037568 commented Mar 16, 2018

Most unixes (unii?) allow something like od -xc file1. See this doc.

@9037568
Copy link
Contributor

9037568 commented Mar 16, 2018

Also, I went back and checked your original posting of the website code you're working with, and the character indeed appears to be encoded in UTF-8 and not 8859-1:

00000010h: 2C 20 37 2E 20 4D C3 A4 72 7A 20 32 30 31 38    ; , 7. März 2018

@Mr-iX
Copy link
Author

Mr-iX commented Mar 16, 2018

So this should be the dump of the Anne item:

0000360    3530    343a    3a32    3031    342e    3439    5b20    6576
          0   5   :   4   2   :   1   0   .   4   9   4       [   v   e
0000400    746e    492e    6574    536d    6174    6574    6843    6e61
          n   t   .   I   t   e   m   S   t   a   t   e   C   h   a   n
0000420    6567    4564    6576    746e    205d    202d    6e41    656e
          g   e   d   E   v   e   n   t   ]       -       A   n   n   e
0000440    6320    6168    676e    6465    6620    6f72    206d    554e
              c   h   a   n   g   e   d       f   r   o   m       N   U
0000460    4c4c    7420    206f    ef4d    bdbf    7a72    320a    3130
          L   L       t   o       M 357 277 275   r   z  \n   2   0   1
0000500    2d38    3330    312d    2036    3530    343a    3a32    3931
          8   -   0   3   -   1   6       0   5   :   4   2   :   1   9
0000520    322e    3039    5b20    6576    746e    492e    6574    536d
          .   2   9   0       [   v   e   n   t   .   I   t   e   m   S

So this is a part of the website. It should say "Wetterübersicht"

0001200      0d0a    3c0a    4954    4c54    3e45    6557    7474    7265
          \n  \r  \n   <   T   I   T   L   E   >   W   e   t   t   e   r
0001220      62fc    7265    6973    6863    2074    4d57    2d52    3239
         374   b   e   r   s   i   c   h   t       W   M   R   -   9   2

Github could also change the encoding to UTF-8 when you paste them.

@9037568
Copy link
Contributor

9037568 commented Mar 16, 2018

This:

 ef4d    bdbf    7a72    320a    3130
          L   L       t   o       M 357 277 275

actually matches the output you had posted in the forum:

11. M�rz 2018

0xef = LATIN SMALL LETTER I WITH DIAERESIS
0xbf =INVERTED QUESTION MARK
0xbd = VULGAR FRACTION ONE HALF

So it looks to me like your input file has the u diaeresis correctly encoded, but not the a diaeresis.

@Mr-iX
Copy link
Author

Mr-iX commented Mar 17, 2018

But I tried also your website, which works for you.
So the problem cannot be the website.

@9037568
Copy link
Contributor

9037568 commented Mar 17, 2018

The only other thing I can think of for you to try at this point would be to get a DEBUG log or a network sniff and see if you can get a look at the data as it comes in off the wire.

@Mr-iX
Copy link
Author

Mr-iX commented Mar 17, 2018

The debug log isn't really helpful:

2018-03-17 19:47:51.811 [DEBUG] [ab.binding.http.internal.HttpBinding] - item 'Anne' is about to be refreshed now
2018-03-17 19:47:52.018 [DEBUG] [ab.binding.http.internal.HttpBinding] - transformed response is 'M�rz'

This is the packet, that comes from the site www.staor.net (IP: 45.55.67.26) for getting the item Anne.
wireshark

@Mr-iX
Copy link
Author

Mr-iX commented Mar 17, 2018

So now I also captured my website with the date I parse in OpenHAB.
In the packet capture the "ä" of "März" has the hex value "e4".
When I look for this hex value in a ISO 8859-1 table, it says that it is a "ä". So everything is fine there and the problem is definitely in OpenHAB.

Packet capture:
packet

Charset table:
charset
https://wikipedia.org/wiki/ISO_8859-1

@9037568
Copy link
Contributor

9037568 commented Mar 18, 2018

Here's an idea. I created a new file that contains only the name of the month and nothing else.
Create a new item that pulls this text with NO transform:

String Burgundy "Burgundy [%s]" {http="<[http://www.staor.net/march.html:30000]"}

If the output is different, then the problem is in the transform. If the output is still the same, my next suggestion will be to put the http transport (org.openhab.io.net.http) into trace mode, rerun and recheck logs.

@Mr-iX
Copy link
Author

Mr-iX commented Mar 20, 2018

This Burgundy item won't work, because the http binding needs a transformation.

2018-03-20 20:53:18.780 [ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type 'http' of item 'Burgundy' could not be parsed correctly.
org.eclipse.smarthome.model.item.BindingConfigParseException: bindingConfig 'http://www.staor.net/march.html:300' doesn't represent a valid in-binding-configuration. A valid configuration is matched by the RegExp '(.*?)(\{.*\})?:(?!//)(\d*):(.*)'
	at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:51) [227:org.openhab.core.compat1x:2.2.0]
	at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:341) [136:org.eclipse.smarthome.model.item:0.10.0.b1]
	at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:310) [136:org.eclipse.smarthome.model.item:0.10.0.b1]
	at org.eclipse.smarthome.model.item.internal.GenericItemProvider.processBindingConfigsFromModel(GenericItemProvider.java:195) [136:org.eclipse.smarthome.model.item:0.10.0.b1]
	at org.eclipse.smarthome.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:377) [136:org.eclipse.smarthome.model.item:0.10.0.b1]
	at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:314) [135:org.eclipse.smarthome.model.core:0.10.0.b1]
	at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:143) [135:org.eclipse.smarthome.model.core:0.10.0.b1]
	at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:247) [135:org.eclipse.smarthome.model.core:0.10.0.b1]
	at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.processWatchEvent(FolderObserver.java:311) [135:org.eclipse.smarthome.model.core:0.10.0.b1]
	at org.eclipse.smarthome.core.service.WatchQueueReader.run(WatchQueueReader.java:209) [110:org.eclipse.smarthome.core:0.10.0.b1]
	at java.lang.Thread.run(Thread.java:748) [?:?]

This is the log when I set the http binding and the http transport to trace mode:

2018-03-20 21:01:57.335 [DEBUG] [ab.binding.http.internal.HttpBinding] - item 'Anne' is about to be refreshed now
2018-03-20 21:01:57.336 [DEBUG] [org.openhab.io.net.http.HttpUtil    ] - About to execute 'http://www.staor.net/months.html'
2018-03-20 21:01:57.537 [DEBUG] [org.openhab.io.net.http.HttpUtil    ] - <html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <title>Something something</title>
  </head>
  <body>
    Here's some text.
    <p/>
    Month names:
    <ul id="months">
      <li>Januar</li>
      <li>Februar</li>
      <li>M�rz</li>
      <li>April</li>
      <li>Mai</li>
      <li>Juni</li>
      <li>Juli</li>
      <li>August</li>
      <li>September</li>
      <li>Oktober</li>
      <li>November</li>
      <li>Dezember</li>
    </ul>
  </body>
</html>

2018-03-20 21:01:57.544 [DEBUG] [ab.binding.http.internal.HttpBinding] - transformed response is 'M�rz'
2018-03-20 21:01:57.547 [TRACE] [ab.binding.http.internal.HttpBinding] - Couldn't find matching binding provider [itemName=Anne, command=CHANGED]

@9037568
Copy link
Contributor

9037568 commented Mar 20, 2018

Well that's unfortunate. I mean, it makes sense, because in almost all cases you wouldn't want the entire contents of the URL you're pulling.

You could try a regex transform like (.*).

Maybe I can find a way to write an identity transform that just passes the content through unchanged...

@Mr-iX
Copy link
Author

Mr-iX commented Mar 21, 2018

So the output of
String Burgundy "Burgundy [%s]" {http="<[http://www.staor.net/march.html:300:REGEX((?s)(.*))]"}
is the same:
M�rz

But I don't think that the issue is in the transform, because when I enabled the trace log for the http transport, the umlauts are already displayed wrong. That means there is an issue before the transformation rule comes in.

@9037568
Copy link
Contributor

9037568 commented Mar 21, 2018

Please post your trace log (note: not copy and paste)

@Mr-iX
Copy link
Author

Mr-iX commented Mar 23, 2018

So now I have changed the org.ops4j.pax.logging.cfg file to output the http logs in a separate file.

log4j2.logger.http.name = org.openhab.binding.http
log4j2.logger.http.level = TRACE
log4j2.logger.http.additivity = false
log4j2.logger.http.appenderRefs = http
log4j2.logger.http.appenderRef.http.ref = HTTP

log4j2.logger.io_http.name = org.openhab.io.net.http
log4j2.logger.io_http.level = TRACE
log4j2.logger.io_http.additivity = false
log4j2.logger.io_http.appenderRefs = http
log4j2.logger.io_http.appenderRef.http.ref = HTTP


log4j2.appender.http.name = HTTP
log4j2.appender.http.type = RollingRandomAccessFile
log4j2.appender.http.fileName = /var/log/openhab2/http.log
log4j2.appender.http.filePattern = /var/log/openhab2/http.log.%i
log4j2.appender.http.immediateFlush = true
log4j2.appender.http.append = true
log4j2.appender.http.layout.type = PatternLayout
log4j2.appender.http.layout.pattern = %d{dd-MMM-yyyy HH:mm:ss.SSS} [%-5.5p] [%-50.50c] - %m%n
log4j2.appender.http.policies.type = Policies
log4j2.appender.http.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.http.policies.size.size = 10MB
log4j2.appender.http.strategy.type = DefaultRolloverStrategy
log4j2.appender.http.strategy.max = 10

Here we go:
http.log

@9037568
Copy link
Contributor

9037568 commented Mar 25, 2018

Unfortunately, this didn't provide any additional info. It shows, as you said, the binding receives the data incorrectly:

00000110h: 27 0A 32 33 2D 4D C3 A4 72 2D 32 30 31 38 20 32 ; '.23-Mär-2018 2
00000120h: 32 3A 33 31 3A 33 34 2E 30 30 35 20 5B 44 45 42 ; 2:31:34.005 [DEB
00000130h: 55 47 5D 20 5B 6F 72 67 2E 6F 70 65 6E 68 61 62 ; UG] [org.openhab
00000140h: 2E 69 6F 2E 6E 65 74 2E 68 74 74 70 2E 48 74 74 ; .io.net.http.Htt
00000150h: 70 55 74 69 6C 20 20 20 20 20 20 20 20 20 20 20 ; pUtil           
00000160h: 20 20 20 20 20 20 20 5D 20 2D 20 4D EF BF BD 72 ;        ] - M�r
00000170h: 7A 0D 0A 0A                                     ; z...

You could try going a level deeper and getting the traces from the apache http class (org.apache.http), which should show the data coming in live off the wire before it reaches the OH binding.

@Mr-iX
Copy link
Author

Mr-iX commented Mar 25, 2018

So I enabled trace logging for this class, but there isn't any additional output. I only get some messages for other bindings, but this is not relevant to this.

But what comes off the wire should be clear, because I made already a wireshark sniff.

@9037568
Copy link
Contributor

9037568 commented Mar 25, 2018

One last idea, and then I'm out of ideas. You could try forcing the system's file encoding as described in the last post in this thread.

FWIW, if the apache logging was set correctly there would have been a huge amount of additional output, along these lines:

10:22:36.946 [DEBUG] [org.apache.http.headers       :127  ] - http-outgoing-0 >> Content-Type: text/xml; charset=utf-8
10:22:36.946 [DEBUG] [org.apache.http.headers       :127  ] - http-outgoing-0 >> Content-Length: 210
10:22:36.946 [DEBUG] [org.apache.http.headers       :127  ] - http-outgoing-0 >> Host: www.google.com
10:22:36.946 [DEBUG] [org.apache.http.headers       :127  ] - http-outgoing-0 >> Connection: Keep-Alive

@9037568 9037568 changed the title [HTTP] Encoding bug with umlauts in website [HTTP Binding] Encoding bug with umlauts in website Mar 25, 2018
@Mr-iX
Copy link
Author

Mr-iX commented Mar 25, 2018

So I tried to force OpenHAB to use the encoding with this command:
export JAVA_TOOL_OPTIONS="-Dfile.encoding=ISO-8859-1"
After that I restarted OpenHAB, but unfortunately it hasn't helped :/

I had a lot of these debugging lines, but they were all from the Fritzbox Binding and not from the HTTP-Binding.

@kaikreuzer Could you give us a hint to solve this issue?

@kaikreuzer
Copy link
Member

I don't have any other hints than @9037568 already provided.

@Mr-iX
Copy link
Author

Mr-iX commented Mar 26, 2018

What can we do now?

@9037568
Copy link
Contributor

9037568 commented Mar 28, 2018

I did some additional digging. It appears that this line in the HttpUtil class, which is the class that the HTTP Binding uses to execute its fetches, converts its inputs using the platform encoding:

String responseBody = IOUtils.toString(method.getResponseBodyAsStream());

I'll see if I can make some changes to the HttpUtil class and give you a test jar...

@9037568
Copy link
Contributor

9037568 commented Apr 5, 2018

Update: I've made changes, but I'm having trouble getting them installed into a running version of OH for testing, apparently due to the recent QuantityType changes.

Fearing I may be forced to install 2.2 now...

@Mr-iX
Copy link
Author

Mr-iX commented Apr 5, 2018

When you need help, I have OpenHAB 2.2 and could install a second instance for testing purposes.

@9037568
Copy link
Contributor

9037568 commented Apr 6, 2018

If you're feeling adventurous, you can try installing
org.openhab.core.compat1x-2.3.0-SNAPSHOT.zip

Note that this is a .jar file that has been renamed to .zip to force stupid GitHub to accept it.
When installing this, you will have to stop the existing/original compatibility layer bundle.

If you can get it to install in a working state, and set the logging up correctly, you should see the following debug output:

Special HttpUtil (20180405) executing url '...'
[...]
Raw response (platform encoding): ...
Raw response (encoding '...'): ...

Note that the package for debug logging here should be org.openhab.io.net.http.

@Mr-iX
Copy link
Author

Mr-iX commented Apr 6, 2018

The uninstallation hasn't really worked:

openhab> feature:stop openhab-runtime-compat1x
openhab> feature:uninstall openhab-runtime-compat1x
Error executing command: Feature named 'openhab-runtime-compat1x/0.0.0' is not installed

After placing the jar file into the folder /usr/share/openhab2/addons I got the following openhab log entry

2018-04-06 22:14:27.542 [ERROR] [org.openhab.core.compat1x           ] - FrameworkEvent ERROR - org.openhab.core.compat1x
org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.compat1x [228]
  Unresolved requirement: Import-Package: javax.measure

	at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1620) [?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1600) [?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1571) [?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1514) [?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) [?:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]
2018-04-06 22:14:39.040 [WARN ] [org.apache.felix.fileinstall        ] - A bundle with the same symbolic name (org.openhab.core.compat1x) and version (2.3.0.201804060356) is already installed.  Updating this bundle instead.

Now it produces a lot of log entries:

2018-04-06 22:23:16.004 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/update/Anne] {bridgemarker=true, item=Anne, state=M�rz} | {org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler}={event.topics=openhab/*, service.pid=org.openhab.http, component.name=org.openhab.binding.http, component.id=230, service.id=353, service.bundleid=230, service.scope=bundle} | Bundle(org.openhab.binding.http_1.11.0 [230])]
java.lang.ClassCastException: org.openhab.core.library.types.StringType cannot be cast to org.openhab.core.types.State
	at org.openhab.core.events.AbstractEventSubscriber.handleEvent(AbstractEventSubscriber.java:37) [200:org.openhab.core.compat1x:2.2.0]
	at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415) [3:org.apache.karaf.services.eventadmin:4.1.3]
	at org.apache.felix.eventadmin.impl.tasks.HandlerTask.runWithoutBlacklistTiming(HandlerTask.java:82) [3:org.apache.karaf.services.eventadmin:4.1.3]
	at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:104) [3:org.apache.karaf.services.eventadmin:4.1.3]
	at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:166) [3:org.apache.karaf.services.eventadmin:4.1.3]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

@9037568
Copy link
Contributor

9037568 commented Apr 6, 2018

Unresolved requirement: Import-Package: javax.measure

This is the error I was getting as well. Which would appear to mean we're stuck until there's a release of 2.3.

@Mr-iX
Copy link
Author

Mr-iX commented Apr 7, 2018

Doesn’t it work on the lastest snapshots, which would probably be 2.3?

Is there already a planned release date for 2.3?

@9037568
Copy link
Contributor

9037568 commented Apr 7, 2018

Indeed, you're correct. There's a snapshot 2.3 distro in cloudbees

@Mr-iX
Copy link
Author

Mr-iX commented Apr 7, 2018

So now I tried the latest snapshot, but I get the following error message:

2018-04-07 22:17:11.586 [ERROR] [b.core.service.AbstractActiveService] - Error while executing background thread HTTP Refresh Service
java.lang.NullPointerException: null
	at java.io.Reader.<init>(Reader.java:78) [?:?]
	at java.io.InputStreamReader.<init>(InputStreamReader.java:97) [?:?]
	at org.apache.commons.io.IOUtils.copy(IOUtils.java:1610) [38:org.apache.commons.io:2.2.0]
	at org.apache.commons.io.IOUtils.toString(IOUtils.java:668) [38:org.apache.commons.io:2.2.0]
	at org.openhab.io.net.http.HttpUtil.executeUrl(HttpUtil.java:213) [193:org.openhab.core.compat1x:2.3.0.201804060356]
	at org.openhab.io.net.http.HttpUtil.executeUrl(HttpUtil.java:130) [193:org.openhab.core.compat1x:2.3.0.201804060356]
	at org.openhab.binding.http.internal.HttpBinding.execute(HttpBinding.java:172) [227:org.openhab.binding.http:1.12.0.201804060109]
	at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:144) [193:org.openhab.core.compat1x:2.3.0.201804060356]
	at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:166) [193:org.openhab.core.compat1x:2.3.0.201804060356]

@9037568
Copy link
Contributor

9037568 commented Apr 8, 2018

Oops. Fixed that, I think. Here's a new jar with a little more debugging added.
org.openhab.core.compat1x-2.3.0-SNAPSHOT.zip

@Mr-iX
Copy link
Author

Mr-iX commented Apr 8, 2018

Now I only get this log message:

2018-04-08 09:24:40.301 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/update/Burgundy] {item=Burgundy, state=M�rz, bridgemarker=true, timestamp=1523172280300} | {org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler}={service.id=292, service.bundleid=227, service.scope=bundle, event.topics=openhab/*, service.pid=org.openhab.http, component.name=org.openhab.binding.http, component.id=20} | Bundle(org.openhab.binding.http_1.12.0.201804060109 [227])]
java.lang.ClassCastException: org.openhab.core.library.types.StringType cannot be cast to org.openhab.core.types.State
	at org.openhab.core.events.AbstractEventSubscriber.handleEvent(AbstractEventSubscriber.java:37) [199:org.openhab.core.compat1x:2.3.0.201804060804]
	at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415) [3:org.apache.karaf.services.eventadmin:4.1.5]
	at org.apache.felix.eventadmin.impl.tasks.HandlerTask.runWithoutBlacklistTiming(HandlerTask.java:82) [3:org.apache.karaf.services.eventadmin:4.1.5]
	at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:104) [3:org.apache.karaf.services.eventadmin:4.1.5]
	at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:166) [3:org.apache.karaf.services.eventadmin:4.1.5]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

But the items are shown in the sitemap as "M�rz"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants