Can't connect IRIS Garage Door Controller to openHABianpi

Well, I went to Habmin >Configuration> Things> Z-Wave Serial Controler> Tools (over on the top right)> Advanced Options> Exclude

Then I think I re included it or something. Reset the Garage door thing, pressed the magnifying glass, pressed the button on the garage door thing again. I got a notification of a new device and I added it.

But I still don’t see anything in PaperUI>Control

I feel thoroughly lost again.

Lost

Nope. After copying a binding jar to the addons folder, OH will install it and start it up.

Did you then press the button once on the garage door? Basically, the same procedure as inclusion. After exclusion, the garage door will do a harsh sounding beep.

That doesn’t sound good. :roll_eyes:

If the node numbers of the devices are the same, then you didn’t exclude/include properly. How does this line up with what you have been doing?

Inclusion cycle for secure devices (starting from brand-new OOTB state):

  1. Start zwave inclusion through OH, with device as close as possible to the controller. The SECURITY Command Class requires this. I’ve had success <10ft.

  2. Once inclusion has started, the default setting is for it to run for 30s. During this time, you need to press the button on the opener. I will usually monitor my logs, grepping on the next available nodes so that I see when the node was added and any issues during initialization. I have my zwave log separated out, so you will likely need to change to the openhab.log. Here is an example where I am expecting the next node to be 121. I usually give it a range of available nodes though, in case it takes a few tries.

     tail -F -n3000 /opt/openhab2/userdata/logs/zwave/zwave.log | egrep "NODE 12[1-9]:"
    
  3. When the device has been successfully included, it will beep three times. You should now see a new Thing in the Inbox. Add the Thing from the Inbox.

  4. In Habmin> Configuration> Things> newly added Thing> Attributes> Using Security, if this is a grey question mark, then wait. If it is a red X, then continue (it was not securely included). If it was a green check mark, you are done.

  5. In Habmin> Configuration> Things> your controller> Tools (top right)> Show Advanced Settings> Tools> Exclude Devices. Same as Inclusion, you now need to press the button on the device to let the controller know which device to exclude. The opener will beep three times and then a long harsh sounding beep.

  6. Some devices also need a reset at this point. You can reset the device by pushing the button five times.

  7. Delete the old Thing from OH. Exclusion will remove the device from the zwave network, but it won’t remove it from OH.

  8. Go to step 1.

I’m not sure what this means. Same as what? Beside the Z-Wave serial contoller there were 3 nodes od different numbers.

Anyways, I tried again.

  1. I excluded through the Z-Wave Controller. Then went to the garage door device and presses the button. I think I got a short then a long beep. Note: Up until this point I had been looking to exclude each device through their own nodes. I didn’t think you would issue an exclude command from the Z-Wave controller it’s self.
  2. I forgot to to reset the garage door device by pressing the button 5 times. Oops
  3. I deleted the 3 devices listed under HABmin>Configuration>Things. Because I was thinking that these are all copies of the same device or something since I have only one device besides the Z-Wave Serial Controller.
  4. I Pressed the magnifying glass search thing then pessed the button on the garage door thing and got tome beeps.
  5. Got 3 new discovered things and added them.
  6. Looked In Habmin> Configuration> Things> newly added Thing> Attributes> Using Security to see if thing look right. New nodes 006 and 004 look good but new node 003 still has security x-ed out.

So am I looking good yet? Or should I do it again and this time remember to press the garage door device button 5 times to rest the device?

Also I still don’t see anything in the PaperUI>Control section.

I’m going off to work now. I’ll be back kind of late.

Thanks Scott

Marc

Screen Shots attached:

When assigning node IDs, the zstick (all controllers?) will find the next available node id that is not in use on the network. At 232, it starts back at 1. After a discovery and adding the devices from the Inbox, you should see a node with a new node ID. If the node IDs of your devices didn’t change, then no new node was added. When a device is successfully excluded, it will show in red (Habmin). Delete the Thing so that it does not display any more. If you reset the device without excluding it first, it will still show up in OH because when the binding queries the controller for devices, it will still be reported. Habmin has the option to remove a device from the controller, but I haven’t used it. It looks like Node 6 is your garage door opener, and it was securely included, so you should be good now. Cleaning up the old devices may be a pain, so let’s leave that for now.

That is displaying Items. You will need to create Items that link to the channels available from the garage opener Thing. You can create them through PaperUI, Habmin, or an items file.

Here is an example of the items and rule that I have setup…

Thanks Scott, I read the “Items” page in the documentation page you linked to. Is there a walk through that I can refer to to get this done? Should I go with PaperUI, HABmin or nano text bases stuff?

