OH2: Max Shuttercontact Problems

Hello,
iam new to Openhab.
I’ve installt openhab2.
I’ve a Maxcube with thermostats and shuttercontacts.
As binding i use:
https://github.com/openhab/openhab2-addons/tree/master/addons/binding/org.openhab.binding.max
The Thermostats work fine.

But i struggle with the shuttercontact.
In Paperui they work fine.
But in other uis i ran in follow errors:

    14:10:06.911 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'OG_Bath_Window' for widget org.eclipse.smarthome.model.sitemap.Switch
14:10:06.912 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'OG_Bath_Window' for widget org.eclipse.smarthome.model.sitemap.Switch
14:10:06.912 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'OG_Bath_Window' for widget org.eclipse.smarthome.model.sitemap.Switch
14:10:06.912 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
14:10:06.913 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
14:10:06.913 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'OG_Bath_Window' for widget org.eclipse.smarthome.model.sitemap.Text
14:10:06.913 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'OG_Bath_Window' for widget org.eclipse.smarthome.model.sitemap.Text
14:10:06.913 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'OG_Bath_Window' for widget org.eclipse.smarthome.model.sitemap.Text

As u see i’ve tryed as Text or Switch.
My goal is to see in the Sitemap a line like “Window is open”.
My item configuration is:

Contact OG_Bath_Window "Window is" <contact> (Window_Sensor, OG_Bath, Contact) {channel="max:shuttercontact:NEQ1207124:NEQ0846206:contact_state"}

In the Sitemap i defined:

Switch item=OG_Bath_Window icon=“contact” label=“Badfenster”
Text item=OG_Bath_Window icon=“contact” label=“Badfenster”

nothing works for me.
Sure its a nooby error and u can help me :slight_smile:

PS: For Future, can i see the paperui configuration in any file or so to compare?

Alternative.
An example from an functionally User would be awesome too.

Added my Files.
Hope someone finds the error.

https://github.com/Hilzerak/openhab

Hi Gubert,

I think what you need to display your values is to add the respective variables to your items or within the labels in your sitemap.

I would try the following in the items files:

 Contact OG_Bath_Window "Window is [%s]" <contact> (Window_Sensor, OG_Bath, Contact) {channel="max:shuttercontact:NEQ1207124:NEQ0846206:contact_state"}

or if you prefer the infos being displayed in German:

 Contact OG_Bath_Window "Badfenster ist [MAP(de.map):%s]" <contact> (Window_Sensor, OG_Bath, Contact) {channel="max:shuttercontact:NEQ1207124:NEQ0846206:contact_state"}

(I was able to find some more info in the documentation of “items”)

In the sitemap I didn’t configure any labels unless I want to have something else shown in the UI than configured for item itself.
So, I suggest to use the following in your sitemap:

 Text item=OG_Bath_Window icon="contact"

PS: I was fiddling about the syntax of the config files for quite some time also. However I got most of it working (at least displaying all the infos).

Best regards
Karsten

@karwak
Thx for Reply i’ve changed the item as u show.
But i didnt get this to work…
I’m going to be crazy because in the paperui everything works perfectly… isnt it possible to “copy” or “show” the used config from paperui?
The Log show every time the same issue…

09:09:35.329 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
09:09:35.330 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
09:09:35.330 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘OG_Bath_Window’ for widget org.eclipse.smarthome.model.sitemap.Text
09:09:35.330 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘OG_Bath_Window’ for widget org.eclipse.smarthome.model.sitemap.Text
09:09:35.331 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘OG_Bath_Window’ for widget org.eclipse.smarthome.model.sitemap.Text
09:09:36.444 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
09:09:36.445 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text

09:10:05.540 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Switch
09:10:05.541 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Switch
09:10:05.541 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Switch
09:10:05.541 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘OG_Bath_Window_Battery’ for widget org.eclipse.smarthome.model.sitemap.Switch
09:10:05.541 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘OG_Bath_Window_Battery’ for widget org.eclipse.smarthome.model.sitemap.Switch
09:10:05.541 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘OG_Bath_Window_Battery’ for widget org.eclipse.smarthome.model.sitemap.Switch

Would be very very nice if any someone who has brought this to work, post his configfiles…

Hi Gubert,

hmmm, to be honest, I’m also not too deep into all of this. Just found that there is a difference to my setup in this specific matter.

If you feel comportable about it you can send me your config-files and I’ll have a quick look at it…

Best regards
Karsten

I use the MAX Fensterkontake with the Homegear-Bridge, so it will look a little different to your MAX-Binding.
You wrote, you see the Contacts in the Paper UI, so they are unter COnfiguration --> Things, right?
Klick on one of them, you will see:


