Hi
Need some guidance and advices here guys.
Running Openhabian 1.4 with openhab v2.2.0 on a RPi3 with a Razberry2 Z-wave serial card
Have installed the experimental Z-Wave Binding and finally got this to work with my Z-wave nodes including my DanaLockv3 doorlock
Im no expert on writing scripts and code so i decided to test out the Experimental Rule Engine. This works great with my Philips Hue lights and ive also managed to control my doorlock with a rule made with the Rule Engine.
{
"884f11e6-8c0a-42ad-b837-5f409a151598": {
"class": "org.eclipse.smarthome.automation.Rule",
"value": {
"triggers": [
{
"id": "1",
"label": "it is a fixed time of day",
"description": "Triggers at a specified time",
"configuration": {
"properties": {
"time": "06:55"
}
},
"type": "timer.TimeOfDayTrigger"
}
],
"conditions": [
{
"id": "3",
"label": "an item has a given state",
"description": "Compares the item state with the given value",
"configuration": {
"properties": {
"itemName": "Node6_DoorLock",
"operator": "\u003d",
"state": "OFF"
}
},
"type": "core.ItemStateCondition"
}
],
"actions": [
{
"id": "2",
"label": "send a command",
"description": "Sends a command to a specified item.",
"configuration": {
"properties": {
"itemName": "Node6_DoorLock",
"command": "ON"
}
},
"type": "core.ItemCommandAction"
}
],
"configuration": {
"properties": {}
},
"configDescriptions": [],
"uid": "884f11e6-8c0a-42ad-b837-5f409a151598",
"name": "DanaLockRule",
"tags": [],
"visibility": "VISIBLE",
"description": "LockFrontDoor"
}
}
}
This worked like a charm. All until i rebooted the RPiā¦
Now my āDanaLockRuleā show up as UNINITILIZED in the PaperUI. If i disable and then enable the rule it goes into IDLE mode and gets executed at the specified time.
Here is part of the event.log after reboot:
2017-12-25 07:44:19.441 [.ItemChannelLinkAddedEvent] - Link 'Node6_DoorLock-zwave:device:7fb42261:node6:lock_door' has been added.
2017-12-25 07:44:19.443 [.ItemChannelLinkAddedEvent] - Link 'Lysfarge_Trapp-hue:0210:00178869615d:3:color' has been added.
2017-12-25 07:44:19.444 [.ItemChannelLinkAddedEvent] - Link 'Lysfarge_Trapp-hue:0210:00178869615d:2:color' has been added.
2017-12-25 07:44:19.446 [.ItemChannelLinkAddedEvent] - Link 'MaximusPC1000120_Online-network:pingdevice:10_0_0_120:online' has been added.
2017-12-25 07:44:19.704 [hingStatusInfoChangedEvent] - 'network:pingdevice:10_0_0_120' changed from UNINITIALIZED to INITIALIZING
2017-12-25 07:44:19.871 [hingStatusInfoChangedEvent] - 'network:pingdevice:10_0_0_120' changed from INITIALIZING to ONLINE
2017-12-25 07:44:19.963 [me.event.ThingUpdatedEvent] - Thing 'network:pingdevice:10_0_0_120' has been updated.
2017-12-25 07:44:19.970 [hingStatusInfoChangedEvent] - 'network:pingdevice:10_0_0_50' changed from UNINITIALIZED to INITIALIZING
2017-12-25 07:44:20.027 [hingStatusInfoChangedEvent] - 'network:pingdevice:10_0_0_50' changed from INITIALIZING to ONLINE
2017-12-25 07:44:20.164 [me.event.ThingUpdatedEvent] - Thing 'network:pingdevice:10_0_0_50' has been updated.
2017-12-25 07:44:20.180 [hingStatusInfoChangedEvent] - 'network:pingdevice:10_0_0_110' changed from UNINITIALIZED to INITIALIZING
2017-12-25 07:44:20.201 [me.event.ThingUpdatedEvent] - Thing 'network:pingdevice:10_0_0_120' has been updated.
2017-12-25 07:44:20.257 [hingStatusInfoChangedEvent] - 'network:pingdevice:10_0_0_110' changed from INITIALIZING to ONLINE
2017-12-25 07:44:20.308 [me.event.ThingUpdatedEvent] - Thing 'network:pingdevice:10_0_0_110' has been updated.
2017-12-25 07:44:20.340 [hingStatusInfoChangedEvent] - 'network:pingdevice:10_0_0_138' changed from UNINITIALIZED to INITIALIZING
2017-12-25 07:44:20.356 [me.event.ThingUpdatedEvent] - Thing 'network:pingdevice:10_0_0_110' has been updated.
2017-12-25 07:44:20.390 [hingStatusInfoChangedEvent] - 'network:pingdevice:10_0_0_138' changed from INITIALIZING to ONLINE
2017-12-25 07:44:20.450 [me.event.ThingUpdatedEvent] - Thing 'network:pingdevice:10_0_0_138' has been updated.
2017-12-25 07:44:20.481 [me.event.ThingUpdatedEvent] - Thing 'network:pingdevice:10_0_0_138' has been updated.
2017-12-25 07:44:20.638 [vent.ItemStateChangedEvent] - SamsungXcover41000110_Online changed from NULL to ON
2017-12-25 07:44:20.641 [vent.ItemStateChangedEvent] - SamsungXcover41000110_LatencyMs changed from NULL to 30.0
2017-12-25 07:44:20.644 [vent.ItemStateChangedEvent] - SamsungXcover41000110_LastSeen changed from NULL to 2017-12-25T07:44:20.281+0100
2017-12-25 07:44:20.648 [vent.ItemStateChangedEvent] - MaximusPC1000120_Online changed from NULL to ON
2017-12-25 07:44:22.628 [me.event.ThingUpdatedEvent] - Thing 'network:pingdevice:10_0_0_50' has been updated.
2017-12-25 07:44:25.309 [thome.event.RuleAddedEvent] - Rule '884f11e6-8c0a-42ad-b837-5f409a151598' has been added.
2017-12-25 07:44:25.326 [.event.RuleStatusInfoEvent] - 884f11e6-8c0a-42ad-b837-5f409a151598 updated: INITIALIZING
2017-12-25 07:44:25.334 [.event.RuleStatusInfoEvent] - 884f11e6-8c0a-42ad-b837-5f409a151598 updated: UNINITIALIZED (CONFIGURATION_ERROR): Validation of rule 884f11e6-8c0a-42ad-b837-5f409a151598 has failed! Condition Type "core.ItemStateCondition" does not exist!
2017-12-25 07:44:25.947 [.event.RuleStatusInfoEvent] - 884f11e6-8c0a-42ad-b837-5f409a151598 updated: INITIALIZING
2017-12-25 07:44:25.962 [.event.RuleStatusInfoEvent] - 884f11e6-8c0a-42ad-b837-5f409a151598 updated: UNINITIALIZED (CONFIGURATION_ERROR): Validation of rule 884f11e6-8c0a-42ad-b837-5f409a151598 has failed! Condition Type "core.ItemStateCondition" does not exist!
2017-12-25 07:44:26.815 [vent.ItemStateChangedEvent] - Node6_DoorLock changed from NULL to ON
2017-12-25 07:44:27.152 [hingStatusInfoChangedEvent] - 'hue:bridge:00178869615d' changed from UNINITIALIZED to INITIALIZING
2017-12-25 07:44:27.211 [hingStatusInfoChangedEvent] - 'hue:0210:00178869615d:3' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2017-12-25 07:44:27.244 [hingStatusInfoChangedEvent] - 'hue:0210:00178869615d:2' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2017-12-25 07:44:27.248 [hingStatusInfoChangedEvent] - 'hue:0210:00178869615d:1' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2017-12-25 07:44:27.250 [hingStatusInfoChangedEvent] - 'hue:0210:00178869615d:4' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2017-12-25 07:44:30.668 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:7fb42261' changed from UNINITIALIZED to INITIALIZING
2017-12-25 07:44:30.722 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:7fb42261' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
2017-12-25 07:44:30.792 [hingStatusInfoChangedEvent] - 'zwave:device:7fb42261:node3' changed from UNINITIALIZED to INITIALIZING
2017-12-25 07:44:30.825 [hingStatusInfoChangedEvent] - 'zwave:device:7fb42261:node3' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
2017-12-25 07:44:30.853 [hingStatusInfoChangedEvent] - 'zwave:device:7fb42261:node6' changed from UNINITIALIZED to INITIALIZING
2017-12-25 07:44:30.855 [hingStatusInfoChangedEvent] - 'zwave:device:7fb42261:node6' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
2017-12-25 07:44:37.798 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:7fb42261' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to ONLINE
2017-12-25 07:44:37.803 [hingStatusInfoChangedEvent] - 'zwave:device:7fb42261:node3' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to ONLINE
2017-12-25 07:44:37.809 [hingStatusInfoChangedEvent] - 'zwave:device:7fb42261:node6' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to ONLINE
2017-12-25 07:44:37.857 [hingStatusInfoChangedEvent] - 'zwave:device:7fb42261:node6' changed from ONLINE to ONLINE: Node initialising: INIT_NEIGHBORS
2017-12-25 07:44:37.917 [hingStatusInfoChangedEvent] - 'zwave:device:7fb42261:node3' changed from ONLINE to ONLINE: Node initialising: INIT_NEIGHBORS
2017-12-25 07:44:37.979 [hingStatusInfoChangedEvent] - 'zwave:device:7fb42261:node6' changed from ONLINE: Node initialising: INIT_NEIGHBORS to ONLINE: Node initialising: FAILED_CHECK
2017-12-25 07:44:38.035 [hingStatusInfoChangedEvent] - 'zwave:device:7fb42261:node3' changed from ONLINE: Node initialising: INIT_NEIGHBORS to ONLINE: Node initialising: FAILED_CHECK
2017-12-25 07:44:38.099 [hingStatusInfoChangedEvent] - 'zwave:device:7fb42261:node6' changed from ONLINE: Node initialising: FAILED_CHECK to ONLINE: Node initialising: REQUEST_NIF
2017-12-25 07:44:38.151 [hingStatusInfoChangedEvent] - 'zwave:device:7fb42261:node3' changed from ONLINE: Node initialising: FAILED_CHECK to ONLINE: Node initialising: REQUEST_NIF
2017-12-25 07:44:38.426 [hingStatusInfoChangedEvent] - 'hue:bridge:00178869615d' changed from INITIALIZING to ONLINE
2017-12-25 07:44:38.440 [hingStatusInfoChangedEvent] - 'hue:0210:00178869615d:3' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2017-12-25 07:44:38.458 [hingStatusInfoChangedEvent] - 'hue:0210:00178869615d:2' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2017-12-25 07:44:38.460 [hingStatusInfoChangedEvent] - 'hue:0210:00178869615d:4' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2017-12-25 07:44:38.477 [hingStatusInfoChangedEvent] - 'hue:0210:00178869615d:3' changed from INITIALIZING to ONLINE
2017-12-25 07:44:38.527 [hingStatusInfoChangedEvent] - 'hue:0210:00178869615d:2' changed from INITIALIZING to ONLINE
2017-12-25 07:44:38.542 [hingStatusInfoChangedEvent] - 'hue:0210:00178869615d:1' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2017-12-25 07:44:38.545 [hingStatusInfoChangedEvent] - 'hue:0210:00178869615d:4' changed from INITIALIZING to ONLINE
2017-12-25 07:44:38.578 [vent.ItemStateChangedEvent] - Lysfarge_Trapp changed from NULL to 326,100,27
2017-12-25 07:44:38.597 [hingStatusInfoChangedEvent] - 'hue:0210:00178869615d:1' changed from INITIALIZING to ONLINE
2017-12-25 07:44:38.610 [vent.ItemStateChangedEvent] - Lysstyrke_Trapp changed from NULL to 86
2017-12-25 07:44:39.709 [hingStatusInfoChangedEvent] - 'zwave:device:7fb42261:node6' changed from ONLINE: Node initialising: REQUEST_NIF to ONLINE
2017-12-25 07:44:39.842 [hingStatusInfoChangedEvent] - 'zwave:device:7fb42261:node3' changed from ONLINE: Node initialising: REQUEST_NIF to ONLINE
#removed some unrelated stuff
2017-12-25 07:49:23.082 [INFO ] [mmandclass.ZWaveDoorLockCommandClass] - NODE 6: Door-Lock config report - timeoutEnabled=false timeoutMinutes=254, timeoutSeconds=254
I have also tried to use the MapDB Persistence service. This is configured like this:
Strategies {
default = everyUpdate
}
Items {
// persist all items on every change and restore them from the db at startup
gRestoreOnStartup* : strategy = everyChange, restoreOnStartup
}
Following advices given in this post: Automation/Orchestration Design Patterns
I have also read about the use of Persistence
and tried to follow the sugested workaround nr.2 in the Startup Behavior section but i cannot get this solution to work in openhabian. I think this can be related to the fact that the openhabian directories has a different structure than the OpenHab.
I find it very very confusing that the Samba shared folders is renamed and not corresponding with the actual directory names. I wasted quite some time figuring this out and i still couldnāt make the refresh.rules run the rules_refresh.sh script . The Samba share folder is named: \OPENHABIANPI\openHAB-share\openhab2-conf but to access this in the PuTTy console the directory is revealed to be: /etc/openhab2/ ⦠Stupid little things like this can totally break the spirit of a newbie at the very start of his/hers endeavours in the OpenHab environment.
Im starting to think that going for the openhabian setup maybe was a wrong move. Will Openhab on a Raspbian system be easier to work with given that there is better documentation and that the majority of users have their experience on OpenHab? But im pretty sure ill have to deal with this exact same problem with my Door Lock rule⦠Arg !!!
Anyone sees whats goes wrong with my Persistence service? Seems like it wont work without applying a delayed rule initialization.
Edit: added part of the openhab.log in case this is needed:
2017-12-25 07:44:15.101 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mapdb.persist'
2017-12-25 07:44:18.072 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2017-12-25 07:44:19.865 [WARN ] [lipse.smarthome.io.net.exec.ExecUtil] - Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "arping" (in directory "."): error=2, Ingen slik fil eller filkatalog)
2017-12-25 07:44:19.893 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2017-12-25 07:44:20.020 [WARN ] [lipse.smarthome.io.net.exec.ExecUtil] - Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "arping" (in directory "."): error=2, Ingen slik fil eller filkatalog)
2017-12-25 07:44:20.245 [WARN ] [lipse.smarthome.io.net.exec.ExecUtil] - Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "arping" (in directory "."): error=2, Ingen slik fil eller filkatalog)
2017-12-25 07:44:20.381 [WARN ] [lipse.smarthome.io.net.exec.ExecUtil] - Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "arping" (in directory "."): error=2, Ingen slik fil eller filkatalog)
2017-12-25 07:44:23.689 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2017-12-25 07:44:24.177 [INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
2017-12-25 07:44:24.270 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2017-12-25 07:44:24.401 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2017-12-25 07:44:24.591 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2017-12-25 07:44:30.726 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyAMA0'
2017-12-25 07:44:30.845 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized
2017-12-25 07:44:30.896 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller
2017-12-25 07:44:30.899 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.
2017-12-25 07:44:34.441 [INFO ] [age.SerialApiGetInitDataMessageClass] - NODE 1: Node found
2017-12-25 07:44:34.444 [INFO ] [age.SerialApiGetInitDataMessageClass] - NODE 3: Node found
2017-12-25 07:44:34.446 [INFO ] [age.SerialApiGetInitDataMessageClass] - NODE 6: Node found
2017-12-25 07:44:34.449 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller using Controller API
2017-12-25 07:44:34.451 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller is Primary Controller
2017-12-25 07:44:34.454 [INFO ] [age.SerialApiGetInitDataMessageClass] - ------------Number of Nodes Found Registered to ZWave Controller------------
2017-12-25 07:44:34.456 [INFO ] [age.SerialApiGetInitDataMessageClass] - # Nodes = 3
2017-12-25 07:44:34.458 [INFO ] [age.SerialApiGetInitDataMessageClass] - ----------------------------------------------------------------------------
2017-12-25 07:49:23.082 [INFO ] [mmandclass.ZWaveDoorLockCommandClass] - NODE 6: Door-Lock config report - timeoutEnabled=false timeoutMinutes=254, timeoutSeconds=254