--
You received this message because you are subscribed to the Google Groups "openhab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Victor,
Thanks - I'll try and grab the logs. I know that the REST interface has changed in the latest version - it's been split between a library and the original io.rest bundle, so I'm guessing something has changed in there. In any case, I fixing whatever causes this in HABdroid is probably good.
I was going to take a look at this myself but have been working on some ZWave mods today.
On a separate note - is there a plan to move the source onto GitHub? I made some modifications a couple of weeks back to support colors to test out the sitemap changes that will hopefully be integrated at some stage and it would be good to be able to feed them into the main build when these are merged into OH.
Cheers
Chris
--
Hi Victor,
Fully understand that you're not able to test out every version against every OH version - my original post was really a pointer that the new merge of the REST interfaces in OH may have a problem.
Anyway, moving to GitHub sounds great. I don't know if you've tried the sitemap changes, but HABdroid works really nicely with the dynamic visibility, and the colors of course make things nicer.
Thanks for a really nice app :)
I'll try and take a look at the crash issue later tonight or tomorrow.
Cheers
Chris
--
Hi Victor,
The following is the log.
I have an item in my sitemap which has no icon (Text label="Lights" {...). It's a text item, but it has children. From memory, the sitemap icon defaults to the name of the widget (hence the text.png).
This hasn't changed recently though, so I still think something must have changed in OH REST output when I upgraded to the latest version yesterday.
I tried adding icons to the two widgets on the main menu that don't have icons (both text items as above), but that didn't help. I also loaded HABDroid and cleared the image cache, but that caused it to crash immediately as well.
Hmm - looking at the XML output in the debug below, there is no text.png specified, so that seems bit strange.
Anyway, please let me know if there's anything else you'd like and I can send it to you.
Cheers
Chris
W/System.err( 9751): at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:177)
W/System.err( 9751): at java.net.URLConnection$DefaultContentHandler.getContent(URLConnection.java:1018)
W/System.err( 9751): at java.net.URLConnection.getContent(URLConnection.java:199)
W/System.err( 9751): at org.openhab.habdroid.util.MyWebImage.getBitmapFromUrl(MyWebImage.java:147)
W/System.err( 9751): at org.openhab.habdroid.util.MyWebImage.getBitmap(MyWebImage.java:106)
W/System.err( 9751): at com.loopj.android.image.SmartImageTask.run(Unknown Source)
W/System.err( 9751): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
W/System.err( 9751): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
W/System.err( 9751): at java.lang.Thread.run(Thread.java:856)
W/System.err( 9751): java.io.FileNotFoundException: http://192.168.2.2:10080/images/text.png
W/System.err( 9751): at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:177)
W/System.err( 9751): at java.net.URLConnection$DefaultContentHandler.getContent(URLConnection.java:1018)
W/System.err( 9751): at java.net.URLConnection.getContent(URLConnection.java:199)
W/System.err( 9751): at org.openhab.habdroid.util.MyWebImage.getBitmapFromUrl(MyWebImage.java:147)
W/System.err( 9751): at org.openhab.habdroid.util.MyWebImage.getBitmap(MyWebImage.java:106)
W/System.err( 9751): at com.loopj.android.image.SmartImageTask.run(Unknown Source)
W/System.err( 9751): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
W/System.err( 9751): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
=======================================================
D/dalvikvm(20276): GC_CONCURRENT freed 433K, 9% free 12320K/13447K, paused 1ms+2ms, total 16ms
D/DocumentHttpResponseHandler( 9751): Got response = <?xml version="1.0" encoding="UTF-8" standalone="yes"?><sitemaps><sitemap><name>demo</name><link>http://192.168.2.2:10080/rest/sitemaps/demo</link><homepage><link>http://192.168.2.2:10080/rest/sitemaps/demo/demo</link><leaf>false</leaf></homepage></sitemap><sitemap><name>chris</name><link>http://192.168.2.2:10080/rest/sitemaps/chris</link><homepage><link>http://192.168.2.2:10080/rest/sitemaps/chris/chris</link><leaf>false</leaf></homepage></sitemap><sitemap><name>chris-x</name><link>http://192.168.2.2:10080/rest/sitemaps/chris-x</link><homepage><link>http://192.168.2.2:10080/rest/sitemaps/chris-x/chris</link><leaf>false</leaf></homepage></sitemap><sitemap><name>Test</name><link>http://192.168.2.2:10080/rest/sitemaps/Test</link><homepage><link>http://192.168.2.2:10080/rest/sitemaps/Test/Test</link><leaf>false</leaf></homepage></sitemap></sitemaps>
D/MainActivity( 9751): Response: org.apache.harmony.xml.dom.DocumentImpl@41d91230
D/MainActivity( 9751): Configured sitemap is on the list
I/MainActivity( 9751): Opening sitemap at http://192.168.2.2:10080/rest/sitemaps/chris/chris
D/OpenHABFragmentPagerAdapter( 9751): openPage(http://192.168.2.2:10080/rest/sitemaps/chris/chris)
D/OpenHABWidgetListFragment( 9751): withPage(http://192.168.2.2:10080/rest/sitemaps/chris/chris)
D/OpenHABFragmentPagerAdapter( 9751): getItem(0)
D/OpenHABWidgetListFragment( 9751): isVisibleToUser(FALSE)
D/OpenHABFragmentPagerAdapter( 9751): getPageWidth(0)
D/OpenHABWidgetListFragment( 9751): onAttach()
D/OpenHABWidgetListFragment( 9751): onCreate()
D/OpenHABWidgetListFragment( 9751): isVisibleToUser(TRUE)
I/OpenHABWidgetListFragment( 9751): onCreateView
D/AbsListView( 9751): Get MotionRecognitionManager
D/OpenHABWidgetListFragment( 9751): onActivityCreated()
D/OpenHABWidgetListFragment( 9751): onResume() http://192.168.2.2:10080/rest/sitemaps/chris/chris
I/OpenHABWidgetListFragment( 9751): showPage for http://192.168.2.2:10080/rest/sitemaps/chris/chris longPolling = false
D/OpenHABWidgetListFragment( 9751): Start progress indicator
D/KeyguardViewMediator( 2275): setHidden false
D/KeyguardViewMediator( 2275): setHidden false
D/KeyguardViewMediator( 2275): setHidden false
I/SurfaceFlinger( 1939): id=10911 Removed iabdroid idx=3 MapSz=7
I/SurfaceFlinger( 1939): id=10911 Removed iabdroid idx=-2 MapSz=7
D/KeyguardViewMediator( 2275): setHidden false
D/DocumentHttpResponseHandler( 9751): Got response = <?xml version="1.0" encoding="UTF-8" standalone="yes"?><page><id>chris</id><title>Main Menu</title><link>http://192.168.2.2:10080/rest/sitemaps/chris/chris</link><leaf>false</leaf><widget><widgetId>chris_0</widgetId><type>Group</type><label>Heating</label><icon>heating</icon><linkedPage><id>00</id><title>Heating</title><icon>heating</icon><link>http://192.168.2.2:10080/rest/sitemaps/chris/00</link><leaf>false</leaf></linkedPage></widget><widget><widgetId>chris_1</widgetId><type>Text</type><label>Lights</label><icon>text</icon><linkedPage><id>01</id><title>Lights</title><icon>text</icon><link>http://192.168.2.2:10080/rest/sitemaps/chris/01</link><leaf>false</leaf></linkedPage></widget><widget><widgetId>chris_2</widgetId><type>Group</type><label>Climate</label><icon>temperature</icon><linkedPage><id>02</id><title>Climate</title><icon>temperature</icon><link>http://192.168.2.2:10080/rest/sitemaps/chris/02</link><leaf>false</leaf></linkedPage></widget><widget><widgetId>chris_3</widgetId><type>Text</type><label>Network</label><icon>network</icon><linkedPage><id>03</id><title>Network</title><icon>network</icon><link>http://192.168.2.2:10080/rest/sitemaps/chris/03</link><leaf>false</leaf></linkedPage></widget><widget><widgetId>chris_4</widgetId><type>Text</type><label>Sensors</label><icon>energy</icon><linkedPage><id>04</id><title>Sensors</title><icon>energy</icon><link>http://192.168.2.2:10080/rest/sitemaps/chris/04</link><leaf>false</leaf></linkedPage></widget><widget><widgetId>chris_5</widgetId><type>Text</type><label>Z-Wave Network</label><icon>fire</icon><linkedPage><id>05</id><title>Z-Wave Network</title><icon>fire</icon><link>http://192.168.2.2:10080/rest/sitemaps/chris/05</link><leaf>false</leaf></linkedPage></widget><widget><widgetId>chris_6</widgetId><type>Text</type><label>Weather [10.6 °C]</label><icon>sun_clouds</icon><item><type>NumberItem</type><name>Temperature_Outside</name><state>10.5625</state><link>http://192.168.2.2:10080/rest/items/Temperature_Outside</link></item><linkedPage><id>06</id><title>Weather [10.6 °C]</title><icon>sun_clouds</icon><link>http://192.168.2.2:10080/rest/sitemaps/chris/06</link><leaf>false</leaf></linkedPage></widget><widget><widgetId>chris_7</widgetId><type>Text</type><label>Energy Sensors</label><icon>energy</icon><linkedPage><id>07</id><title>Energy Sensors</title><icon>energy</icon><link>http://192.168.2.2:10080/rest/sitemaps/chris/07</link><leaf>false</leaf></linkedPage></widget><widget><widgetId>chris_8</widgetId><type>Text</type><label>Chart test</label><icon>text</icon><linkedPage><id>08</id><title>Chart test</title><icon>text</icon><link>http://192.168.2.2:10080/rest/sitemaps/chris/08</link><leaf>true</leaf></linkedPage></widget></page>
D/dalvikvm( 9751): GC_CONCURRENT freed 196K, 7% free 12552K/13383K, paused 12ms+13ms, total 47ms
D/OpenHABWidgetListFragment( 9751): Response: org.apache.harmony.xml.dom.DocumentImpl@41dfa178
D/OpenHABWidgetListFragment( 9751): Stop progress indicator
D/OpenHABWidgetAdapter( 9751): Stopping video for 0 widgets
D/OpenHABWidgetAdapter( 9751): Stopping image refresh for 0 widgets
I/OpenHABWidgetDataSource( 9751): Loading new data
D/OpenHABWidgetListFragment( 9751): processContent selectedItem = -1
I/OpenHABWidgetListFragment( 9751): showPage for http://192.168.2.2:10080/rest/sitemaps/chris/chris longPolling = true
I/System.out( 9751): Not a DRM File, opening notmally
I/System.out( 9751): buffer returned
I/MyWebImage( 9751): Cache for http://192.168.2.2:10080/images/text.png is empty, getting image
I/System.out( 9751): Not a DRM File, opening notmally
I/System.out( 9751): buffer returned
I/System.out( 9751): Not a DRM File, opening notmally
I/System.out( 9751): buffer returned
I/System.out( 9751): Not a DRM File, opening notmally
I/System.out( 9751): buffer returned
I/System.out( 9751): Not a DRM File, opening notmally
I/System.out( 9751): buffer returned
I/System.out( 9751): Not a DRM File, opening notmally
I/System.out( 9751): buffer returned
D/lights ( 2275): button : 2 +
D/lights ( 2275): button : 2 -
I/SecHardwareInterface( 1811): setmDNIeUIMode (0)
D/dalvikvm( 9751): GC_CONCURRENT freed 335K, 7% free 12658K/13575K, paused 13ms+5ms, total 32ms
I/MyWebImage( 9751): Cache for http://192.168.2.2:10080/images/text.png is empty, getting image
E/SpannableStringBuilder( 9751): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder( 9751): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
D/i ( 6078): scheduled task [GmmLocationControllerStatus Update]
W/System.err( 9751): java.io.FileNotFoundException: http://192.168.2.2:10080/images/text.png
W/System.err( 9751): at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:177)
W/System.err( 9751): at java.net.URLConnection$DefaultContentHandler.getContent(URLConnection.java:1018)
W/System.err( 9751): at java.net.URLConnection.getContent(URLConnection.java:199)
W/System.err( 9751): at org.openhab.habdroid.util.MyWebImage.getBitmapFromUrl(MyWebImage.java:147)
W/System.err( 9751): at org.openhab.habdroid.util.MyWebImage.getBitmap(MyWebImage.java:106)
W/System.err( 9751): at com.loopj.android.image.SmartImageTask.run(Unknown Source)
W/System.err( 9751): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
W/System.err( 9751): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
W/System.err( 9751): at java.lang.Thread.run(Thread.java:856)
W/System.err( 9751): java.io.FileNotFoundException: http://192.168.2.2:10080/images/text.png
W/System.err( 9751): at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:177)
W/System.err( 9751): at java.net.URLConnection$DefaultContentHandler.getContent(URLConnection.java:1018)
W/System.err( 9751): at java.net.URLConnection.getContent(URLConnection.java:199)
W/System.err( 9751): at org.openhab.habdroid.util.MyWebImage.getBitmapFromUrl(MyWebImage.java:147)
W/System.err( 9751): at org.openhab.habdroid.util.MyWebImage.getBitmap(MyWebImage.java:106)
W/System.err( 9751): at com.loopj.android.image.SmartImageTask.run(Unknown Source)
W/System.err( 9751): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
W/System.err( 9751): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
W/System.err( 9751): at java.lang.Thread.run(Thread.java:856)
Thanks Victor,
I'll try and grab the snapshot this morning.
I thought there was probably an issue with the REST interface. I also noticed last night that it was actually crashing if I just left it on a single screen, so I guess this is all related to the connection reset issue.
Also, I assume you know that the REST libraries changed in the past week?
Cheers
Chris
--
Hi Kai,
I didn't run this until after the merge into the main repo, and as soon as I merged it I found the problem. Initially I assumed it was a problem with my changes to REST interfaces, so then tried the nightly build, and it was the same.
So, I'm reasonably sure that this change caused the problem, but unfortunately I didn't have it running before it was merged. It does however seem that other clients (eg GreenT) still work "ok" with the latest version, so it may not have been spotted.
Chris
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/Z-DVBXdNiYE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
<org.openhab.io.rest-1.4.0-SNAPSHOT.jar>
- jerseyServletParams.put("org.atmosphere.cpr.padding", "whitespace"); |
+ jerseyServletParams.put("org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults", "true"); |
+ // use the default interceptors without PaddingAtmosphereInterceptor |
+ // see: https://groups.google.com/forum/#!topic/openhab/Z-DVBXdNiYE |
+ jerseyServletParams.put("org.atmosphere.cpr.AtmosphereInterceptor", "org.atmosphere.interceptor.DefaultHeadersInterceptor,org.atmosphere.interceptor.AndroidAtmosphereInterceptor,org.atmosphere.interceptor.SSEAtmosphereInterceptor,org.atmosphere.interceptor.JSONPAtmosphereInterceptor,org.atmosphere.interceptor.JavaScriptProtocol,org.atmosphere.interceptor.OnDisconnectInterceptor"); |
|