Then put in the .items file:

Contact ReserveFensterSchalter     "Reserve Fensterkontakt [MAP(windowcontact.map):%d]"        <contact>    (Fensterkontakte, TestKram)    { channel="homematic:HG-BC-SC-Rd-WM-2:3d0672e6:MEQ1800159:1#STATE"}
Contact BatReserveFensterSchalter     "Batterie Reserve Fensterkontakt [MAP(battery.map):%s]" <battery>     (BatFensterkontakte)        { channel="homematic:HG-BC-SC-Rd-WM-2:3d0672e6:MEQ1800159:0#LOWBAT"}
Number SignalReserveFensterSchalter "Signalstärke ReserveFensterschalter [%d]"                 <qualityofservice>        (SigFensterkontakte)        { channel="homematic:HG-BC-SC-Rd-WM-2:3d0672e6:MEQ1800159:0#RSSI_DEVICE"}

There also has to be .map file wich contains:

0=geschlossen
1=offen
2=gekippt
-=UNKNOWN

CLOSED=geschlossen
OPEN=offen
NULL=undefiniert

and one with:

0=OK
1=leer
CLOSED=OK
OPEN=leer
OFF=OK
ON=leer
-=unbekannt

In the Paper UI --> Extensions --> Transformations the MAP-Transformation has to be installed.
hope that helps

@Windrad

Thx for reply.
Unfortunately it doesnt help to solve the problem.

items:

Contact OG_Bath_Window “Badfenster ist [MAP(max.map):%d]” (Window_Sensor, OG_Bath, Contact) {channel=“max:shuttercontact:NEQ1207124:NEQ0846206:contact_state”}
Contact OG_Bath_Window_Battery “Badfenster_Batterie [MAP(max_battery.map):%s]” (Window_Sensor, OG_Bath) {channel=“max:shuttercontact:NEQ1207124:NEQ0846206:battery_low”}

sitemap:

Text item=OG_Bath_Window
Text item=OG_Bath_Window_Battery

transform:
max.map

1=offen
0=geschlossen
2=gekippt
NULL=undefiniert
CLOSED=geschlossen
OPEN=offen
-=UNKOWN

max_battery.map

0=OK
1=leer
CLOSED=OK
OPEN=leer
OFF=OK
ON=leer
-=unbekannt

I think the battery state is in my binding a switch, but that doesnt explained why the state (the essential info) is not displayed and as switch they didnt is working

I don’t see any error. Just, you use:

so the Item is displayed in these three groups, so it’s not nessecary to mention it in your sitemap. I don’t know if this “doubble” naming causes problems.
And you use the group “Contact”, which is highlited like an Item in Designer when I copy it there. Maybe this causes irritations.

Hi Gubert,

I had a quick look at you config files :slight_smile: … here are some suggestions I have after comparing your files with mine:

a) Regarding your addons.cfg:

# A comma-separated list of bindings to install (e.g. "sonos,knx,zwave")
binding = 

# A comma-separated list of UIs to install (e.g. "basic,paper")
ui = 

# A comma-separated list of persistence services to install (e.g. "rrd4j,jpa")
persistence = 

# A comma-separated list of actions to install (e.g. "mail,pushover")
action = 

# A comma-separated list of transformation services to install (e.g. "map,jsonpath")
transformation = 

# A comma-separated list of voice services to install (e.g. "marytts,freetts")
voice = 

# A comma-separated list of miscellaneous services to install (e.g. "myopenhab")
misc = 

To my experience, when the options in the addons.cfg are active (not commented out with #) all components not listed get uninstalled… I have all the bindings, uis, etc. I want to have installed therefore listed in my addons.cfg.

b) Regarding your max.things:

Bridge max:bridge:MaxCube [ ipAddress="192.168.178.2" ]

To my understanding the syntax should be like::

Bridge max:bridge:<MAX!Cubes Serial No.> [ ipAddress="<MAX!Cubes IP-Address>", serialNumber="<MAX!Cubes Serial No.>" ]

as both parameters are defined as required=“true” in the max bindings brigde.xml (see https://github.com/openhab/openhab2-addons/blob/master/addons/binding/org.openhab.binding.max/ESH-INF/thing/bridge.xml )

c) Regarding your max.items:

Contact OG_Bath_Window_Battery          	"Badfenster_Batterie [MAP(max_battery.map):%s]" <battery>               (Window_Sensor, OG_Bath) 	 	{channel="max:shuttercontact:NEQ1207124:NEQ0846206:battery_low"}

Except that last line, where ‘Contact’ should be replaced with ‘Switch’, your max.items file looks very similiar to mine.

