WTH2 in sitemap doesn't show window state

Tags: #<Tag:0x00007f616e530e18> #<Tag:0x00007f616e530d00>

Hi,

I don’t know if this is an error.
I have one homematic IP WTH in the items and sitemaps configured:
Items:
String Schlafzimmer_shutter “Schlafzimmer [MAP(de.map):%s]” (gHeizung_Schlafzimmer, shutter) {channel=“homematic:HMIP-WTH:Numbers:Numbers:1#WINDOW_STATE”} Sitemap:Text item=Schlafzimmer_shutter icon=“window”

I builded this for another with a WTH2 here the windows State is present as item.
But I don’t get a window state in the sitemap.
When I use the window sensor it self, it works as expected.
Is this a problem of the binding?

Have you looked in your events.log to see if your Item changes state, and what to?
Have you installed the optional MAP transformation service that you specified in your label?
Have you created or found a file map.de in your /transform/ folder, that you specified in your label?

the shutter it self generates a log entry, as well as with the working in the other room.
in the events.log I can’t a log entry for the WTH and the WTH2 device. But with the WTH device it shows up still correctly in the sitemap.

MAP is installed

for shure I have the map.de else it wouldn’t work as wanted with the first device.
Is there maybe a Software difference for the 2 devices HmIP-WTH and HmIP- WTH-2

You might consider sharing these log entries, as well as your Item and channel definitions. We can’t see from here, and need some clues.

I’m not allowed upload files. I hope this one will also work.
I changed the serials with fake numbers and removed other things which are not needed.
The Schlafzimmer part works.
The Wohnzimmer part doesn’t, when I change to the HmIP-SWDO it also works.


Group	shutter
Group	gHeizung_Schlafzimmer					"Heizung Schlafzimmer"													["Thermostat"]
Number	Schlafzimmer_temp_abfragen				"Schlafzimmer Heizung"							(gHeizung_Schlafzimmer) ["CurrentTemperature"]				{channel="homematic:HMIP-WTH:0000F111111111D2222E0A00:000111C2234C99:1#ACTUAL_TEMPERATURE"}
Number	Schlafzimmer_temp_einstellen			"Schlafzimmer Heizung" 							(gHeizung_Schlafzimmer)	["TargetTemperature"]	 			{channel="homematic:HMIP-WTH:0000F111111111D2222E0A00:000111C2234C99:1#SET_POINT_TEMPERATURE"}
Number	Schlafzimmer_modus						"Schlafzimmer Modus [MAP(de.map):%s]"			(gHeizung_Schlafzimmer)	["homekit:HeatingCoolingMode"]		{channel="homematic:HMIP-WTH:0000F111111111D2222E0A00:000111C2234C99:1#CONTROL_MODE"}
String	Schlafzimmer_shutter					"Schlafzimmer [MAP(de.map):%s]"					(gHeizung_Schlafzimmer, shutter)							{channel="homematic:HMIP-WTH:0000F111111111D2222E0A00:000111C2234C99:1#WINDOW_STATE"}




Group	gHeizung_Wohnzimmer						"Heizung Wohnzimmer"														["Thermostat"]
Number	Wohnzimmer_temp_einstellen				"Wohnzimmer Heizung"							(gHeizung_Wohnzimmer)		["TargetTemperature"]			{channel="homematic:HmIP-WTH-2:0000F111111111D2222E0A00:000A6A50A1A71E:1#SET_POINT_TEMPERATURE"}
Number	Wohnzimmer_temp_auslesen				"Wohnzimmer Heizung"							(gHeizung_Wohnzimmer)		["CurrentTemperature"]			{channel="homematic:HmIP-WTH-2:0000F111111111D2222E0A00:000A6A50A1A71E:1#ACTUAL_TEMPERATURE"}
String 	Wohnzimmer_modus					    "Wohnzimmer Modus [MAP(de.map):%s]"				(gHeizung_Wohnzimmer)		["homekit:HeatingCoolingMode"] 	{channel="homematic:HmIP-WTH-2:0000F111111111D2222E0A00:000A6A50A1A71E:1#CONTROL_MODE"}	

//This doesn't work//
Contact	Wohnzimmer_shutter				"Fensterkontakt Wohnzimmer [MAP(de.map):%s]"	(gHeizung_Wohnzimmer, shutter)										{channel="homematic:HmIP-WTH-2:0000F111111111D2222E0A00:000A6A50A1A71E:1#WINDOW_STATE"}



// This one would work Contact	Wohnzimmer_shutter	"Fensterkontakt Wohnzimmer [MAP(de.map):%s]"	(gHeizung_Wohnzimmer, shutter)			{channel="homematic:HmIP-SWDO-I:0000F111111111D2222E0A00:00229BE213D2EE:1#STATE_CONTACT"}
sitemap hm_test label="Wohnung"
{
Frame label="Schlafzimmer"{
          
           Switch item=Schlafzimmer_modus						label="Heizungsmodus"																			icon="climate" 			mappings=[0=AUTOMATIC, 1=MANUAL, 3=BOOST]
           Text item=Schlafzimmer_temp_abfragen					label="Schlafzimmer ist Temperatur [%.1f °C]"													icon="temperature"
           Setpoint item=Schlafzimmer_temp_einstellen			label="Schlafzimmer soll Temperatur [%.1f °C]" 			step=0.5 minValue=15 maxValue=30		icon="temperature"
           Text item=Schlafzimmer_shutter																											 			icon="window"
   }

Frame label="Wohnzimmer" {
            Switch  	item=Wohnzimmer_modus 		 		label="Heizungsmodus"																				icon="climate" 			mappings=[0=AUTOMATIC, 1=MANUAL, 3=BOOST]
            Text 		item=Wohnzimmer_temp_auslesen  		label="Wohnzimmer ist Temperatur [%.1f °C]" 														icon="temperature"
            Setpoint 	item=Wohnzimmer_temp_einstellen 	label="Wohnzimmer soll Temperatur [%.1f °C]" 				step=0.5 minValue=15 maxValue=30		icon="temperature"
            Text 		item=Wohnzimmer_shutter																													icon="window"
                        
             			 }  


Frame label="Chart" {
	

//Datapoints neu laden
Switch item=Reload_Datapoints    label="Reload Datapoints"
    Chart item=Shutter period=W refresh=10000
    Chart item=Wohnzimmer_Sofa_Status	period=1h refresh=10000
}
}

2020-04-22 13:35:24.026 [vent.ItemStateChangedEvent] - Wohnzimmer_shutter changed from OPEN to CLOSED
2020-04-22 13:35:26.630 [vent.ItemStateChangedEvent] - Wohnzimmer_shutter changed from CLOSED to OPEN
2020-04-22 13:37:10.406 [vent.ItemStateChangedEvent] - Wohnzimmer_shutter changed from OPEN to CLOSED
2020-04-22 13:37:11.703 [vent.ItemStateChangedEvent] - Wohnzimmer_temp_auslesen changed from 21.20 to 21.30
2020-04-22 13:37:13.108 [vent.ItemStateChangedEvent] - Wohnzimmer_shutter changed from CLOSED to OPEN
2020-04-22 13:48:33.251 [vent.ItemStateChangedEvent] - Schlafzimmer_temp_einstellen changed from 5.00 to 16.50
2020-04-22 13:48:33.282 [vent.ItemStateChangedEvent] - Schlafzimmer_shutter changed from OPEN to CLOSED
2020-04-22 13:48:50.239 [vent.ItemStateChangedEvent] - Schlafzimmer_temp_einstellen changed from 16.50 to 5.00
2020-04-22 13:48:50.274 [vent.ItemStateChangedEvent] - Schlafzimmer_shutter changed from CLOSED to OPEN

Okay, that one Item seems to be working.
(despite the //This doesn’t work// comment in items)

And that Item seems to be working as well.

They are different, Schlafzimmer_shutter is String type and so will be string state “CLOSED” really.
While Wohnzimmer_shutter is Contact type, and so will be an openClosedType state.

That shouldn’t matter to your MAP, as all states get converted to string for transformation anyway.

I can’t see any reason your sitemap would not work, wil you show us a screenshot?

As to why channel #WINDOW_STATE is a contact for one device type and a string for another, I couldn’t say. You are in the hands of the binding author.
Related posts from years ago -


Here I added both, the Swodo which works and the WTH2

Well, there’s Fensterkontakt Wohnzimmer showing “offen”, which seems to be correct and what you wanted.

I’m completely not understanding what you are doing or expect to happen.

I have a shutter contact at the window. This one works as you see.
Then there is a wall mount thermostat which also offers the same state, this one didn’t work.
But your quote that the WTH2 is a string and not a contact solved the issue.
It’s interesting, that the SWODO is usable as contact and the WTH2 has to be used as sting.
So my problem is solved, thank you very much for you assistance.

Oh, is that what it is?

On the other thing, it’s a real window sensor. Presenting in openHAB as a contact type, a read-only sensor, is appropriate. You couldn’t send it a command and expect the window to close.

On the thermostat, it’s an operating mode. Run a different temperature while some window somewhere is open. You can send the thermostat a command to do that, as well as inspect its state. A contact type would not be appropriate.

the Schlafzimmer room there the wall mount works as contact, but this a generation older WTH and not WTH2.
So this was curious for me, to figure out this problem. But as you quoted from the binding author the channel needs String type. I guess the older hardware needed Contact