HABdroid does not display sitemap (local network)

Hi,

I’m running HABdroid 1.7.0.1 on an OnePlus One (CyanogenOS, Android 5.1.1) but am unable to display my sitemap; connection to the local URL (http://192…:8080) just results in an empty screen (the title bar is still there and functional). If I try to select the sitemap again, I see a pixel flickering on the title bar (exactly where the spinner should appear). Demo mode works fine, though.

BTW: I can access my sitemap locally from my Mac (where openHAB ist running) or through my NAS (QNAP), and everything works just fine.

Here’s what appears repeatedly in my phone’s logs:

I/OpenHABWidgetListFrag( 5968): showPage for http://192.168.0.22:8080/rest/sitemaps/weather-station/tf_weather_station longPolling = false
D/OpenHABWidgetListFrag( 5968): isAdded = true
D/OpenHABWidgetListFrag( 5968): Start progress indicator
D/AsyncHttpClient( 5968): Headers were overwritten! (Accept | application/xml) overwrites (Accept | application/xml)
D/OpenHABWidgetListFrag( 5968): Stop progress indicator
E/OpenHABWidgetListFrag( 5968): class org.apache.http.client.HttpResponseException
E/OpenHABWidgetListFrag( 5968): status code = 404
E/OpenHABWidgetListFrag( 5968): Connection error = class org.apache.http.client.HttpResponseException, cycle aborted

Any ideas where the 404 error comes from? What am I missing?

Cheers,

André

I would try to comment out the tf (Tinkerforge?) weather station part and see if the sitemap loads.
Then at least you have narrowed it down to that one piece of software/hardware …

Unfortunately removing the sitemap name and label had no effect. The HABdroid screen remains empty.

I installed the openHAB app on iOS and got a similar behavior, so the problem lies somewhere else.

In both cases the sitemap is listed and can be selected, but nothing happens after selection. The iOS app at least reports an 404 not found error.

Now I have to find out what is not being found… :wink: I stripped down my sitemap to 1 frame and 5 items, but nothing changes. I even added the demo sitemap (without the remaining files) and it was displayed flawlessly…

Maybe you are affected by this “bug”? If you are on OH 1.8 and have more than one slider or dimmer item on your sitemap without a label containing the value …

Continuing the discussion from Classic UI 1.8 RC:

Exact answer/solution can be found here:

Hi again,

first of all, thanks for taking your time to help me out here.

I don’t have any dimmers or sliders in my sitemap, yet. I currently only use Text and Switch items:

sitemap weatherstation label=“Weather Station”
{
Frame label=“Values”
{
Text item=TF_Barometer_Temperature
Text item=TF_Humidity
Text item=TF_Barometer
Text item=TF_AmbientLight
Switch item=TF_LCD_Backlight
}
Frame label=“Manual control”
{
Switch item=TF_RS_Humidifier
Switch item=TF_RS_Lamps_T5
Switch item=TF_RS_Lamps_Sunspot
}
}

This is basically the original Tinkerforge sitemap for the weather station with a couple of additional switches. So, I don’t really see any reason for this not to work. I’m getting the impression that the problem lies elsewhere in my setup. Perhaps there is something else in one of the other relevant files (openhab.cfg, *.items, *.rules etc.) that may affect the apps?

Strange … your sitemap is according to the wiki, so I have just a wild guess which you may try:

sitemap weatherstation label="Weather Station"
{
Frame    {
        Text label="Values"
            {
            Text item=TF_Barometer_Temperature
            Text item=TF_Humidity
            Text item=TF_Barometer
            Text item=TF_AmbientLight
            Switch item=TF_LCD_Backlight
            }
        }
Frame    {
        Text label="Manual control"
            {
            Switch item=TF_RS_Humidifier
            Switch item=TF_RS_Lamps_T5
            Switch item=TF_RS_Lamps_Sunspot
            }
        }
}

High, i’m pretty new to this and had the same issue today (HABDroid reported “empty sitemap”)
My mistake was to use the complete URL like in a browser (i.e. “http://192.xxx.xxx.xx:8080/openhab.app?sitemap=Haus#”).
The correct useage is “http://192.xxxx.xxx.xx:8080”!
Of course with the correct numbers instead of those x’es!

That’s correct, but @AndreS already stated in his first post

[quote=“AndreS, post:1, topic:6795, full:true”]
(http://192…:8080) [/quote]

that he is using the correct url.

I’m using the correct URL, just as sihui pointed out. I’m now beginning to look for the error in other places, since the app works perfectly fine with the demo sitemap.

I guess there is a problem with an item definition, maybe a wrong label or something like that…

Checked those, too.

Well, I don’t seem to be able to find the error. I’ll just re-install everything and start from scratch.

I had the same issue. Web GUI Worked in Chrome on my Mac, but Android openhab app complained about /rest/sitemaps. Also, x.x.x.x:8080/rest did not work in my Chrome browser.

My issue was /etc/networks/interface gateway was wrong. Boom.

On my Mac there is no /etc/networks/ directory - ‘networks’ is a file.

Besides, I installed the whole thing again on a raspberry pi with exactly the same result on the HABdroid app… sigh…

Any luck on a fix?

Update: Fixed mine by updating Java according to http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html