Can't connect IRIS Garage Door Controller to openHABianpi

OK, I’ve been busy with other things for a while but I have been working with VS Code with the openhab extension a bit and Samba.

I’m still having problems though. Here are my log, rules and items files:

openhab> log:tail
14:36:28.196 [WARN ] [ig.dispatch.internal.ConfigDispatcher] - Could not parse line 'Define your MQTT broker connections here for use in the MQTT Binding or MQTT'
14:36:30.203 [INFO ] [i.dashboard.internal.DashboardService] - Started dashboard at http://192.168.0.12:8080
14:36:30.213 [INFO ] [i.dashboard.internal.DashboardService] - Started dashboard at https://192.168.0.12:8443
14:36:31.675 [INFO ] [.io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = 4a44c372-3ca2-4348-a2b6-42fd2d2deccf, base URL = http://localhost:8080)
14:36:37.984 [INFO ] [del.core.internal.ModelRepositoryImpl] - Loading model 'garagedoor.items'
14:36:41.155 [INFO ] [rthome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
14:36:45.430 [INFO ] [del.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'garagedoor.rules', using it anyway:
There is no context to infer the closure's argument types from. Consider typing the arguments or put the closures into a typed context.
14:36:45.441 [INFO ] [del.core.internal.ModelRepositoryImpl] - Loading model 'garagedoor.rules'
14:36:46.177 [INFO ] [del.core.internal.ModelRepositoryImpl] - Loading model 'home.sitemap'
14:36:46.521 [INFO ] [del.core.internal.ModelRepositoryImpl] - Loading model 'home.things'
14:36:46.526 [WARN ] [del.core.internal.ModelRepositoryImpl] - Configuration model 'home.things' is either empty or cannot be parsed correctly!
14:36:46.601 [INFO ] [thome.event.ItemChannelLinkAddedEvent] - Link 'GarageAttached_Door_Position-zwave:device:3c4a2c62:node4:barrier_state' has been added.
14:36:46.604 [INFO ] [thome.event.ItemChannelLinkAddedEvent] - Link 'GarageAttached_Door-zwave:device:3c4a2c62:node4:barrier_state' has been added.
14:36:49.081 [INFO ] [openhab.io.transport.mqtt.MqttService] - MQTT Service initialization completed.
14:36:49.084 [INFO ] [rt.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection 'broker'
14:36:50.223 [INFO ] [.basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
14:36:50.769 [INFO ] [lassic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
14:36:50.916 [INFO ] [marthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
14:36:51.057 [INFO ] [.ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
14:36:51.208 [INFO ] [bpanel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
14:36:55.574 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node4' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
14:36:55.591 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node3' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
14:36:55.751 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:serial_zstick:3c4a2c62' changed from UNINITIALIZED to INITIALIZING
14:36:55.787 [INFO ] [ding.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0'
14:36:55.791 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:serial_zstick:3c4a2c62' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
14:36:55.875 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node3' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
14:36:55.883 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node4' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
14:36:55.899 [INFO ] [ding.zwave.handler.ZWaveSerialHandler] - Serial port is initialized
14:36:55.908 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node4' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
14:36:55.920 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node3' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
14:36:55.949 [INFO ] [ave.internal.protocol.ZWaveController] - Starting ZWave controller
14:36:55.951 [INFO ] [ave.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.
14:36:59.285 [INFO ] [sage.SerialApiGetInitDataMessageClass] - NODE 1: Node found
14:36:59.287 [INFO ] [sage.SerialApiGetInitDataMessageClass] - NODE 3: Node found
14:36:59.289 [INFO ] [sage.SerialApiGetInitDataMessageClass] - NODE 4: Node found
14:36:59.291 [INFO ] [sage.SerialApiGetInitDataMessageClass] - ZWave Controller using Controller API
14:36:59.293 [INFO ] [sage.SerialApiGetInitDataMessageClass] - ZWave Controller is Primary Controller
14:36:59.295 [INFO ] [sage.SerialApiGetInitDataMessageClass] - ------------Number of Nodes Found Registered to ZWave Controller------------
14:36:59.297 [INFO ] [sage.SerialApiGetInitDataMessageClass] - # Nodes = 3
14:36:59.298 [INFO ] [sage.SerialApiGetInitDataMessageClass] - ----------------------------------------------------------------------------
14:36:59.688 [WARN ] [ave.internal.protocol.ZWaveController] - NODE 3: Restore from config: Error. Data invalid, ignoring config.
14:37:02.996 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:serial_zstick:3c4a2c62' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to ONLINE
14:37:03.017 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node4' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to ONLINE
14:37:03.021 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node3' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to OFFLINE (COMMUNICATION_ERROR): Node is not communicating with controller
14:37:03.067 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'zwave:serial_zstick:3c4a2c62' has been updated.
14:37:03.069 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node4' changed from ONLINE to ONLINE: Node initialising: FAILED_CHECK
14:37:03.076 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node4' changed from ONLINE: Node initialising: FAILED_CHECK to OFFLINE (COMMUNICATION_ERROR): Node is not communicating with controller
14:39:53.067 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door' received command ON
14:39:53.172 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door changed from NULL to ON
14:39:53.741 [ERROR] [untime.internal.engine.RuleEngineImpl] - Rule 'Lock: Update garage door item states': The name 'gGarageDoor' cannot be resolved to an item or type; line 14, column 22, length 11
14:40:22.560 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door' received command OFF
14:40:22.578 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door changed from ON to OFF
14:40:22.582 [ERROR] [untime.internal.engine.RuleEngineImpl] - Rule 'Lock: Update garage door item states': The name 'gGarageDoor' cannot be resolved to an item or type; line 14, column 22, length 11
14:48:59.555 [WARN ] [sshd.server.session.ServerSessionImpl] - exceptionCaught(ServerSessionImpl[openhab@/127.0.0.1:46950])[state=Opened] InterruptedByTimeoutException: null
[14:49:00] openhabian@openHABianPi:~$

=======================================

// This is the Rules File

// Garage Door Rules from 5iver (Stott Rushworth) 03-29-2018:
// https://community.openhab.org/t/openhab2-and-linear-ngd00z-4-garage-door-controller/26154/52?u=5iver

// Rule

import org.eclipse.xtext.xbase.lib.Functions

val Functions$Function2<GenericItem, String, Boolean> barrierStateParser = [
    inputItem,
    inputItemState |
    
    val actionItem = gGarageDoor.members.findFirst[item | item.name == (if (inputItem.name.contains("_Position")) inputItem.name.replace("_Position","") else (inputItem.name + "_Position"))]
    logDebug("Rules", "Lock: Garage door events: Start: input item state [{}]=[{}], initial action item state [{}]=[{}]",inputItem.name,inputItemState,actionItem.name,actionItem.state.toString)
    switch (inputItemState) {
        case "255",//open
        case "254",//opening
        case "253",//stopped
        case "252" : {//closing
            if (actionItem.state != OFF) {
                actionItem.postUpdate(OFF)
                logDebug("Rules", "Lock: Garage door events: update switch after barrier_state change [{}]=OFF",actionItem.name)
            }
        }
        case "0" : {//closed
            if (actionItem.state != ON) {
                actionItem.postUpdate(ON)
                logDebug("Rules", "Lock: Garage door events: update switch after barrier_state change [{}]=ON",actionItem.name)
            }
        }
        case "ON" : {
            actionItem.sendCommand(0)
            logDebug("Rules", "Lock: Garage door events: update barrier_state after switch state change [{}]=0",actionItem.name)
        }
        case "OFF" : {
            actionItem.sendCommand(255)
            logDebug("Rules", "Lock: Garage door events: update barrier_state after switch state change [{}]=255",actionItem.name)
        }
    }
    true
]

rule "Lock: Update garage door item states"
when
    Item GarageAttached_Door received command
    or
    Item GarageDetached_Door received command
    or
    Item GarageAttached_Door_Position changed
    or
    Item GarageDetached_Door_Position changed
then
    barrierStateParser.apply(triggeringItem as GenericItem,(if (triggeringItem.name.contains("Position")) triggeringItem.state.toString else receivedCommand.toString))//,proxyItems.get(triggeringItem.name))
end


================================

// This is the Items File

// Demo items
Switch DEMOSW "Demo Switch"

// Garage Door from 5iver (Scott Rushworth)03-29-2018 :
// https://community.openhab.org/t/openhab2-and-linear-ngd00z-4-garage-door-controller/26154/52?u=5iver

// ITEMS
Switch	    GarageAttached_Door	            "Garage Door (Attached) [MAP(garagedoor.map):%s]"	        <garagedoor>	(gGarageAttached,gLock,gGarageDoor,gSleep_Security)      {channel="zwave:device:3c4a2c62:node4:barrier_state"}
Number	    GarageAttached_Door_Position	"Garage Door (Attached) [MAP(garagedoor.map):%s]"           <garagedoor>	(gGarageAttached,gGarageDoor,gSleep_Security)      {channel="zwave:device:3c4a2c62:node4:barrier_state"}



Can anyone see my problem?

Thanks
Marc

Do you have items for these groups? The lambda is looking for gGarageDoor and the error seems to point to the item not existing. Here is how I currenty have this setup… there was no need for the lambda so I removed it…

REQUIRES
MAP transformation service
OH 2.2 Release build (in order to make use of triggeringItem)
development version of zwave binding (for SECURITY CC)

ITEMS

Group     gGarageDoor                     "Garage Doors"                                                 <garagedoor>

Switch    GarageAttached_Door             "Garage Door (Attached) [MAP(garagedoor.map):%s]"              <garagedoor>    (gGarageDoor)
Number    GarageAttached_Door_Position    "Garage Door (Attached): Position [MAP(garagedoor.map):%s]"    <garagedoor>    (gGarageDoor)    {channel="zwave:device:55555:node55:barrier_state"}

Switch    GarageDetached_Door             "Garage Door (Detached) [MAP(garagedoor.map):%s]"              <garagedoor>    (gGarageDoor)
Number    GarageDetached_Door_Position	  "Garage Door (Detached): Position [MAP(garagedoor.map):%s]"    <garagedoor>    (gGarageDoor)    {channel="zwave:device:55555:node5:barrier_state"}

MAP

0=CLOSED
ON=CLOSED
252=CLOSING
253=STOPPED
254=OPENING
255=OPEN
OFF=OPEN
-=Unknown
NULL=Unknown

RULE

rule "Lock: Update garage door item states"
when
    Item GarageAttached_Door received command
    or
    Item GarageDetached_Door received command
    or
    Item GarageAttached_Door_Position changed
    or
    Item GarageDetached_Door_Position changed
then
    val String inputItemState = if (triggeringItem.name.contains("Position")) triggeringItem.state.toString else receivedCommand.toString
    val actionItem = gGarageDoor.members.findFirst[ item | item.name == (if (triggeringItem.name.contains("_Position")) triggeringItem.name.replace("_Position","") else (triggeringItem.name + "_Position")) ]
    logDebug("Rules", "Lock: Garage door events: Start: input item state [{}]=[{}], initial action item state [{}]=[{}]",triggeringItem.name,inputItemState,actionItem.name,actionItem.state.toString)
    switch (inputItemState) {
        case "255",//open
        case "254",//opening
        case "253",//stopped
        case "252" : {//closing
            if (actionItem.state != OFF) {
                actionItem.postUpdate(OFF)
                logDebug("Rules", "Lock: Garage door events: update switch after barrier_state change [{}]=OFF",actionItem.name)
            }
        }
        case "0" : {//OFF
            if (actionItem.state != ON) {
                actionItem.postUpdate(ON)
                logDebug("Rules", "Lock: Garage door events: update switch after barrier_state change [{}]=ON",actionItem.name)
            }
        }
        case "ON" : {
            actionItem.sendCommand(0)
            logDebug("Rules", "Lock: Garage door events: update barrier_state after switch state change [{}]=0",actionItem.name)
        }
        case "OFF" : {
            actionItem.sendCommand(255)
            logDebug("Rules", "Lock: Garage door events: update barrier_state after switch state change [{}]=255",actionItem.name)
        }
    }
end

Thanks again for you help Scott.

I think my log is looking pretty clean and I have the garage switch in my browser at my openHAB classic UI page that flips on and off with a status indicator that follows it.

I have the IRIS Garage Door Controller on the living room floor next to the Raspberry Pi. The door tilt sensor is still in the garage screwed onto the door. It seems odd that the status indicator on the openHAB classic UI page changes even though the garage door is not actually opening and closing. I only hope that it will give a true indication when things are worked out and the controller mounted in the garage.

I have an audible continuity tester attached to the leads on the IRIS Garage Door Controller and even though the logs look clear and the switch is moving in the browser UI page the contacts on the controller aren’t working yet.

Am I missing a step to bind the controller to the programming?

Thanks
Marc

Here are my logs and some of my files:

Log File:

openhab> log:tail
13:39:25.947 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door' received command ON
13:39:25.967 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door changed from NULL to ON
13:39:26.677 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door_Position' received command 0
13:39:26.704 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door_Position changed from NULL to 0
13:39:42.252 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door' received command OFF
13:39:42.265 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door changed from ON to OFF
13:39:42.311 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door_Position' received command 255
13:39:42.325 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door_Position changed from 0 to 255
13:48:47.541 [WARN ] [sshd.server.session.ServerSessionImpl] - exceptionCaught(ServerSessionImpl[openhab@/127.0.0.1:50926])[state=Opened] InterruptedByTimeoutException: null
14:14:21.782 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door' received command ON
14:14:21.815 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door changed from OFF to ON
14:14:21.855 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door_Position' received command 0
14:14:21.874 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door_Position changed from 255 to 0
14:14:31.255 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door' received command OFF
14:14:31.282 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door changed from ON to OFF
14:14:31.331 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door_Position' received command 255
14:14:31.351 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door_Position changed from 0 to 255
14:14:34.305 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door' received command ON
14:14:34.355 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door changed from OFF to ON
14:14:34.383 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door_Position' received command 0
14:14:34.397 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door_Position changed from 255 to 0
14:14:38.239 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door' received command OFF
14:14:38.262 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door changed from ON to OFF
14:14:38.304 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door_Position' received command 255
14:14:38.344 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door_Position changed from 0 to 255
14:16:24.904 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door' received command ON
14:16:24.940 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door changed from OFF to ON
14:16:24.974 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door_Position' received command 0
14:16:24.989 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door_Position changed from 255 to 0
14:16:31.299 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door' received command OFF
14:16:31.331 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door changed from ON to OFF
14:16:31.369 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door_Position' received command 255
14:16:31.404 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door_Position changed from 0 to 255
14:19:47.776 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door' received command ON
14:19:47.810 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door changed from OFF to ON
14:19:47.844 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door_Position' received command 0
14:19:47.883 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door_Position changed from 255 to 0
14:19:49.264 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door' received command OFF
14:19:49.291 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door changed from ON to OFF
14:19:49.334 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door_Position' received command 255
14:19:49.377 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door_Position changed from 0 to 255
14:19:53.181 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door' received command ON
14:19:53.214 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door changed from OFF to ON
14:19:53.241 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door_Position' received command 0
14:19:53.273 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door_Position changed from 255 to 0
14:20:26.679 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door' received command OFF
14:20:26.709 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door changed from ON to OFF
14:20:26.731 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door_Position' received command 255
14:20:26.756 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door_Position changed from 0 to 255
14:26:23.030 [WARN ] [sshd.server.session.ServerSessionImpl] - exceptionCaught(ServerSessionImpl[openhab@/127.0.0.1:50998])[state=Opened] InterruptedByTimeoutException: null
14:39:03.966 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door' received command ON
14:39:04.109 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door changed from OFF to ON
14:39:04.153 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door_Position' received command 0
14:39:04.183 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door_Position changed from 255 to 0
14:39:06.649 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door' received command OFF
14:39:06.701 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door changed from ON to OFF
14:39:06.756 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'GarageAttached_Door_Position' received command 255
14:39:06.786 [INFO ] [smarthome.event.ItemStateChangedEvent] - GarageAttached_Door_Position changed from 0 to 255

Item File:

// This is the Items File

// Demo items
Switch DEMOSW "Demo Switch"

// Garage Door from 5iver (Scott Rushworth)03-29-2018 :
// https://community.openhab.org/t/openhab2-and-linear-ngd00z-4-garage-door-controller/26154/52?u=5iver

// ITEMS

Group     gGarageDoor                     "Garage Doors"

Switch	    GarageAttached_Door	            "Garage Door (Attached) [MAP(garagedoor.map):%s]"	        <garagedoor>	(gGarageAttached,gLock,gGarageDoor,gSleep_Security)      
Number	    GarageAttached_Door_Position	"Garage Door (Attached) [MAP(garagedoor.map):%s]"           <garagedoor>	(gGarageAttached,gGarageDoor,gSleep_Security)      {channel="zwave:device:3c4a2c62:node4:barrier_state"}

Rules File:

// This is the Rules File

// Garage Door Rules from 5iver (Stott Rushworth) 03-29-2018:
// https://community.openhab.org/t/openhab2-and-linear-ngd00z-4-garage-door-controller/26154/52?u=5iver

// Rule

import org.eclipse.xtext.xbase.lib.Functions

val Functions$Function2<GenericItem, String, Boolean> barrierStateParser = [
    inputItem,
    inputItemState |
    
    val actionItem = gGarageDoor.members.findFirst[item | item.name == (if (inputItem.name.contains("_Position")) inputItem.name.replace("_Position","") else (inputItem.name + "_Position"))]
    logDebug("Rules", "Lock: Garage door events: Start: input item state [{}]=[{}], initial action item state [{}]=[{}]",inputItem.name,inputItemState,actionItem.name,actionItem.state.toString)
    switch (inputItemState) {
        case "255",//open
        case "254",//opening
        case "253",//stopped
        case "252" : {//closing
            if (actionItem.state != OFF) {
                actionItem.postUpdate(OFF)
                logDebug("Rules", "Lock: Garage door events: update switch after barrier_state change [{}]=OFF",actionItem.name)
            }
        }
        case "0" : {//closed
            if (actionItem.state != ON) {
                actionItem.postUpdate(ON)
                logDebug("Rules", "Lock: Garage door events: update switch after barrier_state change [{}]=ON",actionItem.name)
            }
        }
        case "ON" : {
            actionItem.sendCommand(0)
            logDebug("Rules", "Lock: Garage door events: update barrier_state after switch state change [{}]=0",actionItem.name)
        }
        case "OFF" : {
            actionItem.sendCommand(255)
            logDebug("Rules", "Lock: Garage door events: update barrier_state after switch state change [{}]=255",actionItem.name)
        }
    }
    true
]

rule "Lock: Update garage door item states"
when
    Item GarageAttached_Door received command
    or
    Item GarageDetached_Door received command
    or
    Item GarageAttached_Door_Position changed
    or
    Item GarageDetached_Door_Position changed
then
    barrierStateParser.apply(triggeringItem as GenericItem,(if (triggeringItem.name.contains("Position")) triggeringItem.state.toString else receivedCommand.toString))//,proxyItems.get(triggeringItem.name))
end

Sitemap Files:

sitemap home label="MK-SmartHouse"
{
    Frame label="Demo"
    {
        Switch item=DEMOSW
    }
    Frame label="Garage Door"
    {
        Switch item=GarageAttached_Door
        Text item=GarageAttached_Door_Position
    }

Transform Files:

// Garage Door Map 03-31-2018

0=CLOSED
ON=CLOSED
252=CLOSING
253=STOPPED
254=OPENING
255=OPEN
OFF=OPEN
-=Unknown
NULL=Unknown

Thanks again
Marc

That all is looking good, except you have the items in groups that probably do not exist. I’m not sure if it is affecting anything, but you’ll probably want to clean that up. You may also want to copy in my updated rule too. The GarageAttached_Door_Position item won’t show accurately until the opener and position sensor are mounted. The instructions talk about calibrating the position sensor when it is first installed. If it is securely included, I suggest mounting it. I think I remember bench testing one, and it would short the leads when initiating an open/close, but I could be confused with another device.

Do you mean the:

Frame label="Demo"
    {
        Switch item=DEMOSW
    }

in my sitemap file?

And the:

Switch DEMOSW "Demo Switch"

in my items file?

I can comment these out.

Can you tell me where I can find this?

===============================

Also, I am wondering if the names or the various files cold be causing me problems.
I have them as:
garagedoor.rules
home.sitemap
garagedoor.sitemap
garagedoor.items
garagedoor.map

Thanks again.
Marc

4 post up

Nope… your items are in these groups gLock,gGarageDoor,gSleep_Security, which are groups I use. My updated post may help… I cleared out some extraneous stuff.

The files can be named whatever you choose.