Default ilem in sitemap will not show

Running openHABian v 2.2 on a raspberry pie 3b and have created a simple sitemap from tutorial containing two pinged cellphones using the code

(/ect/openhab2/sitemaps/Hemma.sitemap)
sitemap Hemma label="Hemma hos oss"
{
  Frame label="Mobiler"
    {
    Default item=Mobil_1 label="mobil nr 1"
    Switch item=Mobil_2 label="mobil nr 2"
  }
}

and it wont get the item property from coded items

(/ect/openhab2/items/Hemma.items)
    String Mobil_1 label="mobil nr 1" <network> { channel="network:pingdevice:192_168_1_***:online" }
    Switch Mobil_2 label="mobil nr 2" <network> { channel="network:pingdevice:192_168_1_***:online" }

My guess is that i have missed something to link the .item to the sitemap and there is nothing to read for Mobil_1 because all i get a switch for Mobil_2.

Your sitemap has one opening curly brace, but two closing curly braces. You should start by fixing that.

sitemap Hemma label="Hemma hos oss" {
	Frame label="Mobiler" {
		Default item=Mobil_1 label="mobil nr 1"
		Switch  item=Mobil_2 label="mobil nr 2"
	}
}
1 Like

i’m afraid that was just a typo in the post (my bad).
My code looks exactly as presented by “hr_2”.

Try using Text instead of Default

OK, next step

String Mobil_1 "mobil nr 1[%s]" <network> { channel="network:pingdevice:192_168_1_***:online" }
Switch Mobil_2 "mobil nr 2[%s]" <network> { channel="network:pingdevice:192_168_1_***:online" }
sitemap Hemma label="Hemma hos oss" {
	Frame label="Mobiler" {
		Default item=Mobil_1
		Switch  item=Mobil_2
	}
}

Went and remade the .things by coding it from scratch and now it works again.
thanks a bunch for all your time :smile: