My Config Collection (OH 1.8 ONLY!) - Might help Someone

Hey havent got to the point of creating other accounts for access…and since this is a windows PC, not sure that will be easy?

let me get my.openhab set up but until then, here is my startup…you can see im having trouble with my with some persistence items which I havent educated myself on just yet.

Launching the openHAB runtime…
osgi> 2016-11-25 21:36:58.007 [INFO ] [.o.core.internal.CoreActivator] - openHAB runtime has been started (v1.8.3).
2016-11-25 21:36:58.621 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - mDNS service has been started
2016-11-25 21:36:58.850 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - Service Discovery initialization completed.
2016-11-25 21:37:00.064 [INFO ] [penhab.io.rest.RESTApplication] - Started REST API at /rest
2016-11-25 21:37:08.643 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'Orcas.sitemap’
2016-11-25 21:37:08.807 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'db4o.persist’
2016-11-25 21:37:08.817 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'exec.persist’
2016-11-25 21:37:08.820 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'logging.persist’
2016-11-25 21:37:08.822 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'rrd4j.persist’
2016-11-25 21:37:08.856 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'orcas.script’
2016-11-25 21:37:08.949 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'orcas.items’
2016-11-25 21:37:09.287 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /classicui/openhab.app
2016-11-25 21:37:13.345 [INFO ] [.service.AbstractActiveService] - Sonos Refresh Service has been started
2016-11-25 21:37:13.633 [INFO ] [.b.sonos.internal.SonosBinding] - Querying the network for a predefined Sonos device with UDN uuid:RINCON_B8E9378FA3EC01400
2016-11-25 21:37:13.639 [INFO ] [.b.sonos.internal.SonosBinding] - Querying the network for a predefined Sonos device with UDN uuid:RINCON_B8E93733B23801400
2016-11-25 21:37:13.640 [INFO ] [.b.sonos.internal.SonosBinding] - Querying the network for a predefined Sonos device with UDN uuid:RINCON_B8E93733B27201400
2016-11-25 21:37:13.641 [INFO ] [.b.sonos.internal.SonosBinding] - Querying the network for any other Sonos device
2016-11-25 21:37:13.730 [INFO ] [o.harmonyhub.HarmonyHubGateway] - HarmonyHub gateway activated
2016-11-25 21:37:13.754 [INFO ] [.service.AbstractActiveService] - HTTP Refresh Service has been started
2016-11-25 21:37:13.829 [INFO ] [o.o.b.w.i.common.WeatherConfig] - ProviderConfig[providerName=WUNDERGROUND,apiKey=xxxxxxxxxxx]
2016-11-25 21:37:13.829 [INFO ] [o.o.b.w.i.common.WeatherConfig] - LocationConfig[providerName=WUNDERGROUND,language=en,updateInterval=3,latitude=xxxxx,longitude=xxxxxx,woeid=,locationId=xxxxx,name=xxxxxx]
2016-11-25 21:37:13.860 [INFO ] [insteonplm.InsteonPLMActivator] - Insteon PLM binding has been started.
2016-11-25 21:37:13.874 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - poll interval set to 300000 per config file
2016-11-25 21:37:13.874 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - dead device timeout set to 3000s
2016-11-25 21:37:13.874 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - config: poll_interval -> 300000
2016-11-25 21:37:13.875 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - config: port_0 -> /hub2/xxxxx:xxxxxx@XXX.XXX.XXX.XXX:25105,poll_time=1000
2016-11-25 21:37:13.875 [INFO ] [.service.AbstractActiveService] - InsteonPLM has been started
2016-11-25 21:37:13.882 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - devices: 0 configured, 0 polling, msgs received: 0
2016-11-25 21:37:13.887 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - config: service.pid -> org.openhab.insteonplm
2016-11-25 21:37:13.931 [INFO ] [.p.rrd4j.internal.RRD4jService] - Removing invalid defintion component = null heartbeat = 0 min/max = 0.0/0.0 step = 0 0 archives(s) = [] 0 items(s) = []
2016-11-25 21:37:13.936 [INFO ] [.service.AbstractActiveService] - NTP Refresh Service has been started
2016-11-25 21:37:14.694 [INFO ] [.b.sonos.internal.SonosBinding] - Found a Sonos device (S3) with UDN uuid:RINCON_B8E93733B27201400
2016-11-25 21:37:14.709 [INFO ] [.b.sonos.internal.SonosBinding] - Found a Sonos device (S1) with UDN uuid:RINCON_B8E9378FA3EC01400
2016-11-25 21:37:14.775 [ERROR] [.myopenhab.internal.MyOHClient] - Socket.IO error: not authorized
2016-11-25 21:37:14.926 [INFO ] [.b.sonos.internal.SonosBinding] - Found a Sonos device (ZP90) with UDN uuid:RINCON_B8E93798A63C01400
2016-11-25 21:37:15.098 [INFO ] [.b.sonos.internal.SonosBinding] - Found a Sonos device (S3) with UDN uuid:RINCON_B8E93733B23801400
2016-11-25 21:37:16.845 [INFO ] [.o.b.w.i.s.WeatherJobScheduler] - Disabling weather locationId ‘orcas’, no binding available
2016-11-25 21:37:18.999 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'orcas.rules’
2016-11-25 21:38:00.115 [ERROR] [.o.m.r.i.engine.ExecuteRuleJob] - Error during the execution of rule Persistence Demo
java.lang.RuntimeException: The name ‘Weather_Temperature’ cannot be resolved to an item or type.
at org.openhab.model.script.interpreter.ScriptInterpreter.internalFeatureCallDispatch(ScriptInterpreter.java:67) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._evaluateAbstractFeatureCall(XbaseInterpreter.java:658) ~[na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_111]
at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:291) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:218) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._evaluateMemberFeatureCall(XbaseInterpreter.java:545) ~[na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_111]
at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:291) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:218) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._evaluateIfExpression(XbaseInterpreter.java:327) ~[na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_111]
at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:291) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:218) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._evaluateBlockExpression(XbaseInterpreter.java:321) ~[na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_111]
at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:291) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:218) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.evaluate(XbaseInterpreter.java:204) ~[na:na]
at org.openhab.model.script.internal.engine.ScriptImpl.execute(ScriptImpl.java:59) ~[na:na]
at org.openhab.model.rule.internal.engine.ExecuteRuleJob.execute(ExecuteRuleJob.java:55) ~[na:na]
at org.quartz.core.JobRunShell.run(JobRunShell.java:213) [quartz-all-2.1.7.jar:na]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) [quartz-all-2.1.7.jar:na]
2016-11-25 21:38:40.739 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - modem database has 12 entries!
2016-11-25 21:38:40.742 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - device 3A.E6.63 found in the modem database, but is not configured as an item and the modem controls groups [0x00,0x01] and responds to groups [0x01].
2016-11-25 21:38:40.744 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - device 35.4A.3F found in the modem database, but is not configured as an item and the modem controls groups [0x00,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F] and responds to groups [0x01].
2016-11-25 21:38:40.746 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - device 3D.7F.91 found in the modem database, but is not configured as an item and the modem controls groups [0x00,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F] and responds to groups [0x01].
2016-11-25 21:38:40.748 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - device 39.84.53 found in the modem database, but is not configured as an item and the modem controls groups [0x00,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F] and responds to groups [0x01].
2016-11-25 21:38:40.750 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - device 35.4D.99 found in the modem database, but is not configured as an item and the modem controls groups [0x00,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F] and responds to groups [0x01].
2016-11-25 21:38:40.752 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - device 27.22.F9 found in the modem database, but is not configured as an item and the modem controls groups [0x00,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F] and responds to groups [0x01].
2016-11-25 21:38:40.763 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - device 37.B2.3E found in the modem database, but is not configured as an item and the modem responds to groups [0x01].
2016-11-25 21:38:40.765 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - device 3C.3F.6B found in the modem database, but is not configured as an item and the modem controls groups [0x00,0x02,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F] and responds to groups [0x01].
2016-11-25 21:38:40.767 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - device 3C.41.7E found in the modem database, but is not configured as an item and the modem controls groups [0x00,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F] and responds to groups [0x01].
2016-11-25 21:38:40.768 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - device 39.81.68 found in the modem database, but is not configured as an item and the modem controls groups [0x00,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F] and responds to groups [0x01].
2016-11-25 21:38:40.769 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - device 3B.A7.10 found in the modem database, but is not configured as an item and the modem controls groups [0x00,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F] and responds to groups [0x01].
2016-11-25 21:39:00.043 [ERROR] [.o.m.r.i.engine.ExecuteRuleJob] - Error during the execution of rule Persistence Demo
java.lang.RuntimeException: The name ‘Weather_Temperature’ cannot be resolved to an item or type.
at org.openhab.model.script.interpreter.ScriptInterpreter.internalFeatureCallDispatch(ScriptInterpreter.java:67) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._evaluateAbstractFeatureCall(XbaseInterpreter.java:658) ~[na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_111]
at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:291) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:218) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._evaluateMemberFeatureCall(XbaseInterpreter.java:545) ~[na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_111]
at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:291) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:218) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._evaluateIfExpression(XbaseInterpreter.java:327) ~[na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_111]
at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:291) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:218) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._evaluateBlockExpression(XbaseInterpreter.java:321) ~[na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_111]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_111]
at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:291) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:218) ~[na:na]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.evaluate(XbaseInterpreter.java:204) ~[na:na]
at org.openhab.model.script.internal.engine.ScriptImpl.execute(ScriptImpl.java:59) ~[na:na]
at org.openhab.model.rule.internal.engine.ExecuteRuleJob.execute(ExecuteRuleJob.java:55) ~[na:na]
at org.quartz.core.JobRunShell.run(JobRunShell.java:213) [quartz-all-2.1.7.jar:na]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) [quartz-all-2.1.7.jar:na]

Hi Adam,

Sorry i didn’t realize but these custom scripts are for linux not windows. They wont work on winblows lol. Also my folder is called openhab. It just says openhab.bak as i made a backup of my folder.I also wouldnt recommend windows for a legit HA setup as its just not stable enough for everything and all the custom integrations.

well then there we go :). right now Im have testing and setting up on windows but have been reading up on the best embedded machine to install on RPi etc…advice?

1 Like

I personally wouldnt use any embedded device as they are two slow, no backup batteries or anything like that. Check out my post above and the netbook i used.I would go that direction as you always have a battery backup and stable device for when you start running the alarm system and tons of rules. You want something that has backup and can handle the load. Especially if your doing a full blown security system like mine. You want a backup battery or it defeats the purpose :slight_smile:

Hi @jcid1

I’m trying to make a simple alarm system based on your example using only 3 magnetic contacts.
So to do that i made the following:

  1. Added a few new groups and a string:
    Group persist
    Group:Contact:OR(OPEN,CLOSED) gDoorSensors (All)
    Group gAllLights (All)
    String Notification_Proxy

  2. Added the items to the groups:
    Contact Node01Door "Front Door [%s]" <frontdoor> (All, Contacts, TempHum, persist,gDoorSensors) { mqtt="<[mymosquitto:home/door:state:MAP(door.map)]" }
    Contact Node01Geam1 "Back Door [%s]" <contact> (Contacts, persist,gDoorSensors) { mqtt="<[mymosquitto:home/door1:state:MAP(door.map)]" }
    Contact Node01Geam2 "Bedroom window [%s]" <contact> (Contacts, persist,gDoorSensors) { mqtt="<[mymosquitto:home/door2:state:MAP(door.map)]" }
    Switch Living "Switch ON/OFF Living" (persist,gAllLights) {zwave="2:command=SWITCH_MULTILEVEL" }
    Switch bedroom_light_one "First light" (persist,gAllLights) {zwave="3:command=switch_binary" }
    Switch bedroom_light_two "Second light" (persist,gAllLights) {zwave="3:2:command=switch_binary" }

  3. Added new items for the alarm system as you have:
    /* Alarm System */
    Number AlarmSysStatus "System Status: [MAP(alarm.map):%d]" <shield> (persist)
    Number AlarmArmDisarm "Alarm Arm / Disarm:" <shield> (persist) {autoupdate="false"}

  4. Sitemap:
    Frame label="" {
    Text label="Alarm Menu" icon="shield" {
    Frame label="Alarm System" {
    Text item=AlarmSysStatus valuecolor=[1="green",2="red",3="orange",4="red",5="red",6="orange"]
    Switch item=AlarmArmDisarm label="Arm / Disarm:" mappings=[1="DISARM",3="ARM-STAY",2="ARM-AWAY"]
    }}}

  5. Rules. Here ill use only the lights signal because i don’t have sirens:
    rule “Dispatch Notification"
    when
    Item Notification_Proxy received update
    then
    logWarn(“Notification”, Notification_Proxy.state.toString)
    sendMail("dragos.m.constantin@gmail.com”, “Security System Alert!”, Notification_Proxy.state.toString)
    end

rule "Process door intrusion updates"
Item gDoorSensors changed from CLOSED to OPEN
then
val aState = AlarmSysStatus.state as DecimalType
if(aState == 2 || aState == 3) {
alert.apply(gDoorSensors, “- Intrusion”)
}
end

// Alarm Arm and Disarm
rule “rArmState1"
when
Item AlarmArmDisarm received command 3
then
{
if (receivedCommand == 3 && gDoorSensors.state == CLOSED && gWindows.state == CLOSED)
{
postUpdate(AlarmSysStatus, 6)
Thread::sleep(30000)
postUpdate(AlarmSysStatus, 3)
logInfo(“Security”, “SECURITY: Armed Stay!”)
sendMail("dragos.m.constantin@gmail.com”, “Security: Armed Stay!”, “System Armed Stay!”)
executeCommandLine(“aplay /opt/openhab/configurations/sounds/armedstay.wav”)
executeCommandLine("/opt/openhab/configurations/scripts/armedstay.ssh")
} else {
if (receivedCommand == 3)
logInfo(“Security”,“SECURITY: Unable to Arm Stay!. Please try again.”)
sendMail("dragos.m.constantin@gmail.com", “Security: Door/Win Ajar!”, “Unable to Arm Stay due to an open door or window. Please investigate!.”)
postUpdate(AlarmSysStatus, 5)
Thread::sleep(3000)
postUpdate(AlarmSysStatus, 1)
}}}
end

// Alarm Arm and Disarm
rule “rArmState2"
when
Item AlarmArmDisarm received command 2
then
{
if (receivedCommand == 2 && gDoorSensors.state == CLOSED && gMotionSensors.state == CLOSED && gWindows.state == CLOSED) {
{
postUpdate(AlarmSysStatus, 6)
Thread::sleep(30000)
postUpdate(AlarmSysStatus, 2)
logInfo(“Security”, “SECURITY: Armed Away!”)
sendMail("dragos.m.constantin@gmail.com”, “Security: Armed Away!”, “System Armed Away!”)
executeCommandLine(“aplay /opt/openhab/configurations/sounds/armedaway.wav”)
executeCommandLine("/opt/openhab/configurations/scripts/armedaway.ssh")
} else {
if (receivedCommand == 2)
logInfo(“Security”,“SECURITY: Unable to Arm Away!. Please try again.”)
sendMail("dragos.m.constantin@gmail.com", “Security: Err Motion!”, “Unable to Arm Away due to motion. Please investigate!”)
postUpdate(AlarmSysStatus, 4)
Thread::sleep(3000)
postUpdate(AlarmSysStatus, 1
}}}
end

// Alarm Arm and Disarm
rule “rArmState3"
when
Item AlarmArmDisarm received command 1
then
{
if (receivedCommand == 1)
{
logInfo(“Security”, “SECURITY: Disarmed”)
postUpdate(AlarmSysStatus, 1)
gAllSirensSwitch.sendCommand(OFF)
sendMail("dragos.m.constantin@gmail.com”, “Security: Disarmed!”, “System Disarmed!”)
executeCommandLine(“aplay /opt/openhab/configurations/sounds/disarmed.wav”)
executeCommandLine("/opt/openhab/configurations/scripts/disarmed.ssh")
} else {
if (receivedCommand == 1)
postUpdate(AlarmSysStatus, 1)
}}}
end

// Alarm Arm and Disarm
rule "rArmState4"
when
Item AlarmArmDisarm received command 0
then
{
if (receivedCommand == 0)
{
logInfo(“Security”, “SECURITY: No Update”)

}}
end

// Alarm System Active Action
rule "rAlarmActivated"
when
Item gMotionSensors changed from CLOSED to OPEN or
Item gDoorSensors changed from CLOSED to OPEN
then
{
if (AlarmSysStatus.state == 2 && gMotionSensors.state == OPEN)
{
logInfo(“Security”, “SECURITY: ARMED-AWAY Motion Intrusion Detected!”)
gAllLights.sendCommand(ON)
Thread::sleep(3000)
//gAllSirensSet.sendCommand(259)
//Thread::sleep(1200000)
//gAllSirensSwitch.sendCommand(OFF)
}
if (AlarmSysStatus.state == 2 && gDoorSensors.state == OPEN)
{
logInfo(“Security”, “SECURITY: ARMED-AWAY Door Intrusion Detected!”)
gAllLights.sendCommand(ON)
Thread::sleep(3000)
//gAllSirensSet.sendCommand(259)
//Thread::sleep(1200000)
//gAllSirensSwitch.sendCommand(OFF)
}
if (AlarmSysStatus.state == 3 && gDoorSensors.state == OPEN)
{
logInfo(“Security”, “SECURITY: ARMED-STAY Door Intrusion Detected!”)
gAllLights.sendCommand(ON)
Thread::sleep(3000)
//gAllSirensSet.sendCommand(259)
//Thread::sleep(1200000)
//gAllSirensSwitch.sendCommand(OFF)
}
}}}}
end

