[Solved] How can I add a default sitemap for habdroid to choose?

I add a demo2.sitemap under conf/sitemaps/.
Then as usual, start OH2
$./start.sh

Then I access OH2 server from habdroid,

On habdroid side,
1 click top right corner -> setting -> openHAB URL
I put it http://172.16.0.183:8080 whch is my OH2 server.
uncheck demo mode.

2 Also sometimes pop up certificate dialog, I just click ONCE.

3 click select default sitemap.
Only demo and _default option shows. I can NOT see my demo2 sitemap.
I wonder why and how to make demo2 option also show in this list after I put demo2.sitemap under conf/sitemaps/ on OH2 server side.

Thank you for your attention.

If your sitemap file name is demo2.sitemap, then you first line of the sitemap needs to match

sitemap demo2 label="Your label here"

Once that is working, you can make it the default one in the app by going to the config menu in the app, and select demo2 as the default sitemap. It won’t prompt you again unless you re-install or otherwise delete the application configuration. You can always change it to something else through the app as well.

Hi xsnrg,
Thank you very much for your response.

For your info, here is my demo2.sitemap

sitemap demo2 label=“demo2”
{
Frame {
Switch item=orvibo_s20_ACCF2392F5BE_power label=“s20” icon=“switch”
Switch item=zwave_device_1579c2c54b2_switch_binary label=“zwave_binary” icon=“switch”
//Text label=“Testing Refresh…”
}
}

This demo2.sitemap is working. I can access it from Habmin.

by 172.16.0.183:8080/basicui/app?sitemap=demo2

However, I can NOT see demo2 in hadroid’s select default sitemap. And circles will keep rotating without showing anything.

I also try to select demo as default sitemap, however, even that, demo2 does NOT show in “select default sitemap”, either.

Howeve, I remembered I can choose demo2 by habdroid before.
Dont know why suddenly it doesnt work.

Any advice or suggestion can help. Thank you.

You might try giving your frame a label, though I don’t know that to be the issue. habdroid might need something to display. I don’t see anything else after a quick glance.

eg Frame label=“my frame”

Is there anything in the openhab log file that would indicate what might be going on? You might want to turn DEBUG On as well.

Hi Jim,

Thank you very much for suggestion and advice.

it works now. The cause might be:
1 wifi issue. OH2 server and habdroid might be on different segments which may cause some network communication issue.
2 Previously I may have some mistakes on selection “sitemap” related plugins in plugin Tab within Eclipse.
I probably change some “sitemap” related plugin from workspace to target platform to make it work finally, meaning, I can
http://xxx:8080/rest/sitemaps.

Anyway, thank you for your concern and advice.