Also if the extra nodes showing in my Things section from not properly excluding devices is going to be a problem maybe it would be easier to format the OS again now that I have a better understanding on including devices?

Thanks
Marc

The documentation looks to be complete on this, but creating items is second nature to me at this point! What information do you need? I personally use item files, since I was familiar with them from OH1. The thread I linked to has examples of my items, so you can just copy them into a text file that uses Unix EOLs and save it to the right location. OH will immediately pick up the new items, but I prefer to have OH shutdown when saving items files to avoid issues.

No, there’s no need to format the OS or to reinstall OH, because that would still not remove the ghost nodes. The easiest way would be to exclude the devices and then reset the zstick (turn off OH, unplug the zstick, hold the button for 20s). Another option is to use Zensys Tools, which Aeon Labs looks to have stripped down as their OTA firmware installer app.

It is also distributed with the InControl software by Axial, but they have a link to download it too.

Using Zensys Tools, you’d send a NOP to the dead node (you have to type the nodeID into the text box). This should fail, but sometimes it takes more than once. Select the dead node. Click the IsFailed button to check it. This will mark the node as failed. Then you can click the Remove Failed Node button. It sounds daunting, but is a good thing to learn for maintaining the network in the future. The worst thing that could happen to you at this point is that you’d have to do a reset. Better to learn how to do it now than when you have more devices on the network. There may be some more detailed write-ups on the forum.

Thanks Scott,
About that LAMBDA File:
OpenHab2 and Linear NGD00Z-4 Garage Door Controller

  1. where does the “MAP” File go?:
    0=CLOSED
    ON=CLOSED
    252=CLOSING
    253=STOPPED
    254=OPENING
    255=OPEN
    OFF=OPEN
    -=Unknown
    NULL=Unknown

I put the “ITEMS” in /etc/openhab2/items/home.items

and the LAMBDA in /etc/openhab2/rules/home.rules

I made a sitemaps file:
/etc/openhab2/sitemaps/home.sitemaps

sitemap home label="MK-SmartHouse"
{
    Frame label="Demo"
    {
        Switch item=DEMOSW
    }
    Frame label=“Garage Door”
    {
        Switch item=Garage_Door
        Text item=Garage_Door_Position
    }
}

But where does the “MAP” File go?

  1. Also on the “ITEMS” File:
    You have:
{channel="zwave:device:55555:node177:barrier_state"}

Do I need to change the node number to match my device node number from HABmin? Which is 004.
And does the zwave:device:55555 stay the same?

Thanks
Marc

I use Habmin for almost everything, but you can also use PaperUI for this. Go to Habmin> Extensions> Transformations and install the Map transformation service. Then put the file in /etc/openhab2/transform. https://docs.openhab.org/configuration/transform.html

This next part is the only time I prefer PaperUI, but it can be done in Habmin too. Go to PaparUI> Configuration> Things> your garage door opener. Under Channels, you will see the channel UIDs that you need to use in the items file to link the item to the channel. There’s a control to Copy to Clipboard. Copy it and paste this into your item’s binding configuration in the items file.

Sitemaps are a pain… and ugly. Check out Habpanel.

Thanks again Scott,
I haven’t had a chance do do your recent suggestions yet but I have been trying to figure out how to shut down openHAB when it’s running inside Linux. I installed it from the openhabianpi distro.

I’m not sure if it’s a service or a process and I’m not sure how to tell or what to do when I find out.

I read your recommendation to turn off openHAB when doing major changes and that sounds like sound advice if I knew how.

Thanks
Marc

I’ve never used openHabian, but if you ssh into a Karaf console, system:shutdown has worked for me in docker.

systemctl stop openhab2

1 Like

Does anyone know what could be causing this?
Sorry to be so brief. I just have been very busy and have been squeezing in what little time I have to troubleshoot this.
I will get some screen shots, file contents and locations in the next couple of days. I’ve just been reading a lot in these threads:
https://community.openhab.org/t/openhab2-and-linear-ngd00z-4-garage-door-controller/26154/19


Thanks again
marc

OK, whenever I try to go into the the Classic UI interface I get this error in the openhab-cli console:

