Sitemap doesn't appear at Openhab2

I’m struggling with sitemap that I edited in the /etc/openhab2/sitemaps/casa.sitemap:

sitemap casa label=“Minha casa” {
Frame label=“Date” {
Text item=Date
}

Frame label = “Abajur” {
Group item = Lights
Switch item=Abajur label="Abajur"
Text item=LivingRoom_Light_Verbose label="Msg MQTT: "
Switch item=LivingRoom_Light_Reachable label="Reacheable "
Number item=LivingRoom_Light_RSSI label="Nivel de sinal: "

}
}

I tried to call the sitemap http://mydevice:8080/basicui/app?sitemap=casa but it shows the following message:

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

All the items appear at the Paper UI, indicating that they are active. Also I can see the itens at Control Tab.

If I go to the Configuration -> Services and change at Basic UI / Classic UI default sitemap it shows that the file doesn’t exist.

I really don’t know where to go, please help me!

Paulo

is the sitemap-file realy there?
/etc/openhab2/sitemaps

1 Like

2 errors:
don’t use spaces after label = "" in: Frame label = "Abajur" & after item = in Group item = Lights

and: don’t use Number for a sitemap element type (it doesn’t exist). Use Default or Text instead (for Number type items)

You should have an error logged in /var/log/openhab2/openhab.log about the sitemap file

sitemap casa label="Minha casa" {
	Frame label="Date" {
		Text item=Date
	}
	Frame label="Abajur" {
		Group item=Lights
		Switch item=Abajur label="Abajur"
		Text item=LivingRoom_Light_Verbose label="Msg MQTT: "
		Switch item=LivingRoom_Light_Reachable label="Reacheable "
		Text item=LivingRoom_Light_RSSI label="Nivel de sinal: "
	}
}
2 Likes

Yes, it is!

Now it worked!! Thank you!!!

1 Like

Hi Angelos, how are you?

I’d like to suggest an improvement for OH2. Since I’m just a newbie, I really hope that in the future I’ll be able to help more.

I think that a big enhancement for OH2 is to show the files in the folder and tell that there are errors in the sitemap. Also to look for the log of the file as you told me in case of further information. This will give a better clue on where the mistake is, instead of trying to see if there’s any issue in the folder…

thank you!

Hi Paulo ! :slight_smile: (and welcome to the openHAB world :slight_smile:)

You mean to show you on the web page of BasicUI the file contents and mark the errors visually whenever the sitemap cannot be loaded properly?
That’s a good idea but I don’t know if it is easy to implement… You could open up a new feature/enhancement request here: https://github.com/eclipse/smarthome/issues if you would like.

To verify the syntax of your configuration files (e.g. items, sitemap, etc) you can use the Eclipse Smart Home Designer (ESHD) from here: http://docs.openhab.org/installation/designer.html (grab version 0.8, not 0.9 :wink: )

Very soon, the new cool tool: VS Code Extension will have build in syntax checking and this will be nicer than ESHD.

There is some info on logs in the documentation portal: http://docs.openhab.org/administration/logging.html & http://docs.openhab.org/tutorials/beginner/logs.html

I recommend to spend some time to go over the online docs. There is a lot of useful info in there.

1 Like

Hi,

I use OH 2.1 on a RPi3

I am having the same problems - which means, when I start “BasicUI” I get the following message:

It seems like you have not defined any sitemaps yet.

When I try “Classic UI” I get the following error message:

HTTP ERROR 500

Problem accessing /classicui/app. Reason:

Server Error

Caused by:

javax.servlet.ServletException: Sitemap ‘default’ could not be found
at org.eclipse.smarthome.ui.classic.internal.servlet.WebAppServlet.service(WebAppServlet.java:169)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)

I know that OK 2.1 is very sensible concerning mistakes in sitemap-files (my sitemaps worked i OH 2.0 without any problem) -> I have tried some super-simple sitemaps like the following:

sitemap home2 label=“home2” {
Frame label=“Date” {
Text item=Date icon=“calendar”
}
}

-> also this sitemap is neither shown in Classic UI, nor in Basic UI nor in Habmnin.

