Sitemap creation - first time user

Hi guys,

I’m a total noob, haven’t coded in my life. I’ve set up openhab2 and have got to the stage where I’m trying to create my first sitemap (default.sitemap). However, when I go to Basic UI, it doesn’t show the sitemap I’ve created. I am running this on a windows laptop.

I’ve created the default.sitemap and default.items via windows explorer (new text file then naming it default.sitemap), is this the right way to add a file for openhab2 to read it?

Any help would be much appreciated,

Thanks

Show us your item- and sitmap-file
use Demo for the initial setup
and a editor like VisualStudioCode

There are a number of things that has to be correct for the sitemap to work.

Please check that your windows editor have not added another extension to the file (like default.sitemap.txt) and that you have put the sitemap file in the sitemap folder. If that does not work, please post you sitemap and items file(s) and we can all have a look.

ups… did not see your post @hr3

I’m using notepad++ as the editor. The file names don’t end in .txt.

default.items:
Switch Presence_Mobile_Dinesh “Dinesh” { channel=“network:device:192_168_1_4:online” }

Switch Wallplug_FF_LR_TV “Wallplug TV” { channel=“mihome:sensor_plug:158d0001b7dcc3:power” }

default.sitemap
sitemap default label=“My first sitemap”
{
Switch item=Presence_Mobile_Dinesh label="Dinesh"
Switch item=Wallplug_FF_LR_TV label=“Wallplug TV”
}

thanks

Switch Presence_Mobile_Dinesh "Dinesh" { channel="network:device:192_168_1_4:online" }
Switch Wallplug_FF_LR_TV "Wallplug TV" { channel="mihome:sensor_plug:158d0001b7dcc3:power" }
sitemap default label="My first sitemap"
{
Switch item=Presence_Mobile_Dinesh label="Dinesh"
Switch item=Wallplug_FF_LR_TV label="Wallplug TV"
}

I have changed the quotation marks

It still says “it seems like you have not defined any sitemaps yet. To build one, please check the documentation for guidance.”

Are the files in the correct librarys
…/conf/items/
…/conf/sitemaps/

Yes
\openHAB2\conf\sitemaps
\openHAB2\conf\items

It must be the wong library or a wrong file.extension

@hr3 you might be interested in Home Builder UI from openHAB. Simply install it along with Basic UI and Paper UI.
You can easily create your sitemap and items file with it.

Here’s the demo:
http://demo.openhab.org:8080/homebuilder/index.html

That must be logged in openhab.log

2018-01-08 13:19:10.313 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.items'
2018-01-08 13:19:21.224 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.sitemap'

.
hc_156

@hr3 this what I have in the logs:
2018-01-08 22:26:17.904 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at http://192.168.1.6:8080
2018-01-08 22:26:18.100 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://192.168.1.6:8443
2018-01-08 22:26:22.190 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2018-01-08 22:26:22.223 [INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
2018-01-08 22:26:22.266 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2018-01-08 22:26:22.304 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2018-01-08 22:26:22.324 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2018-01-08 23:06:05.178 [WARN ] [e.sshd.server.channel.ChannelSession] - Unknown pty opcode value: 42

my sitemap file is in the right location too

Install openHAB under Windows is quick and easy.
So I would do a new (second) install and select Demo at initial Setup.
It’s a easy way to get a running example and a basis for own changes.

i tried doing this, I’ll try again and select Demo. Thanks @hr3

Hi guys, thanks for you help.

So I re-installed openHAB with demo and that seems to work.

My problem was that I was creating files “default.items” but windows was saving them as “default.items.txt”.
For anyone in future facing the same issue, simply save the file with quotation marks at the location desired “default.items” and it will save the file as a .items file type.

Next stepp:
https://docs.openhab.org/configuration/editors.html

Thanks @hr3 Harry