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

jcidi, Im new to openhab but a few months in and im pretty proud of what I have set up. but as expected i have the honeywell redlink gateway and wireless thermostat, its called the MHK1. I think that is different that the wifi thermostat you all are taking control of? I can access my system remoting via total connect at: https://mytotalconnectcomfort.com/portal/Device/Control/2211085

can you give me some beginners pointers since I am new to scripts etc…Im pretty must mastered bindings, items, and sitemap, but dont understand scripts yet.

Hi Adam,

If you are using mytotalconnect to manage your thermostat(as am i) them my scripts will work for you as well. Currently the only way to manage the thermostats linked to mytotalconnect are via their gateway. For instance my system sends all the commands (which would be the same as your setup) to mytotalconnect for processing which then sends them down to the actual thermostat. If you use my same scripts listed you should be good.

Hey all,

Since i have added a lot more coding to my set-up i am posting my entire sanitized /etc/openhab folder which includes all custom scripts and sounds. Its easier then updating all these posts… Any time i add anything i will just update the zip file. If you have any questions just ask. My goal was to mirror my touch screen ADT system and then surpass it in free features ie email alerting, phone (follow me) integration, zones, battery updates, scenes, etc…

http://dload.cidcomm.com/openhab.bak.zip

Feature list:

  1. Security system with ARMSTAY, ARMAWAY on 30s countdown, DISARM, with interface status updates and buttons.
  2. Device battery alerting, email alerts on battery low etc…
  3. Node health. Notifies you if a node hasnt responded in a while.
  4. Standard door/window alerting when armed on what device set off the alarm ie: Bedroom window, Front door, etc.
  5. Thermostat control (via mytotalcontrol)
  6. Garage door control and alerting (R-PI)
  7. Doorbell (MP3)
  8. Asterisk speaker phone integration (acts as remote speakers for openhab around the house.
  9. Smoke detector integration and siren alert activation on smoke or carbon alert.
  10. Openhab battery monitoring and alerting. Emails you on loss of host power etc.
  11. TV/Kodi integration. Turns on/off TV, Kodi etc. Tells you if they are on or off in app.
  12. House lights come on to set brightnesses at dusk via sunset and off at midnight.
  13. Bunch of different scenes to run.
    etc…

Get crazy and integrate some more stuff! :wink:

1 Like

awesome, i"ll get started…and thanks for the second post you made with all your updates…but promise i’ll have more questions :slight_smile:

1 Like

Oh one question I am customizing the themostat script and noticed the decice id number. is that one of the ids on the gateway on is that a 4 digit number on the back of the thermostat?

Sorry disregard my last message, I see it is the number at the end of the web address at total comfort.

I updated the username, copied all your files over to mine, but still not getting status…thoughts?

here is what the terminal shows…

2016-11-25 15:50:00.059 [INFO ] [.openhab.model.script.Security] - CRON: Querying MyTotalConnectComfort Portal for data!
2016-11-25 15:50:07.253 [INFO ] [o.i.r.i.resources.ItemResource] - Received HTTP POST request at ‘items/RotiniPing’ for the unknown item ‘RotiniPing’.
2016-11-25 15:50:08.082 [WARN ] [.w.internal.servlet.CmdServlet] - Received unknown command ‘Uninitialized’ for item 'IndHeatSet’
2016-11-25 15:50:08.222 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-11-25 15:50:08.223 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-11-25 15:50:08.248 [INFO ] [runtime.busevents ] - Weather_Humidity state updated to

2016-11-25 15:50:09.485 [WARN ] [.w.internal.servlet.CmdServlet] - Received unknown command ‘Uninitialized’ for item 'IndHeatSet’
2016-11-25 15:50:10.301 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-11-25 15:50:10.303 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized

1 Like

run the script /etc/openhab/configurations/scripts/tstat and show me the output.

also if you create me a root account and access i can login and help also but your call.

hum, now im very confused. I may have messed this up. the zip file you posted starts with etc/openhab.bak/configurations… etc. I took that as I should start at openhab.bak and copy your files over into the dirrectories above my C:\openhab folder. did I do that correctly? of does all this get copied into the C:\openhab\etc?

Sorry dont see a tstat in any of those locations…

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?