GE Concord Alarm Panel Binding

Thanks again for the update. Where you able to check the code into a GIT repo?

Any updates or anything I can do to help?

Kurt are you able to post your code? Have you been able to get a GIT repo up and running? I am happy to help where I can.

Soooo… I found myself in the midst of a very active job situation ! I decided to fix the class that sends messages to the panel and of course that resulted in a refactor! I’m slow due to he job search. Sorry. I will check in this weekend. It’s good stuff and works well. I’m pretty happy with how it turned out and could definitely use the help. Look for it o. Saturday or Sunday! Right now I’m on my way out of town. I’ll check in when I’m back:

If you’re interested, it’s built using a minimal spring boot setup. The main panel abstraction is a spring automation bean that can be run continuously as a thread. Unlike most implementations out there it translates the super obtuse concord protocol into easy to consume Java event objects. Your code can register as an event listener using the Google event bus. Super easy.

My thought is we can embed the code within an OpenHab component or expose it as a server Brough REST. Unsure which would work better.

If you want to have a look at Spring Boot and Google Event Bus you’ll get a good feel for how it works. Code drop coming soon.

Did you ever post the code? I haven’t seen it, but may have missed it. I have the automation module as well and have been playing around with it and have some preliminary coding done too. I would like to avoid extra work and leverage any work you’ve already done. :stuck_out_tongue_winking_eye:

Since the Concord System will freak out unless you are constantly acknowledging SuperBus messages once the automation module is installed, I was focusing on having a local raspberry pi zero inside of the alarm panel enclosure which will handle the serial connection and provide a REST API as an interface out to the network (need to be careful with this obviously for security sake). This allows me to shutdown / upgrade my openHAB instance without my alarm system also beeping and sending alarms due to the lack of message acknowledgement during the openhab shutdown (the raspberry pi is powered from the 12V off the alarm panel so it is always on when the alarm is on). Pi is working great (just have a simple “read the serial port and ACK” program running right now so I can monitor the messages and not get the angry error beeps from no ACK)

All this is to say, that I prefer the REST API method that you mention above, so we can loosen the coupling between the openHAB system and the automation module.

I guess an RPI in the alarm panel won’t work for everyone, so perhaps there is a way to enable both methods, but either case, I am happy to help push this along, if you’re interested.

I have not seen any code posted. I have also been playing around with the module and my Raspberry Pi. I modified the code at https://github.com/JasonCarter80/concord232 and wrapped the client summary code
in a crontob that runs every 30 seconds. The client receives the summary back from the panel and checks for any zones that are tripped. For any zones that are tripped, a REST API call is made to the openHAB server for the String item that I have created in my .items file. I also create a rule in the openHAB .rules file to send me a push notification whenever a zone is tripped. I also set a Switch item in the .items file to call the client code to ARM the system. All of this has been working great for the last few weeks.

I have also not posted the code yet, but I can fork his project officially and post it sometime this week. I would like to take the code and make it event driven so I do not need to poll the way I am now.

Thanks for the link. Everything is working great. I rewrote this in java (I am horrible at python) and it is working great.

Awesome do you plan on posting your code? I really want to modify the python or your Java to be event based but just have not had time yet.

Code is here: https://github.com/ubiav/concord4pi

The program is listening and transmitting to the Automation Module. I have not added all of the commands, but many of them (see CommandInterpreter.java). Adding a command is simple, but just need to do it.

Currently it is only logging the commands that it receives/transmits, for the most part, but the state changes will be moved into the objects of Class “State”. I plan to then build out the API class to 1) callback to openHab on a state change and 2) allow a call in from other systems to query the state of the alarm.

Still a work in progress, but getting close…

1 Like

In case anyone is interested… I know this is an old thread.

So I had some time to work on this a little and now have a working version of this in my openHAB installation. I’ve committed some changes to the GitHub link above.

