Sitemap not working

Hello im New to this and i have tried to get the sitemap for Basic ui To work but it just said
Welcome!
Available sitemaps
It seems like you have not defined any sitemaps yet. To build one, please check the documentation for guidance.

This is the sitemaps file that i cant get to work. the name of the file is Egnellsvag.sitemap

sitemap Egnellsvag label=“Egnellsväg5”
{

   Frame label="Date" 
   {
   Text item=Date
   }
   Frame label="Information"
   {
       Switch item=DEMOSW
   }
   Frame label="Säkerhet"
   {
       Switch item=DEMOSW
   }
   Frame label="Erics rum"
   {
       Dimmer  Light1_Dimmer       { channel="hue:0220:ecb5fa07ed9e:2:brightness" }
       Dimmer  Light1_ColorTemp    { channel="hue:0220:ecb5fa07ed9e:2:color_temperature" }
       String  Light1_Alert        { channel="hue:0220:ecb5fa07ed9e:2:alert" }
       Switch  Light1_Effect       { channel="hue:0220:ecb5fa07ed9e:2:effect" }

   }
   Frame label="Vitarummet"
   {
       Switch item=DEMOSW
   }
   Frame label="Sovrummet"
   {
       Dimmer  Light2_Dimmer       { channel="hue:0220:ecb5fa07ed9e:1:brightness" }
       String  Light2_Alert        { channel="hue:0220:ecb5fa07ed9e:1:alert" }
       Switch  Light2_Effect       { channel="hue:0220:ecb5fa07ed9e:1:effect" }
       Dimmer  Light2_ColorTemp    { channel="hue:0220:ecb5fa07ed9e:1:color_temperature" 
   }
   Frame label="Vardagsrummet"
   {
       Switch item=DEMOSW
   }
   Frame label="Garage"
   {
       Switch item=DEMOSW
   }
   Frame label="Ute"
   {
       Switch item=DEMOSW
   }

}

Im sorry for bad English.

Welcome to openHAB.
You are mixing things up: sitemap definitions go into sitemap files, items definitions into items files:

For example this

Dimmer  Light1_Dimmer       { channel="hue:0220:ecb5fa07ed9e:2:brightness" }

is an item definition, you need to put that in an items file.

Ok thanks

Just to build a little on what @sihui said to help explain why you saw that behavior when you tried to display the sitemap…

  • when you save a sitemap file, openHAB tries to load the file
  • part of loading the file includes validating that the sitemap is formatted properly
  • if the sitemap is not formatted properly (which yours wasn’t), it will give up (and log an error in openhab.log)
  • at that point openHAB thinks you have no (valid) sitemaps defined

Also, you might want to consider installing VS Code with the openHAB extension. It provides assistance when editing things, items, rules, sitemaps, etc. so that you can see errors while doing the edits.

1 Like