It doesnt work! I would like to send me an email and to turn ON the lights in gDoorSensors group in case the alarm is Armaway, and to ust send me an email in case of Armstay!
When i press Armaway or Armstay its not doing anything and if i press Disarm the status turns from UNKNOWN with grey color in Disarmed with green color and stays that way whatever i press ArmStay or Armaway.

Could you please take a look on these files?

PS: I also copied all the scripts in my script folder, the openhab.cfg looks alright. I didnt test the sounds if they work or not couse i dont have a speaker on my rpi yet.

Thanks alot.

Hello,

What version of openhab are you using? Also what zstick?

HI,
I’m using OH 1.8.3 and the Aeon Aotec gen 5. Could be because of some missing addons? Could you please tell what addons are you using?

EDIT: Nevermind, I saw you split entries in your .items into two different codeblocks.

What’s in your log file?

During today I found and made some corrections in the rules/items according to my settings. At one point I was able to armstay and opening a contact it was turning all my lights on so that was one of the things I wanted. Second thing is to set the email, doesn’t work right now and don’t know why! I use the same email in the oh.cfg but is not sending receiving any email at all!
Unfortunately the MQTT gateway and my node point where I have the sensor attached doesn’t want to communicate anymore and I can’t make tests for the alarm system.
I think there is another problem with the scripts, I saw in the logs that couldn’t execute the script … but I can’t remember which one or for what command, armstay, armway or disarm. I’ll try tomorrow to see what’s going on with the sensor node and I’ll try to figure how can I get this alarm on.
Thanks for help, keep in touch.
All the best.