I fixed several bugs, added a REST API (default is on port 4321… e.g. http://localhost:4321/system) which will give you JSON object of the entire alarm system state.

I also added support for MQTT, which is how I am receiving updates in my openHAB installation. Topics under concord4pi/# and more detailed topics follow the “FullID” node in the JSON object you get from the REST call above. For example, subscribing to the concord4pi/state/partition00/area00/zone0001/status topic will give you the status of that zone.

The code isn’t in a great state yet and the documentation is non-existent, but it works. All of the commands from the SuperBus module aren’t handled yet, but the Zone updates do work and that’s the main part of the functionality that I was after (being able to monitor the state of the alarm zones). I’ll update the code to handle more of the SB2000 commands as I go.

Note (just in case it bears repeating) that you must have the automation module hooked up to the alarm system and a system (I used a RPI Zero) that is reading from the serial port. This program reads from the serial port to get the SuperBus 2000 commands, properly handles the acknowledgement / communication with the Automation module and then broadcasts these changes via an MQTT broker. OpenHAB can then read the messages from the MQTT broker.

2 Likes

This is great! Thank you for the update. I am going to download your code, build the jar and try to get it up and running sometime in the next week. Do you have the ability to ‘arm’ the alarm?

Also any chance you could post an example items/rules file just to see how you have everything set up?

It only gets zone status as of right now, but should be simple to add alarm/unalarm/alarm state. Let me see what I can do.

If you need me to just upload the JAR, I can do that. For building your own, you only need to build what is in src/ into the JAR file for it to work. You’ll also need an MQTT broker on the network. I have mine running on my RPi Zero (same as what is connected to the automation module), but it could be anywhere on the network.

Eventually, I intend to build an OH2 binding which uses the REST API for discovery and the MQTT for real-time updates… Of course, this is after I implement all the functionality, clean up the code, convert to maven project, etc…

Here are a couple of the items entries in my items file:

String HouseAlarm_TouchPad "Alarm Touchpad [%s]" {mqtt="<[concord4pi:concord4pi/state/partition01/area00/touchpad0/statusText:state:default]"}
Contact HouseAlarm_MotionSensor "Motion Sensor [%s]" {mqtt="<[concord4pi:concord4pi/state/partition01/area00/zone0006/status:state:CLOSED:0],<[concord4pi:concord4pi/state/partition01/area00/zone0006/status:state:OPEN:1]"}

Here’s a rules file for turning on a light using the Motion Sensor:

rule MotionLight
when
      Item HouseAlarm_MotionSensor changed to OPEN
then
      logInfo("Rules", "Picked up Motion in the Family Room - Turning on Light")
      sendCommand(DIMMERITEM, 100)
end

Thank you so much! I finally had some time to sit down and get this all setup. I got your java code running and the mqtt broker installed. Everything seems to be working perfectly.

The only thing I would still really like to be able to do is set the alarm to stay and and away. Let me know if you have any plans to add this functionality! Thanks again for all of your work.

Sorry for the late reply… Didn’t see this note until now… been a busy month.

I added the ability to send messages (including ARM/DISARM) to the controller. I’ve merged the new version on GitHub. Note that the config.properties file changed a bit… I cleaned up the variables a little and added an MQTT username/password so that there is at least a little security in passing around the MQTT messages to arm/disarm your security system. Take a look at the config.properties for more information.

Also, you will need to update your mqtt.cfg file in OpenHab services to include the username password that is set in your config.properties file.

So to use this version:

  1. Build the JAR the same as before.
  2. Update the config.properties file following the new template (just a couple of changed names).
  3. Update your openHAB mqtt.cfg file to include the .user and .pwd settings that you have added to the config.properties file.
  4. Everything should work exactly the same after that.

Below is an example item setup to send the ARM/DISARM commands. This simulates the KeyFob arming/disarming, so no PIN or user code is required. All you need to do is set the value of the item to “ARMEDSTAY”, “ARMEDAWAY”, or “DISARMED” for it to trigger an arm/disarm.

String HouseAlarm_ArmDisarm "Set House Alarm" (AlarmSystem) {mqtt=">[concord4pi:concord4pi/cmd/partition/01:command:ARMEDAWAY:armaway],>[concord4pi:concord4pi/cmd/partition/01:command:ARMEDSTAY:armstay],>[concord4pi:concord4pi/cmd/partition/01:command:DISARMED:disarm]"}

Let me know if you need any help.

I just realized that I think there might be a few more changes than that… Mostly, though, it should really is the name of the partitions. After reading the Concord4 manual a little more closely, I realized that areas and partitions are mutually exclusive. As such, I merged these nodes in the JSON/MQTT paths. You’ll need to change your items file as well to change the path of the MQTT device… for example, see the previous examples changed below (note the “partitionarea01” vs. “partition01/area00”).

String HouseAlarm_TouchPad "Alarm Touchpad [%s]" (AlarmSystem) {mqtt="<[concord4pi:concord4pi/state/partitionarea01/touchpad/status/text:state:default]"} 
Contact HouseAlarm_MotionSensor "Family Room Motion Sensor [%s]" (AlarmSystem) {mqtt="<[concord4pi:concord4pi/state/partitionarea01/zone0006/status:state:CLOSED:0],<[concord4pi:concord4pi/state/partitionarea01/zone0006/status:state:OPEN:1]"} 

You can take a look at the full structure of the object in the JSON by hitting the REST API as stated before. You can also just listen to the MQTT messages to get any details / updates you might need. (e.g. mosquitto_sub -v -t “concord4pi/state/partitionarea01/#” -u concord4pi -P )

1 Like

Can anyone help with sending the ARM DISARM commands? I have everything working but can’t send commands. Using Brandon’s example above , I post an update to the String item however nothing happens. Thanks in advance.

Bryan -
Did you manage to get this to work?
Thanks!

Hi:

Question for you. Were you able to get this to work to your satisfaction? My situation is that I live in South America and have a Concord panel at my farm. There is no way to monitor the system with a phone line or cellular system. We do have internet. So my goal is to somehow bridge the concord to the automation module to a Raspberry Pi to the Ethernet and have it communicate with me (an email would be fine) if there is an alarm activation. Is this solution you have developed a good candidate for this? I am not a programmer but am super motivated and have the time.

Kindly,
Kevin

It works for me. I have a text item that is related to the Alarm State at “concord4pi/areapartition/0100/armingLevel” When the arming level changes, I have a rule that can email or send me an SMS to alert me of the change. Something like this:

//given two items
//AlarmState is the thing associated with “concord4pi/areapartition/0100/armingLevel”  
//AlarmState_Text is the thing associated with “concord4pi/areapartition/0100/armingLevel/text”

var alertEmailList = "email@somedomain.com"
rule AlarmNotification
when
          Item AlarmState changed
then
          logInfo(“Rules”, “Alarm State changed to {}”, AlarmState_Text)
          sendEmail(alertEmailList, “Alarm State changed to ” + AlarmState_Text)   
end

Just a note… I can’t remember what version this was in when I posted last, but I may have updated things a bit. A little while back, I refactored the code to let it be more efficient and remove some bugs… The MQTT paths changed a little bit and (I think) they are now more usable / understandable. Also, since then, openhab now has the “Generic MQTT Thing” that I use to configure all these items through the PaperUI, so it is pretty easy to do.

Thanks,
Brandon