[SOLVED] Contact item not working in sitemap

Hello,

I am running OH2 2.3.0 on a rpi 3 B+ with Raspbian OS and have had no issues until today when I installed two Zooz ZSE08 Contact Sensors.

They work and show up fine in paper UI, however when attempting to configure them in my sitemap file it will no longer load when using a contact item type or default item type. If I change this to a switch or text item type the sitemap file loads fine however will not display the state of the item. Any ideas?

sitemap home label="Springwood"

{

	Frame label="Guest Room" {
		
		Text label="Lights" icon="light" {

			Switch item=PoleLamp_Brightness icon="light"
			Slider item=PoleLamp_Brightness label="Pole Lamp [%.0f]" icon="light"
			Switch item=LeftWallLamp_Brightness icon="light"
			Slider item=LeftWallLamp_Brightness label="Left Wall Lamp [%.0f]" icon="light"
			Switch item=RightWallLamp_Brightness icon="light"
			Slider item=RightWallLamp_Brightness label="Right Wall Lamp [%.0f]" icon="light"
			Switch item=Shack_Brightness icon="light"
			Slider item=Shack_Brightness label="Shack [%.0f]" icon="light"
			Switch item=Desk_Color icon="light"
			Colorpicker item=Desk_Color label="Desk [%.0f]" icon="light"
			Switch item=ReadingLamp_Brightness icon="light"
			Slider item=ReadingLamp_Brightness label="Reading Lamp [%.0f]" icon="light"
		}
	}

	Frame label="Loft" {

		Text label="Lights" icon="light" {

			Switch item=SewingMachine_Brightness icon="light"
			Slider item=SewingMachine_Brightness icon="light" label="Sewing Machine [%.0f]"
			Switch item=CardTable_Brightness icon="light"
			Slider item=CardTable_Brightness icon="light" label="Card Table [%.0f]"
			Switch item=ReclinerInTheLoft_Brightness icon="light"
			Slider item=ReclinerInTheLoft_Brightness icon="light" label="Recliner in the Loft [%.0f]"
			Switch item=LeftEndTableInTheLoft_Brightness icon="light"
			Slider item=LeftEndTableInTheLoft_Brightness icon="light" label="Left End Table in the Loft [%.0f]"
			Switch item=RightEndTableInTheLoft_Brightness icon="light"
			Slider item=RightEndTableInTheLoft_Brightness icon="light" label="Right End Table in the Loft [%.0f]"
			Switch item=CornerLampInTheLoft_Brightness icon="light"
			Slider item=CornerLampInTheLoft_Brightness icon="light" label="Corner Lamp in the Loft [%.0f]"
			


		}

	} 
      
	Frame label="Cross Walk" {

		Text label="Lights" icon="light" {

			Switch item=Switch4_Dimmer icon="light"
			Slider item=Switch4_Dimmer icon="light" label="Stairs [%.0f]"
			Switch item=Switch1_Dimmer icon="light"
			Slider item=Switch1_Dimmer icon="light" label="Dormer [%.0f]"
		}
	}


	Frame label="Living Room" {

		Text label="Lights" icon="light" {

			Switch item=EndTable_Brightness icon="light"
			Slider item=EndTable_Brightness icon="light" label="End Table [%.0f]"
			Switch item=RockingChair_Brightness icon="light"
			Slider item=RockingChair_Brightness icon="light" label="Rocking Chair [%.0f]"

		}
	}


	Frame label="Kitchen" {

		Text label="Lights" icon="light" {

			Switch item=Switch3_Dimmer icon="light"
		Slider item=Switch3_Dimmer icon="light" label="Bar [%.0f]"

		}
	}


	Frame label="Garage" {

		Text label="Lights" icon="light" {

			Switch item=Switch5_Dimmer icon="light"
			Slider item=Switch5_Dimmer icon="light"  label="Garage Lights [%.0f]"
			Switch item=Switch4_Dimmer icon="light"
			Slider item=Switch4_Dimmer icon="light" label="Garage Side Door [%.0f]"

		}
	}

	Frame label="Outside" {

		Text label="Lights" icon="light" {

			Switch item=Switch6_Dimmer icon="light"
			Slider item=Switch6_Dimmer icon="light" label="Side Door [%.0f]"

		}
	}
	
	Frame label="Door Status" {

		Text label="Door Status" icon="door" {


			Contact item=SidedoorStatus_DoorWindowStatus icon="door" label="Side Door"
			Contact item=BackDoorStatus_DoorWindowStatus icon="door" label="Back Door"
			Text item=GarageSideDoorStatus_Output icon="door" label="Front Door"
			Text item=GarageSideDoorStatus_Output icon="door" label="Garage Side Door"

		}
	}
	
	Frame label="Garage Doors" {

		Text label="Garage Doors" icon="garagedoor" {


			Switch item=1Door_Running icon="garagedoor" mappings=[ON="Click"] label="1 Door"
			Text item=1DoorStatus_Output icon="garagedoor" label="1 Door"
			Switch item=2Door_Running icon="garagedoor" mappings=[ON="Click"] label="2 Door"
			Text item=2DoorStatus_Output icon="garagedoor" label="2 Door"
			Switch item=3_Running12121 icon="garagedoor" mappings=[ON="Click"] label="3 Door"
			Text item=3DoorStatus_Output icon="garagedoor" label="3 Door"
			Text item=GarageSideDoorStatus_Output icon="door" label="Garage Side Door"

		}
	}
}
1 Like

The ZSE08 needs to be configured as a Contact item type for the sensor_door channel:

https://www.openhab.org/addons/bindings/zwave/thing.html?manufacturer=zooz&file=zse08_0_0.html

Check your syntax via VSC:

Both are configured as contacts and work correctly in paper UI.

VSC shows correct syntax and .sitemap is as shown above.

The issue comes when using Basic UI the .sitemap will not load when the following is added…

Contact item=SidedoorStatus_DoorWindowStatus icon="door" label="Side Door"

However will load with the following…

Text item=SidedoorStatus_DoorWindowStatus icon="door" label="Side Door"

But will not show the status of the door. I have also tried to set the item type to default and it again will not load.

What am I missing?

Try

Text item=SidedoorStatus_DoorWindowStatus label="Side Door [%s]" icon="door"

label comes first, then the icon and you need a format string

1 Like

That fixed it!

Thank you for the help!

1 Like