News, I made it with the email and right now I receive email every time I press armstay, arm away or disarm. It was a problem related to the gmail account settings that I needed to allow less secure app!
Still struggling to make the Mqtt gateway to communicate with the node where I have all sensors connected! Could be any problem related to persistence?
Another question about the alarm system: how did you think the armaway mode because I cannot do it because I have motion in the area? So this means I cannot araway the system if I have the moving sensor installed near the control panel because the sensor will detect moving! Normally I think it should have a timer which will aloud you to armaway wherever the motion is placed and only after some defined seconds to start the armaway mode. What do you think about this? Can you armaway your system if you are near a motion sensor?

Can anyone please help? My node 01 is a Arduino with three door sensors and a few other sensors and right is unplugged from power but OH still store states of some sensors! below some debug states:

21:03:00.007 [DEBUG] [.p.rrd4j.internal.RRD4jService:113 ] - Stored 'Node01Door' with state 'OPEN' in rrd4j database (again)
21:03:00.009 [DEBUG] [.p.rrd4j.internal.RRD4jService:132 ] - Stored 'Node01Door' with state '1' in rrd4j database
21:03:00.023 [TRACE] [o.c.p.internal.PersistItemsJob:56 ] - Storing item 'Node01Door' with persistence service 'rrd4j' took 19ms

