Need some Openhab settings for a magnetic contact

Could anyone please help me with some Openhab settings (items, sitemap and rules) for a door or window magnetic contact?
I now what I ask maybe sounds stupid but I’m very new in OH and I couldn’t find an example here on this community!
All I need is to display the state of a magnetic contact in OH if the door or the window is open or closed.
The Arduino code that I would like to use is the one from MySensors for the button actuator (here:
Any suggestion will be kindly appreciated.
Thank you.

I don’t think you have provided enough information.

What is the physical makeup of your system? How are you wiring up the sensor and how are you reporting the status to openHAB? For example, do you have an Arduino wired to the sensor with a wireless shield or device reporting the status over the network or are you running openHAB on a Raspberry Pi or some other computer with GPIO pins?

These answers are important because they will dictate how openHAB is to be configured.

I’m guessing that you are planning on using an Arduino based on your link to the Arduino code. However, the code you linked to is only half of the problem. You still need to get the sensed data into openHAB which doesn’t run on an Arduino. I’m in the process of using this approach in my system which consists of Arduinos wired to sensors that report their readings using an RMF69 transceiver to report to a Raspberry Pi with its own RMF69 transceiver which takes the reading and reports them to openHab using MQTT. So from an openHAB perspective I configure some Contact items that use the MQTT binding to get their values.

For example:

Contact N_D_Front "Front Door [MAP(]" <frontdoor> { mqtt="<[mosquitto:entry_sensors/main/front_door:state:default]" }

Another approach is to use RS485 transceivers and the Souliss Arduino binding.

However, if you have openHAB running on a Raspberry Pi and wire the sensors to the GPIO pins you can us the GPIO binding to read and report the sensor readings into openHAB. Of course this only works if you can run wires from the sensor to your pins easily. If not a wireless solution may be preferable.

NOTE: The contact above I actually have wired to a Raspberry Pi and I use a script I wrote to read the sensor state and report it over MQTT, but from openHAB’s perspective all it sees is the MQTT. Also, the Instructable uses a second Arduino with an RMF69 and an Ethernet shield to report the status instead of a Raspberry Pi which I plan to use for some temperature sensors.


Hi again,
First of all thanks all for your answers.
@Markus, the reason for which I decided to make a mew topic was because I found on the forum a lot of examples like you gave me but unfortunately I don’t understand them and I don’t think they are something I can use.
@Richard, your example might be what I’m looking for.
Maybe I didn’t explain well about my configuration and I didn’t because I asked about some general settings about a magnetic contact.
Now, to make my self understood, this is what I have and what I would like to use:
The 1.7.0 OH server runs on a Rpi 2. I have two arduinos connected wireless through nRF24L01+ and one of them has connected the a magnetic contact, DHT11 sensor and some push buttons and the second Arduino is the gateway which is connected via serial (usb) to the server and runs the serial gateway connection from MySensors example.
What I was able to do by now was to display in openhab the temp and humidity values and to turn on and off a single light.
The way I followed was based on node and child points but this is tricky and I don’t now how to develop it!
I didn’t choose yet the Mqtt way because I faced a lot of trouble trying to install the brocket so I came up with the serial communication.
My wish is to create in my house a small system for 5 widows, 1 doors magnetic contacts, to control 5 relays for my lights and a few relays for the electrical strike on the main door and a few other things.
For the moment because I now this means a lot of tests and learn, I just want to see in OH that my main door is OPEN or CLOSE depending on the magnetic contact state.
The sitemap should look like this:
Door icon (open or close) name of the item and its state (OPEN / CLOSE) taking in consideration my configuration.
Thank you again for your answers.
Looking for any suggestion!

@Markus, I am not a programmer and i don’t know C or Java, this is like a hobby for me and it all started a year ago when I bought my first Arduino Uno. Then the second one, a Arduino Mega, Pro mini, a few sensors (light, SCT, dht, a few relays and now the beautiful Raspberry pi 2 :slight_smile: and since than I’m still trying and trying different ways to make them work together. A few months ago I discovered Openhab which is amazing!
I’m not stuck with one single method, I’m stuck with the only functional method at this hour. On MySensors i found the Arduino codes for some of my needs and more important is that the two Arduino talk each other wireless through nRF24L01 so i don’t need to install wires between them and therefore i chose the serial communication. Another reason staying on this method is that for the light (only one at this point) i have the possibility to control it from OH and from a physical button too using another Arduino pin and its refreshing in OH using the second Arduino code here. This is what i was looking for. Now i’m trying to make in a array function but i saw in one of your comm that OH doesn’t support the array so this is bad…
About the magnetic contact i want to install on my door, there no impediment to install wires now because my i plan to install the main box near the door and there is a cable tray already installed there.
On the Github i found the demo example:

Contact Window_GF_Frontdoor 	"Frontdoor [MAP(]"		(GF_Corridor, Windows)

but i dont know how to make the communication between OH and Arduino code from MySensors. I just want to see that the door icon its changing from open to close and the status written OPEN or CLOSED.


A good way could be the use of the mysensors MQTT gateway ( in connection with the OH MQTT binding. On the Pi platform mosquitto is available as small footprint MQTT broker.

I’m using a similar setup but instead of connecting the sensors to Arduinos I put them directly to RPi GPIO’s. I’ve found that Arduino base boards including Ethernet connectivitiy are at least as expensive as RPi’s but less powerful.

Cheers Robert

OpenHAB is very complex and it takes a lot of learning and experience to understand how it works. I strongly recommend spending the time with the wiki to understand the examples you’ve seen. Without this basic knowledge it is difficult to even ask the right questions on these forums to get help. I think this is part of the problem with this thread.

OpenHAB has no native concept of a “magnetic contact”. Everything in openHAB is an abstraction and the specifics are centralized in the bindings. For example, you can have a z-wave wireless reed switch on one door and a wired magnetic switch hooked up to an Arduino that reports the state over MQTT on another door but openHAB treats them both as a Contact which has three states: OPEN, CLOSED, UNDEFINED. The difference between various Contracts is how you configure the binding that is attached to the Contact Item which sets its state to OPEN or CLOSED. So you need to figure out how to get the data from your Arduino connected magnetic switch into openHAB as a Contact item (i.e. the specific binding configuration). This is what I and most of the people responding to your question is focused on.

However, you do have the Arduinos talking with openHAB and are able to get the data into openHAB. This is a huge step that wasn’t clear from your original question. It isn’t clear from your description how you are doing this though and that is a critical piece of information for us to help. You mention you do this via a serial connection but openHAB doesn’t have a generic serial connection binding, so how are you getting the temp and humidity values into openHAB? Are you using the exec binding with a script that grabs the value from the serial port?

You should be able to do something similar to what you did with the temperature and humidity to get the door sensor data into openHAB. You will want to create a Contact item with the same sort of binding you use for temp and humidity to read in the data and you may need to create a map between the sensor value actually returned and the Contact states: OPEN, CLOSED. See the wiki for Items for details on how to set up and use the map.

Given that openHAB does not have easy built in support for serial connections, I highly recommend going back and learning how to get MQTT working. It takes a little bit of effort up front but once it is set up you have a very well supported, expandable, and scalable event bus with very strong openHAB and other home automation software support. I initially set it up to get Mqttitude working and quickly learned that it is one of the easiest and most flexible ways to integrate such remote sensors and actuators you are building into openHAB and other home automation software.


I’m slightly confused. If you have the temp and humidity sensors successfully getting data into openHAB, why can’t you do the same thing with the Contact? Just set up the binding part of the contact definition to pull in the data the same way.

However, I’m beginning to wonder what you do and don’t have working. Because you chose to get the data from your Arduinos via a serial interface you have something else to code yourself to get the data into opehHAB.

So I will make the following suggestions.

Approach #1:
Assumes that the serial connection from the Arduino is the same machine as openHAB.

You need to write a script on what ever machine has the serial connection that reads the door sensor data and prints it out. In openHAB create a Contact item using the exec binding to call the script. You will probably need to edit the to make sure it maps what ever your script outputs to one of the contact states. Make sure to populate the refresh interval so it runs periodically to get the latest value (maybe twice per second?).

Approach #2
Rather than communicating the data from the Arduinos using a serial interface which is not natively supported by any openHAB binding, add an ethernet shield to your gateway Arduino and add code to have it report the sensor readings over MQTT. The Arduino code for this can be found on the Instructables I linked to earlier.

You should be getting the impression from me and the others who have posted to this thread that the MQTT option is by far the community preferred solution.


@Markus you know that OH settings for a dht are different than those for the buttons. I tried to adapt them but without any success!
The main reasons for which I chose this serial binding as I told are: firstly that I found this solution for two way communication for a light so in this case the OH button is refreshing when the physical button is pressed and vice-versa and secondly because this wireless communication between the two arduinos!
Is there any Arduino code that can provide this possibility for a few buttons? Using the Mqtt binding? I have already an Ethernet shield and I can use it.
When I’ll get home I’ll post here the OH settings I have right now and so maybe it will be more easy to understand. One reminder would be that I didn’t make any of the OH settings or Arduino codes, I’m just modifying them to my needs and my configuration.

I think you meant to direct that to me.

I think you need to sit back and spend some more time reading and understanding how openHAB works. The OH settings for a dht (I assume you are referring to the temperature setting) and buttons is not that different when it comes to getting the data into OH. The key part is in how the sensor data gets into OH which is controlled by the binding. You can use the same binding for Text, Contact, Switch or any other OH Item.

For example:

This is a contact that receives its data from MQTT

Contact N_D_Front "Front Door [MAP(]" <frontdoor> { mqtt="<[mosquitto:entry_sensors/main/front_door:state:default]" }

This is a Text item that has the text of the state of the front door:

String N_D_Front "Front Door [MAP(]" <frontdoor> { mqtt="<[mosquitto:entry_sensors/main/front_door:state:default]" }

This is a Switch that is ON when the door is open (NOTE, requires updates in the to map “OPEN” to “ON” and “CLOSED” to “OFF”)

Switch N_D_Front "Front Door [MAP(]" <frontdoor> { mqtt="<[mosquitto:entry_sensors/main/front_door:state:default]" }

Note that in all of these cases, the binding part (the parts between the “{ }”) is unchanged. They are almost all identical except for the item type. So no, the settings for a dht and a button is not that different.

And for completeness, here is a Switch that uses the zwave binding rather than mqtt. Notice that the only part that is really different is the binding, the way that the data gets into and out of OH.

Switch S_L_Front "Front Room Lamp" <light> { zwave="3:command=switch_binary" }

Then please post your code rather than asking generic questions and forcing us to guess what you have and haven’t done.

Post your working Button Item definition, your working Temperature and Humidity Item definitions, and your not working Contact definition.

It is SOOOOO much easier to provide help when you give us exactly what you tried with code examples.

I understand but realize that the wireless communication between the Arduinos is irrelevant to OH. You got a button (i.e. OH Switch) to work using this setup so you should be able to get a Contact to work as well. But you have to give us how you got the Switch to work in OH. We NEED to see the parts in “{ }” because you already got it working. Everything else is irrelevant, as far as OH is concerned. Without our seeing what you have working with this setup all we can do is provide advice for how we would set it up.

And that is frankly the problem. It is OK to cobble together a bunch of code from all over the web but if you don’t understand what it does or how it works you will hit a complete dead end. And because you don’t understand how the Arduino code works or even some of the fundamental basics of how OH works you don’t even know enough to diagnose what your problem really is or to ask the right questions on a forum like this.

Once you post your Items as I asked above we can probably get your Contact working. However, I suggest that you need to spend a little more time studying and learning both the Arduino code you are using, the OH settings you are copying, and OH itself. Since you said you are not a coder, I suggest you need to learn at least some basics so you can understand what is going on. It is my opinion (not shared by everyone I sure) that to successfully use OpenHAB, you need to be reasonably skilled in both computer administration and in coding. Not necessarily at a professional level but at least proficient enough to understand and learn from and use the wiki and examples to help solve your problems.

You can pick this up gradually. Start with some small things (e.g. add some Weather information to OH’s sitemap) and build some simple Arduino programs yourself (e.g blink an LED) and gradually work your way up until you understand the code you already have running. Learning the code is part of the home automation hobby. If you are unwilling to do that perhaps OH 1.x isn’t for you and you should hold out for OH 2 which is working towards requiring fewer technical skills to use.


1 Like

Oh sorry for this small confusion about replay. I know that to come with this big and well explanation it takes time and there are a lot of people on this site who need help as i do and i would like to thank both for your answers.
Please see below what i have at this point and through wich i can turn on/of a single light and to display the temp and humidity.
OH items:
String Arduino “Arduino” { serial=“COM4@115200” }

Switch lightBar01 “Lumina dormitor”
Number livingTemp01 “Temperatura [%.1f °C]”
Number livingHum01 “Umiditate [%.1f %%]”
OH rules:
import org.openhab.core.library.types.*
import org.openhab.core.persistence.*
import org.openhab.model.script.actions.*
import org.joda.time.*
import java.util.*
import org.eclipse.xtext.xbase.lib.*
import org.openhab.core.items.*

var String ArduinoUpdate = “”
var String sketchName = “”

var int V_TEMP = 0
var int V_HUM = 1
var int V_LIGHT = 2
var int V_DIMMER = 3
var int V_PRESSURE = 4
var int V_FORECAST = 5
var int V_RAIN = 6
var int V_RAINRATE = 7
var int V_WIND = 8
var int V_GUST = 9
var int V_DIRECTION = 10
var int V_UV = 11
var int V_WEIGHT = 12
var int V_DISTANCE = 13
var int V_IMPEDANCE = 14
var int V_ARMED = 15
var int V_TRIPPED = 16
var int V_WATT = 17
var int V_KWH = 18
var int V_SCENE_ON = 19
var int V_SCENE_OFF = 20
var int V_HEATER = 21
var int V_HEATER_SW = 22
var int V_LIGHT_LEVEL = 23
var int V_VAR1 = 24
var int V_VAR2 = 25
var int V_VAR3 = 26
var int V_VAR4 = 27
var int V_VAR5 = 28
var int V_UP = 29
var int V_DOWN = 30
var int V_STOP = 31
var int V_IR_SEND = 32
var int V_IR_RECEIVE = 33
var int V_FLOW = 34
var int V_VOLUME = 35
var int V_LOCK_STATUS = 36
var int V_DUST_LEVEL = 37
var int V_VOLTAGE = 38
var int V_CURRENT = 39
var int msgPresentation = 0
var int msgSet = 1
var int msgReq = 2
var int msgInternal = 3
var int msgStream = 4
var int alarmArmor = 1

// Internal Commands

var int I_BATTERY_LEVEL = 0
var int I_TIME = 1
var int I_VERSION = 2
var int I_ID_REQUEST = 3
var int I_ID_RESPONSE = 4
var int I_INCLUSION_MODE = 5
var int I_CONFIG = 6
var int I_FIND_PARENT = 7
var int I_LOG_MESSAGE = 9
var int I_CHILDREN = 10
var int I_SKETCH_NAME = 11
var int I_SKETCH_VERSION = 12
var int I_REBOOT = 13
var int I_GATEWAY_READY = 14

// Mappings
var HashMap<String, String> sensorToItemsMap = newLinkedHashMap(
“22;1;” -> “lightBar01”, // looks good
“lightBar01” -> “22;1;”,
“22;0;” -> “livingHum01”, // looks good
“livingHum01” -> “22;0;”,
“22;3;” -> “livingTemp01”,
“livingTemp01” -> “22;3;”

//receiving msg from mysensors gateway
rule “Arduino sends to Openhab”
Item Arduino received update
var String lineBuffer = Arduino.state.toString.split("\n")
for (String line : lineBuffer) {
var String[] message = line.split(";")
var Integer nodeId = new Integer(message.get(0))
var Integer childId = new Integer(message.get(1))
var Integer msgType = new Integer(message.get(2))
var Integer ack = new Integer(message.get(3))
var Integer subType = new Integer(message.get(4))
var String msg = message.get(5)
if(msgType == 1 ){
if (subType == V_LIGHT){
var String state
var Integer statusInt = new Integer(message.get(5))
if(statusInt == 1) {
state = “ON”
else {
state = “OFF”
postUpdate(sensorToItemsMap.get( nodeId + “;” + childId + “;”), state)
println ("Light Item: " + sensorToItemsMap.get( nodeId + “;” + childId + “;”) + " Light: " + state )
if (subType == V_TEMP){
postUpdate(sensorToItemsMap.get( nodeId + “;” + childId + “;”), msg)
println ("Temp item: " + sensorToItemsMap.get( nodeId + “;” + childId + “;”) + " temp: " + msg )
if (subType == V_HUM){
postUpdate(sensorToItemsMap.get( nodeId + “;” + childId + “;”), msg)
println (“Hum item: " + sensorToItemsMap.get( nodeId + “;” + childId + “;”) + " hum: " + msg )
// Internal Command
if(msgType == 3){
if(subType == I_SKETCH_NAME){
println(“Sketch name: " + msg )
if(subType == I_SKETCH_VERSION){
println(“Sketch version: " + msg )
postUpdate(sensorToItemsMap.get( nodeId + “;” + childId + “;”), sketchName+” " +msg )
rule “Light”
Item lightBar01 received command
if(receivedCommand == ON) {
sendCommand(Arduino, “22;1;1;0;2;1\n”)
if(receivedCommand == OFF) {
sendCommand(Arduino, “22;1;1;0;2;0\n”)
OH sitemap:
sitemap demo label=“Acasa”
Frame label=“Lumini” {
Switch item=lightBar01 label=“Lumina dormitor”
Frame label=“Senzori” {
Text item=livingTemp01
Text item=livingHum01
So as you can see my only binding is here:

String Arduino "Arduino" { serial="COM4@115200" }

In the addon folder i have this jar:


All you see here was adapted by me from some other examples but its done by me. I didn’t just copy pasted in the right folders … I had to almost break my head to get it work asking a lot of questions and trying different combinations but anyhow this is working well now.
The arduino codes are those from the link i posted above,
There are a lot to discuss about your answer Richard but for the moment lets stick to this OH configuration.
Thanks again for the answers.
Have a nice evening or day wherever you are :slight_smile:
PS: all my test are done on my PC, that’s why you see COM4. On my RPI i use the serial dev/ttyACM0 or so.

Now it all becomes clear. Your problem isn’t an openHAB configuration problem at all.

You have a String Item that reads in the data from COM4 at 115200 BAUD but all the real processing is taking place in a relatively complicated custom rule.

This means that ultimately this openHAB forum may not be the correct place to get the answer to your question. This is a very custom configuration and beyond the scope of what most of us will be able to help with, short of having a lot of people (myself included) recommend you use a different approach. In short, this is something you will have to code yourself to get working.

I’ll do my best to point you in the right direction.

I’m assuming that your Arduinos are reporting the door sensor data to OH over the serial bus and the messages are in the same format as the working switch and sensors. If that is not the case you need to start there and have it report the data the exact same way. Use the V_LIGHT as your example for reporting the state and converting it to “OPEN” or “CLOSED” as appropriate. I won’t be much help there. I don’t really know Arduinos code and this requires changes to the Arduino code.

So first of all, we need to add a Contact for your door;

Contact FrontDoor "Door" <frontDoor>


You need to do the following:

  1. You will either need to reuse one of the existing subTypes or create your own. I’ll assume you make your own and call it V_WHATEVER
  2. Add FrontDoor to sensorToItemsMap keyed on nodeId;childId
  3. Add an if(subType == V_WHATEVER) inside the if(msgType == 1) to parse the sensor reading (i.e. the state) out of the message. Use the if(subType==V_LIGHT) as a template
  4. Create an if(subType == V_WHATEVER) clause right after the V_HUM. Use what is there as a template

Add a line that reads:

Text item=FrontDoor

While this code you have works, I think you are seeing that it is very difficult to expand or modify. In most of the similar setups I’ve seen with remote wireless Arduino sensors reporting to openHAB almost all of the code in the Arduino rule is put on a “Gateway” Arduino (or Raspberry Pi) which is connected to both the wireless network the sensors communicate on and the IP network openHAB runs on. This “Gateway” then parses, packages, and delivers the messages in a standardized way so openHAB (or anything else for that matter) can just pick the messages up and go with little to no processing of the messages. This way you may not even need to do anything more than turn your new sensors on and add the Item to openHAB to add a new device. As it stands now, with your configuration you have write new code every time you add a new device.

I still recommend reviewing the setup at the Instructables link and considering an approach like MQTT. He has posted all the Arduino code you need there to get it talking MQTT. You probably already have everything you need hardware wise and he has posted almost all the code you need software wise.

Sorry we couldn’t help more.


Hi guys,
I decided to take a different aproach and now i’m following this tutorial which is a very detailed one and suppose to use mqtt - mosquitto instead of the serial communication. I like this tutorial because it uses Rasberry as a gateway and i can use my nRF24L01.
I followed all the steps one by one but i got stuck somewhere…
Could anyone of you guys please take a look inside on it and tell me if the mqtt binding is ok?
If i test the Mosquitto using this step here i think is ok because opening two terminals i can see the message from one to the other one.
If i use this command: sudo ./hareceiver in the rf24libs and when Arduino sends data i see this on the Rasberry pi terminal:

Temperature received from node 1: nan
Client mosqpub/3951-raspberryp sending CONNECT
Client mosqpub/3951-raspberryp received CONNACK
Client mosqpub/3951-raspberryp sending PUBLISH (d0, q0, r0, m1, ‘home/temperature’, … (3 bytes))
Client mosqpub/3951-raspberryp sending DISCONNECT

The problem is that when i go to the webpage the sitemap looks ok, i can see the temperature item but it not loading the values!
I think the Arduino cant send or sends some wrong things to Rasberry.

Thanks in advance.

We won’t be able to help with the Arduino and RF24 stuff. You will need to contact the author of the tutorial you followed for help there.

From what is being printed in the RasPi terminal I would say that something is wrong with how the temperature is being transmitted. “nan” stands for “Not a Number”. Based on how openHAB appears to be configured in that tutorial, it is expecting a number so can’t handle whatever is being transmitted.

If I’m right, this isn’t an openHAB problem.

Some generic debugging advice for openHAB:

  • Look at the logs and make sure the binding you are trying to use is actually installed and configured correctly. In this case, make sure you see
  • Look at the event.log file and make sure that openHAB is receiving the MQTT message. You should see a line along the lines of “TestTemperature received update”. That will tell you that openHAB is receiving the messages.
  • When asking for help on these forums, be sure to post what version of OH you are using, the Items definition and the text of any Items, Rules, or Sitemap that you are having problems with. I would venture to say that most problems people have with OH come down to a typo in the Item binding configuration or a bug in the rules.

I was asking here too (I asked already on some forum, they don’t have a forum like this. here because is related to Openhab and Mqtt.
Could you please tell me, after i installed Mosquitto on Rasberry should i make some settings in the Openhab Config file? i didn’t make anything there… and how do i know if Mosquitto is starting on reboot.

I found the 2nd part of this tutorial here and now when i load the code in the Rasberry i see this:

Data received from node 1: Temp = nan, Hum = nan, Light = 35, Motion = 0, Door Open = 1

How do i see the event.log ? in Openhab?
In the addons folder now i have the org.openhab.binding.mqtt-1.7.0.jar file
PS: I’m using OH 1.7.0

Then you didn’t follow the tutorial completely. Step 5 of the tutorial you link to explains the openHAB configuration. Look at the “Configuring the MQTT Binding” section.

On Linux, if you installed using apt-get they are located in /var/log/openhab. If you installed by downloading and unzipping the log files are located in /logs where is the location of openHAB. You can see where the logs are being saved by looking at the logback.xml file in configurations.

From your example output you are still getting nan for Temp and for Hum.

OMG! you’re right, i forgot to modify the config file in OH! I don’t understand how but never mind, thanks now i see three of the items working but not the temp and humidity. the same nan? ! Maybe is from Arduino sketch?

Dont know what to say, if i test the dht11 code given here is ok, i can read very nice on the serial monitor all the values but when i upload the code from here for temp and hum the same nan!

I don’t know Arduino code very well, but I suspect that your temp and hum readings are being returned as a String (i.e. characters) rather than actual numbers. There is a big difference.

Hopefully this will point you in the right direction.

Got it, one wire broken… yuppy! thanks, can you please tell me the door or frontdoor symbol works on OH 1.7.0? because i tried and and i dont see it on the webpage.

It works. Set the icon to “frontdoor” for a Contact item and if it is OPEN the frontdoor-open icon will be used and if it is set to CLOSED the frontdoor-closed icon will be used.

Please see the Sitemap and Items wiki pages for details.

Maybe there is an Arduino mistake.
I have this item:

Number	Node01Door	"Usa acces [MAP(]"	<contact>	(GF_Living)		{ mqtt="<[mymosquitto:home/door:state:default]" }

and this sitemap:

Text item=Node01Door

and it display the text with open or close depending on the switch position but the icon doesn’t change.
If i change “Number” to “Contact” like this:

Contact	Node01Door	"Usa acces [MAP(]"	<frontdoor>	(GF_Living)		{ mqtt="<[mymosquitto:home/door:state:default]" }

is not working anymore, on the web i see unavailable.
In the transform i have a map for the door and 0=open and 1=closed
What’s wrong?

PS: I have another item

Number	Node01Motion	"Senzor Miscare [MAP(]"	<shield>	(GF_Living)		{ mqtt="<[mymosquitto:home/motion:state:default]" }

and this one has the shield icon which is active, when no motion is green and when is motion is red!