openhab> log:tail
04:48:38.788 [WARN ] [ig.dispatch.internal.ConfigDispatcher] - Could not parse line 'Define your MQTT broker connections here for use in the MQTT Binding or MQTT'
04:48:40.599 [INFO ] [i.dashboard.internal.DashboardService] - Started dashboard at http://192.168.0.12:8080
04:48:40.605 [INFO ] [i.dashboard.internal.DashboardService] - Started dashboard at https://192.168.0.12:8443
04:48:43.861 [INFO ] [.io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = 4a44c372-3ca2-4348-a2b6-42fd2d2deccf, base URL = http://localhost:8080)
04:48:48.426 [INFO ] [del.core.internal.ModelRepositoryImpl] - Loading model 'garagedoor.items'
04:48:55.021 [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.
04:48:55.031 [INFO ] [del.core.internal.ModelRepositoryImpl] - Loading model 'garagedoor.rules'
04:48:55.358 [INFO ] [rthome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
04:48:55.962 [WARN ] [del.core.internal.ModelRepositoryImpl] - Configuration model 'home.sitemap' has errors, therefore ignoring it: [7,17]: no viable alternative at input '“'

04:48:56.301 [INFO ] [del.core.internal.ModelRepositoryImpl] - Loading model 'home.things'
04:48:56.306 [WARN ] [del.core.internal.ModelRepositoryImpl] - Configuration model 'home.things' is either empty or cannot be parsed correctly!
04:48:56.399 [INFO ] [thome.event.ItemChannelLinkAddedEvent] - Link 'GarageAttached_Door_Position-zwave:device:3c4a2c62:node4:barrier_state' has been added.
04:48:59.606 [INFO ] [openhab.io.transport.mqtt.MqttService] - MQTT Service initialization completed.
04:48:59.609 [INFO ] [rt.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection 'broker'
04:49:00.618 [INFO ] [.basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
04:49:01.150 [INFO ] [lassic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
04:49:01.276 [INFO ] [marthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
04:49:01.430 [INFO ] [.ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
04:49:01.628 [INFO ] [bpanel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
04:49:05.411 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node4' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
04:49:05.418 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node3' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
04:49:05.599 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:serial_zstick:3c4a2c62' changed from UNINITIALIZED to INITIALIZING
04:49:05.641 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:serial_zstick:3c4a2c62' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
04:49:05.646 [INFO ] [ding.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0'
04:49:05.810 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node3' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
04:49:05.815 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node4' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
04:49:05.831 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node3' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
04:49:05.849 [INFO ] [ding.zwave.handler.ZWaveSerialHandler] - Serial port is initialized
04:49:05.852 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node4' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
04:49:05.889 [INFO ] [ave.internal.protocol.ZWaveController] - Starting ZWave controller
04:49:05.891 [INFO ] [ave.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.
04:49:09.222 [INFO ] [sage.SerialApiGetInitDataMessageClass] - NODE 1: Node found
04:49:09.226 [INFO ] [sage.SerialApiGetInitDataMessageClass] - NODE 3: Node found
04:49:09.228 [INFO ] [sage.SerialApiGetInitDataMessageClass] - NODE 4: Node found
04:49:09.231 [INFO ] [sage.SerialApiGetInitDataMessageClass] - ZWave Controller using Controller API
04:49:09.233 [INFO ] [sage.SerialApiGetInitDataMessageClass] - ZWave Controller is Primary Controller
04:49:09.236 [INFO ] [sage.SerialApiGetInitDataMessageClass] - ------------Number of Nodes Found Registered to ZWave Controller------------
04:49:09.238 [INFO ] [sage.SerialApiGetInitDataMessageClass] - # Nodes = 3
04:49:09.241 [INFO ] [sage.SerialApiGetInitDataMessageClass] - ----------------------------------------------------------------------------
04:49:09.650 [WARN ] [ave.internal.protocol.ZWaveController] - NODE 3: Restore from config: Error. Data invalid, ignoring config.
04:49:12.903 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:serial_zstick:3c4a2c62' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to ONLINE
04:49:12.912 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node4' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to ONLINE
04:49:12.918 [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
04:49:12.953 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'zwave:serial_zstick:3c4a2c62' has been updated.
04:49:12.958 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'zwave:device:3c4a2c62:node4' changed from ONLINE to ONLINE: Node initialising: FAILED_CHECK
04:49:12.968 [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
04:53:43.588 [WARN ] [.eclipse.jetty.servlet.ServletHandler] -
javax.servlet.ServletException: Sitemap 'home' could not be found
        at org.eclipse.smarthome.ui.classic.internal.servlet.WebAppServlet.service(WebAppServlet.java:176) [219:org.eclipse.smarthome.ui.classic:0.10.0.b1]
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848) [88:org.eclipse.jetty.servlet:9.3.22.v20171030]
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) [88:org.eclipse.jetty.servlet:9.3.22.v20171030]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [191:org.ops4j.pax.web.pax-web-jetty:6.0.7]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [87:org.eclipse.jetty.server:9.3.22.v20171030]
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [85:org.eclipse.jetty.security:9.3.22.v20171030]
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [87:org.eclipse.jetty.server:9.3.22.v20171030]
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [87:org.eclipse.jetty.server:9.3.22.v20171030]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) [191:org.ops4j.pax.web.pax-web-jetty:6.0.7]
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) [88:org.eclipse.jetty.servlet:9.3.22.v20171030]
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [87:org.eclipse.jetty.server:9.3.22.v20171030]
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [87:org.eclipse.jetty.server:9.3.22.v20171030]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [87:org.eclipse.jetty.server:9.3.22.v20171030]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [191:org.ops4j.pax.web.pax-web-jetty:6.0.7]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [87:org.eclipse.jetty.server:9.3.22.v20171030]
        at org.eclipse.jetty.server.Server.handle(Server.java:534) [87:org.eclipse.jetty.server:9.3.22.v20171030]
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333) [87:org.eclipse.jetty.server:9.3.22.v20171030]
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [87:org.eclipse.jetty.server:9.3.22.v20171030]
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) [79:org.eclipse.jetty.io:9.3.22.v20171030]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108) [79:org.eclipse.jetty.io:9.3.22.v20171030]
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [79:org.eclipse.jetty.io:9.3.22.v20171030]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [90:org.eclipse.jetty.util:9.3.22.v20171030]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [90:org.eclipse.jetty.util:9.3.22.v20171030]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [90:org.eclipse.jetty.util:9.3.22.v20171030]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [90:org.eclipse.jetty.util:9.3.22.v20171030]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [90:org.eclipse.jetty.util:9.3.22.v20171030]
        at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: org.eclipse.smarthome.ui.classic.render.RenderException: Sitemap 'home' could not be found
        at org.eclipse.smarthome.ui.classic.internal.servlet.WebAppServlet.service(WebAppServlet.java:137) ~[219:org.eclipse.smarthome.ui.classic:0.10.0.b1]
        ... 26 more


Here are the contents of my /etc/openhab2/sitemaps/home.sitemap File:

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


Screenshot of ls -l in /sitemaps:

screenshot of ls -l /items:

Here is the contents of /etc/openhab2/items/garagedoor.items:

// 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$
Number      GarageAttached_Door_Position        "Garage Door (Attached) [MAP(garagedoor.map):%s]"           <garagedoor>        (gGarageAttach$



screenshot of ls -l /rules:

File contents of /etc/openhab2/rules/garagedoor.rules:


[05:21:29] openhabian@openHABianPi:/etc/openhab2/rules$ sudo nano garagedoor.rules
  GNU nano 2.2.6                                 File: garagedoor.rules

                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 r$
end


Screenshot of /etc/openhab2/transform:

File contents of /etc/openhab2/transform/garagedoor.map:

// Garage Door Map 03-31-2018

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

Also I’m using nano from Windows through a putty terminal into a openHABianpi install. Do I need to install the syntax file and installation instructions on openhabnano from:
https://docs.openhab.org/configuration/editors.html#mcedit
To get the proper file formatting? Or is it already installed with openHABianpi?

Thanks again
Marc

I strongly suggest using VS Code with the openHAB extension, which is the official editor. I’m not familiar with mcedit.

I think your sitemap issue might be caused by smart quotes (if you look at what you pasted in your post, the double quotes in line 7 look slightly different that in line 1 and 3). Retype the quotes on line 7. The validation warning addresses this line too. The permissions on your files also look odd, unless your running OH as root.

Thanks Scott,
That was very helpful. I can see buttons now but I still have some things to work out.

I see what you mean about using VS Code over Nano or VI. It will warn me when my scripting is wrong.

So this is only for Windows right? So once I install VS Code on my Windows machine how do I access my files on my Raspberry Pi? Do I terminal remotely through VS Code or use Samba to host the files locally on my Windows box or something else?

And I see what you mean about owner and permissions for those files. The tutorial I was following told me to “sudo nano” to create the files. I can easily change them to openhab openhabian if that makes a difference.

It will be a few days before I have time to sit down and work these things out.

Thanks again
Marc

No, there is a version that runs on Linux and another that runs on Mac. It is open source, not an MS product, though MS is the first and probably primary contributor.

If you used openHABian you will already have a samba share set up. Just mount the network drive to Windows and point VSCode to that folder. If you didn’t, you will need to install and configure samba on the OH server to share the /etc/openhab2 folder. Then you can mount that shared folder to Windows.

Alternative approaches include winscp to copy those files bac and fort, git or some other configuration control service to commit and checkout changes, and more. But the samba share is the most commonly used.

I’m sure it will. OH expectes openhab to be the owners of those files.

1 Like

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.