I think is related to rrd4j binding…

Any idea?

@jcid1 I managed somehow to start my gateway and I simplified the rules to whatch a single door contact that is in the group and I managed to test your rule. The result is this:
When I armaway or armstay I get email of the alarm status, also if the door contact is open I get email that the alarm couldn’t be armed because of that.
If the alarm is set to armaway and armstay and if I open the contact the lights in the galllights group will come on.
So far so good but, I don’t receive email if the alarm is set to armaway or armstay and the door contact it’s open during this time! Do you receive email in this case?
Also I think it needs to have some seconds when you come back home and you disarm the system because in this case, before disarming (from insi the house ) you will trigger all the devices like sirens, lights…
What do you think about this?

Can you please tell me why you have {autoupdate=“false”} at the ent of the AlarArmDisarm item?
Thanks.

Honestly don’t remember. But it is working fine so. May have been there from before i added states but who knows…

My config actually already has a timer. When the alarm is set off it first triggers all the lights to let you know something is about to happen. Then after a minute or something it sets off the sirens etc… Feel free to extend on that…

Why would you not want states? Plug the arduino back in and let it update the proper states? OH is doing exactly what it is configured to do.

I have groups for Doors, Windows, Motion etc. When I arm away it looks at all the motion and doors/widows groups and checks if it is OPEN. A group will show OPEN is any if the items in that group are open. Same with doors etc. If all Doors are closed then the group will show closed.

Arming stay only looks at the Doors and windows groups. Not Motion :wink:

No clue. Dont use mqtt at all… Sorry.

Yes i noticed i forgot some scripts in the folder but there all posted here for you to grab if their missing.