Switch OG_Bath_Window_Battery          	"Badfenster_Batterie [MAP(max_battery.map):%s]" <battery>               (Window_Sensor, OG_Bath) 	 	{channel="max:shuttercontact:NEQ1207124:NEQ0846206:battery_low"}

I’m just wondering where you have configured the group ‘Temperature’ and ‘Actual_Temp’? I wasn’t able to find it in any other items file.

d) Regarding your Haus.sitemap:

d1)

Switch          item=OG_Bed_Thermostat_Mode             mappings=[AUTOMATIC=AUTOMATIC, MANUAL=MANUAL, BOOST=BOOST]

I not sure if you need the mappings here, esp. as they map the same text. Is that because of the 3 choices? Would be interesting for me to understand the reason behind haveing it that way.

d2)

Switch          item=OG_Bed_Thermostat_Battery

As this is just showing a value I have used a Text item instead of a Switch item…

d3)

Group   item=OG_Corridor
Group   item=gDG        label="Dachgeschoss"    icon="attic"

I found that if not all groups at least include “subitems” with {} the sitemap sometimes doesn’t show up properly. That’s the reason why I decided to have all groups with at least one item, e.g.

Group   item=OG_Corridor
{
Text label="no components yet"
}

d4)

Text            item=OG_Bath_Window                     label="Badfenster"

To my understanding, as soon as you define a label in the sitemap for an item, it won’t show you the original text defined in the items file. So either don’t add a label in the sitemap or configure the label similiar to the one in your items file.

Text            item=OG_Bath_Window                     label="Badfenster ist [MAP(max.map):%d]"

d5)

Group   item=actual_temp        label="Aktuelle Raumtemperatur" icon="temperature"

Refers to c). Where’s the definition of the group ‘actual_temp’?

That’s what I found reviewing your configuration files. Hopefully this helps you getting toward a working configuration. When fiddling about mine, I found that syntax seems to be very important and can easily been overseen :wink:
Let me know what the results are after reviewing yours…

Best regards
Karsten

PS: For whatever reason some of my headings in this text are without linefeed :frowning: … sorry for that… wasn’t able to fix that.

@karwak
Much much thanks for your time and work!

A:
As i started with openhab2 and install all things with paperui i commented now all out.

B:
i’ve changed this. thx!

C:
Copy paste error at 2nd window_battery, yes.

I’ve used Temperature and Actual_Temperature because i would like to create on my sitemap an view with all actual temps without adding all manually. I havent defined that group because it works fine and i thought it fits.
Now both groups are defined.

D1
I didnt have any mapping with same text? Which do you mean?
In the Binding Example they handel it that way.
https://github.com/openhab/openhab2-addons/tree/master/addons/binding/org.openhab.binding.max

D2
Why an Text item? In the binding example it is a switch. Confused me.

D3
Okay changed it for OG_Corridor.
In gDG doesnt fit for me because then all rooms are disappear and its for the moment unnececssary effort to add them manually for nothing to display.

D5
See C

Unfortunately all of this tips and changes havent effected my main problem with the shutter contacts.
Dont get them to display correctly. The Paperui and Logfile notice the statechange of the contacts. That means for me it must be an configuration fault in my config for the other UIs.
My actual configs are:

transform/max.map
1=offen
0=geschlossen
2=gekippt
NULL=undefiniert
CLOSED=geschlossen
OPEN=offen
-=UNKOWN

transform/max_battery.map
0=OK
1=leer
CLOSED=OK
OPEN=leer
OFF=OK
ON=leer
-=unbekannt

sitemap
Text item=OG_Bath_Window
Switch item=OG_Bath_Window_Battery

items
Contact OG_Bath_Window “Badfenster ist [MAP(max.map):%d]” (Window_Sensor, OG_Bed, Contact) {channel=“max:shuttercontact:NEQ1207124:NEQ0846206:contact_state”}
Switch OG_Bath_Window_Battery “Badfenster_Batterie [MAP(max_battery.map):%s]” (Window_Sensor, OG_Bath) {channel=“max:shuttercontact:NEQ1207124:NEQ0846206:battery_low”}

My confusion starts already with the shown things. how can it be that NOTHING displayed in the UI? Not even “Badfenster ist”?

It should at least display anything not only “OG_Bath_Window”?!

@Gubert

Very strange…

Would you mind creating another sitemap for testing (test.sitemap)?

