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