Need help with rule for window open

Items:

String kz_Window “Küchen Fenster” { channel=“max:shuttercontact:KEQ0646165:OEQ0911290:contact_state” }
String bz_Window “Bad Fenster” { channel=“max:shuttercontact:KEQ0646165:KEQ0472390:contact_state” }
String office_Window “Büro Fenster” { channel=“max:shuttercontact:KEQ0646165:OEQ0912806:contact_state” }

var Timer Kitchen_WINDOW_Timer = null
var Timer EG_BAD_WINDOW_Timer = null
var Timer Office_WINDOW_Timer = null

rule "Kitchen_open"

when
Item kz_Window changed
then
if (kz_Window.state==CLOSED) {

    if (Kitchen_WINDOW_Timer!=null) {
        Kitchen_WINDOW_Timer.cancel
        Kitchen_WINDOW_Timer=null
    }
}
else if (kz_Window.state==OPEN) {
    if (Kitchen_WINDOW_Timer==null) {
        Kitchen_WINDOW_Timer=createTimer(now.plusMinutes(1)) [|
            logDebug("Küche" , "Warning fired")
            
            sendHttpGetRequest('http://192.168.10.114/api/app/com.internet/whitelist/Fenster/Kitchen')
             ]
    }
}

end

You say you need help but don’t say what’s actually wrong. What’s the question? what’s failing? logs?

Anywho, at first glance I would say your contact items should be defined as “Contact” not “String”.

Problem is solved. My problem was the item type. String was wrong I changed it to contact and now everything is fine.