sitemap test    label="Hausverwaltung (Test)"
{
	Group   item=OG_Bath
	{
		Frame   label="Heizung"
		{
			Switch          item=OG_Bath_Thermostat_Mode            mappings=[AUTOMATIC=AUTOMATIC, MANUAL=MANUAL, BOOST=BOOST]
			Setpoint        item=OG_Bath_Thermostat_set_temp        minValue=4.5 maxValue=32 step=0.5
			Text            item=OG_Bath_Thermostat_actual_temp
			Switch          item=OG_Bath_Thermostat_Battery
			Text            item=OG_Bath_Thermostat_valve
			Text            item=OG_Bath_Window
			Text            item=OG_Bath_Window                     label="Badfenster ist [MAP(max.map):%s]"
			Switch          item=OG_Bath_Window_Battery
		}
	}
}

You can create the new sitemap in parallel to your original one and test it with (depending which UI you use):

http://<yourserversname or ip>:8080/basicui/app?sitemap=test

or

http://<yourserversname or ip>:8080/classicui/app?sitemap=test

How does the test sitemap look like?

Okay news…

1. If i set the thingsconfig to
Bridge max:bridge:NEQ1207124 [ ipAddress=“192.168.178.2” serialNumber=“NEQ1207124” ]

nothing works over the cube.
But i can set
Bridge max:bridge:Maxcube [ ipAddress=“192.168.178.2” serialNumber=“NEQ1207124” ]
without problems.

2. window shutters
I’m pretty sure that i’ve solved the issue.
i cant test it acutally because iam not @home.
But now i see the label and status.
The half of my config cant ever work properly because the itemconfig was:

Switch OG_Bath_Thermostat_Battery               "Battery Low"                                   <battery>               (Temperature, OG_Bath)                  {channel="max:thermostat:NEQ1207124:MKF0059159:battery_low"}
String OG_Bath_Thermostat_Mode                  "Thermostat Modus"                              <climate>               (Temperature, OG_Bath)                  {channel="max:thermostat:NEQ1207124:MKF0059159:mode"}
Number OG_Bath_Thermostat_actual_temp           "Aktuelle Raumtermperatur  [%.1f °C]"           <temperature>           (Temperature, OG_Bath, Actual_Temp)     {channel="max:thermostat:NEQ1207124:MKF0059159:actual_temp"}
Number OG_Bath_Thermostat_set_temp              "Gesetzte Raumtemperatur [%.1f °C]"             <temperature>           (Temperature, OG_Bath)                  {channel="max:thermostat:NEQ1207124:MKF0059159:set_temp"}
Number OG_Bath_Thermostat_valve                 "Ventilöffnung                                 <heating>               (Temperature, OG_Bath)                  {channel="max:thermostat:NEQ1207124:MKF0059159:valve"}

Switch OG_Kitchen_Thermostat_Battery            "Battery Low"                                   <battery>               (Temperature, OG_Kitchen)               {channel="max:thermostat:NEQ1207124:MKF0047491:battery_low"}
...
...
...

I promised you ive read this fucking 100 times…:rage::sob:
But now i formatet the code to make him more readable and then i noticed the missing " after Ventilöffnung…

Number OG_Bath_Thermostat_valve "Ventilöffnung <heating> (Temperature, OG_Bath) {channel="max:thermostat:NEQ1207124:MKF0059159:valve"}

I’ll awnser here again when I see it works. Before I believe in nothing :sweat_smile:

Sounds great! Looking forward to see if this was the issue :wink:

@karwak
The state is now always “UNKNOWN”. -.-

In the Logfile is looks correctly:

[ItemStateChangedEvent ] - max_shuttercontact_NEQ1207124_NEQ0846206_contact_state changed from CLOSED to OPEN

My actual Transform is:

1=offen
0=geschlossen
2=gekippt
NULL=undefiniert
CLOSED=geschlossen
OPEN=offen
-=UNKOWN

Itemconfig:

Contact OG_Bath_Window “Badfenster ist [MAP(max.map):%d]” (Window_Sensor, OG_Bed, Contact) {channel=“max:shuttercontact:NEQ1207124:NEQ0846206:contact_state”}

Any Ideas?

Hi Gubert,

hmmm, only difference I noticed is that I use %s instead %d …

What about giving it a try with %s?

Best regards
Karsten

Have tryed this already. Same result.

Contact OG_Bath_Window “Badfenster ist [MAP(max.map):%d]” (Window_Sensor, OG_Bed, Contact) {channel=“max:shuttercontact:NEQ1207124:NEQ0846206:contact_state”}

Contact OG_Bath_Window1 “Badfenster ist [MAP(max.map):%s]” (Window_Sensor, OG_Bed, Contact) {channel=“max:shuttercontact:NEQ1207124:NEQ0846206:contact_state”}

Sitemap:

Text item=OG_Bath_Window
Text item=OG_Bath_Window1

Did you try a very small sitemap for testing?

Sure.

#sitemap Test    label="Test"
                        Frame   label="Heizung"{
                        Text            item=OG_Bed_Window
                                }

Same…

LoL…