[SOLVED] GoControl NGD00Z-4 Garage Door Controller Configuration

You need to READ the links provided, please:

The barrier_state channel should be linked to a Number Item

Yes, thank you. I did read what was provided. The barrier_state channel is linked to a Number Item. LATER in the post, which i read, it says to create an ADDITIONAL item. This specifically appears to be where the limits of my understanding occur, because I am not able to add additional items other than Number type items. I do sincerely apologies if this is confusing. I have been frustrated for a day now trying to cobble together data from several different places to get this to work, which is why as I stated early I’d like to create a COMPLETE guide on how to get this device working because a lot of the data appears to be spread out and in pieces. Something that is also mentioned in the thread that you linked to.

That means to create a Number item for that channel and then create a virtual Switch item which is set to ON/OFF through the itemstate of that Number item in a rule.

1 Like

I created a new Switch Item in PaperUI’s Items menu that I will use for the garage door switch. I understand that I need to create a Rule to update that switch’s state based on the barrier state’s numerical value. However, when I go to create a rule to do just that, even though the Barrier State item is a numerical type the only options I get are boolean (on/off, open/close, up/down) not numerical. Any advice?

1 Like

Yes, again, read the link (and the next link in that link):

Thanks, I’ve read that too. Is that in a configuration file somewhere that I need manually update? Is this something that it is not possible to do through PaperUI? That is fine if I can’t. I’m not scared of some terminal time. I just don’t know what to do. Telling me what values to set doesn’t really help if I do not know where to set them or how and that is not explained in the link or the link within the link. I realize that this is probably like a super newb problem that I’m having and I am sorry. If there are more links to things that would explain to me at a more fundamental level what it is that I can do I’d be happy to read those as well and any links within those links.

1 Like

I think, reading quickly, you need to create a Number item linked to the thing and also a virtual Switch. You then use rules to update the Switch when the Number item changes.

Thanks Bruce. I agree that seems like it is what I need to do. How to do it is beyond me. I’m trying to RTM as I have been told to do several times but there is a gap somewhere that I’m not able to cross.

1 Like

I’ve got the Number Item and it is linked to the the Barrier State channel on the Thing. And I have create a switch Item that I intend to use to control the door. How I “use rules to update the Switch when the Number item changes” is one issue. Also from the links that @sihui provided it appears that I need to somehow map these numerical values (0, 255, etc) to positional values (open, closed, etc.) and that I don’t know how to do either.

1 Like

i have created all my rules using text files like in the example. The new way of creating rules in the PaperUI is not yet fully developed and stable.
Let me look at this further when I get home in a few hours and see if I can come up with a better example for you.

OK thank you! I’ve only created rules through the PaperUI. I wasn’t aware I could create rules through a text file. That would be much appreciated!

Welcome to the forum!

I plan to consolidate the instructions for barrier_state devices and door locks into tutorials.

Which version of OH are you using? If 2.5M2, I’ll post my Jython version of the rule (you’ll need the helper libraries), which can be used in a UI rule. It sounds to me like you need to read up on the basics of OH, specifically rules and transformation services.

There is also a very simple solution with no rules, but it has less functionality…

I’m up the latest stable version. I believe 2.4.0_1. Some tutorials would be great!

I will leave you in the more capable hands of @5iver :smiley:

1 Like

That won’t happen anytime soon, but it’s on my list! I’ll help you to get this going though. Are you OK with the simple version using a sitemap and no rules?

@Derekj welcome to OH!

It sounds like you’re getting tripped up on the item creation. Is that right? Here’s a simplified walkthrough to complete that phase. The instructions below avoid using PaperUI and just rely on the older text-based configuration. These instructions also assume you are using the method 5iver has created in his post here: OpenHab2 and Linear NGD00Z-4 Garage Door Controller

  • In your openhab/conf/items folder, create a text file and name it whatever you like. It must have a suffix of *.items. I’ll suggest garage.items for this example.
  • In your garage.items file, create the items as shown in the example from 5iver.
  • Remember to change the channel of your item to match your own setup (so change the 55555 and node id)


Group    gGarageDoorOpener    "Garge Door Openers"    <garagedoor>
Switch    GarageAttached_Door    "Garage Door (Attached) [MAP(garagedoor.map):%s]"    <garagedoor>    (gGarageDoorOpener)
Number    GarageAttached_Door_Position    "Garage Door (Attached) [MAP(garagedoor.map):%s]"    <garagedoor>    (gGarageDoorOpener)    {channel="zwave:device:55555:node5:barrier_state"}
  • Next, expose these items in your UI by putting them in a sitemap, so it might look something like this. If you’re not already using sitemaps, they are saved in openhabroot/conf/sitemaps


	Switch item=GarageAttached_Door label="Garage Door"
	Text item=GarageAttached_Door_Position
  • Create the following *.map file in openhabroot/conf/transform. File name MUST be garagedoor.map (to match the mapping reference in your items file above).


  • Lastly, create the rules by going to the openhabroot/conf/rules folder. Inside, create a filename ending in *.rules. Let’s use garage.rules
// put this import at the top of your rule file
import org.eclipse.smarthome.model.script.ScriptServiceUtil

rule "Update garage door state"
    Member of gGarageDoorOpener received update
    val actionItem = ScriptServiceUtil.getItemRegistry.getItem(if (triggeringItem.name.contains("_Position")) triggeringItem.name.replace("_Position","") else (triggeringItem.name + "_Position"))
    logDebug("Rules", "Garage door event: [{}] was updated to {} ({}): action item [{}], current state {} ({})", triggeringItem.name, triggeringItem.state, transform("MAP", "garagedoor.map", triggeringItem.state.toString), actionItem.name, actionItem.state, transform("MAP", "garagedoor.map", actionItem.state.toString))
    switch (triggeringItem.state.toString) {
        case "255",//open
        case "254",//opening
        case "253",//stopped
        case "252" : {//closing
            if (actionItem.state != OFF) {
                logDebug("Rules", "Garage door event: updated switch [{}] to OFF (OPEN) after barrier_state update", actionItem.name)
        case "0" : {//closed
            if (actionItem.state != ON) {
                logDebug("Rules", "Garage door event: updated switch [{}] to ON (CLOSED) after barrier_state update", actionItem.name)
        case "ON" : {
            if (actionItem.state != 0) {
                logDebug("Rules", "Garage door event: updated barrier_state [{}] to 0 (CLOSED) after switch state update", actionItem.name)
        case "OFF" : {
            if (actionItem.state != 255) {
                logDebug("Rules", "Garage door event: updated barrier_state [{}] to 255 (OPEN) after switch state update", actionItem.name)

The item names are just based on the example from 5iver. I suggest using the exact same item names to start, but once you get it going and start understanding how everything relates, you can change the item names to whatever you want.

1 Like

@roy_liao Thank you! Thank you!

I got those files created as you mentioned. And I see some of them in PaperUI now including the switch item that was created. Now how would I control the switch because in PaperUI now there isn’t a way to me to operate the switch?

The PaperUI is designed mainly for configuration. The BasicU can be better used for controlling after you setup one or more sitemaps.

Right. BasicUI is the easiest way to start. Once you create items, you have lots of different choices for controlling them.

Creating a sitemap file and opening BasicUI is probably the most straightforward starting point.

Thank you everyone for your help with this. I just wanted to follow up and say that I’ve returned this garage opener controller because I wasn’t able to get it to work with openhab. I really do appreciate everyone’s help even if this project wound up being a failure.

1 Like