What else have I tried to solve the problem?

  • I have checked if the files are indeed in /etc/obenhab2/sitemaps (yes, they are)
  • I have saved the with different text-editors in Unicode, ANSI, UTF-8 … -> still no sitemaps available
  • I also kept the “default sitemap”-field in the configuration of Basic UI and Classic UI empty -> no change
  • I also mentioned sitemap-names there -> also no change

As I am having this problem already for several months I have started to use “ImperiHome” (which is quite a nice app) , but still I also would like to use Habmin.

For this reason I would apprecitate any suggestion or help.

Best regards
schroedinger

Hi, schroedinger

I think an error in home2.sitemaps
In your code inverted quotation marks, maybe it did blockquote…
I copied your code, replaced the name sitemaps and the quotes “ ” at " " = it’s work.

sitemap default label="home2" {
Frame label="Date" {
Text item=Date icon="calendar"
}
}

Hi Kirill,

thank you - but no - problem not sovled, still same error-message.

I do not think that this is a problem of the syntax of my sitemaps, because:

  • I have copied & pasted dozends of sample.sitemaps here from the forum
  • I have made new sitemaps from the scratch and made sure that I have followed all syntax-requirements
  • my sitemaps did work under OH 2.0
  • I have saved my sitemaps under several different formats i.e. Unicode, ANSI, UTF-8 … -> still no sitemaps available
  • I have already unistalled and re-installed BasicUI and ClassicUI

I believe serveral users have this problem because there a several posts here in this forum - but I could not find anywhere a working solution

Of course I would install OH completly new from the scratch - but this would mean a hell of work … and what if sitemaps still do not work afterwards …?

But I a very ready to keep in trying - so still I appreciate any advice

best regards
schroedinger

1 Like

… and of course I have tested the sitemap that you have posted with the correct quotes …

I’m having this same issue and cannot find a definitive solution to the problem i have a sitemap in my sitemap folder but nothing recognises the fact i’ve reinstalled several times using several methods all same problem has anyone actually figured out why this happens and got the solution because several hours of searching has been fruitless and I am considering ditching openhab for something else

I have not read all your text but I think you should just avoid using default as sitemap name. Use as sitemap name the prefix of your sitemap file.

I’m not using the default as sitemap I have added a new sitemap to the folder /etc/openhab2/sitemaps and named it home.sitemap Screenshot_1

I have also edited the configuration/basic ui

and i took an example from https://docs.openhab.org/configuration/sitemaps.html and added it to the sitemap file


as far as I’m aware this is all I have to do but I still get This

can anyone tell me where I’m going wrong?

Does it help if you free your browser cache using Ctrl+F5 ?
Does it help if you restart OH ?

I am not familiar with installation with apt so I am not sure uf you are using the right folder.

No that doesn’t help personally I think that the busic ui and the classic ui are set to use a different folder it can only be the answer but no idea to find out what folder they are using

screw it how do I uninstall openHab as it clearly doesn’t work properly

I finally got this working for me.

Like gary below I was ready to uninstall and give up.

I tried all of they things you did and many more. I watched and copied videos and tutorials with no luck. I remembered in one of the videos he specifically mentioned also downloading eclipsesmarthome, I also remember in the tutorial that they said:

“sitemap files are edited in your editor of choice. The files’ location is in the $OPENHAB_CONF”

What I was doing (obviously wrong so I don’t have to be reminded) was copying the .txt file or creating my own and inserting the properly formatted sitemap.

Since I had never seen the type of file to be used I didn’t know it was wrong.

So I downloaded Openhab 1.x demo setup which had a demo.sitemap file (type= SITEMAP file) in the: hab18\configurations\sitemaps folder.

I copied it to \openhab2\conf\sitemaps in windows, changed the setting in paperUI/configuration/basic ui to demo, and it worked.

I tried a quick name change edit using eclipsesmarthome and that worked as well.

I then added the demo.sitemap file to my openhabian location (openhab2-conf\sitemaps) and logged into it and it works there as well.

*I included the paths I used since they are not exactly the same as what the documentation says they should be.

I am hoping that now that I have a working file I can simply modify it and learn to do what I want it to do.

Hope it works for others as well.

I am a complete noob so I am unlikely to be able to answer many questions.