Giter VIP home page Giter VIP logo

concord2mqtt's Introduction

concord2mqtt

License: MIT

Home Assistant integration for GE Security Concord 4 panels installed by ADT, Brinks, and independent contractors that allows co-existance with Alarm.com cellular modules.

The embedded Concord library is a mature codebase that I wrote more than a decade ago and has been running continously in my home for the past 10 years. After recently discovering the Home Assistant, I decided to port the library to .net 5 and release it open source. The solution implements Home Assistant MQTT automatic discovery for zones and partitions, and provides an alarm control panel. Integration can be deployed in a docker container, and a sample docker-compose.yml file is included.

The core concord library implements the GE Security Automation Module Protocol dated 12.15.2005. Three communication methods are provided, serial port, tcp server and tcp client. Tcp server and client are to be used when connecting to a serial-to-ethernet adapter.

Reference implementation

The following part numbers for a reference implementation:

  • GE Security Concord 4 80-860-4-KT (version 4.1+, 1/19/07)
  • GE a GE Security 60-783-02 SuperBus 2000 RS-232 Automation Module
  • MOXA NPort 5110 RS232 Serial to Ethernet adapter
  • POE power adapter

Docker image runs in Ubunutu 20.04 and connects to a HASSO Mosquitto MQTT broker add-on.

Configuration is controlled via appsettings.json which may be mounted external to the container on the docker host, or environment variables

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },

  "Concord2Mqtt": {
    "MQTT": {
      "ClientId": "concord2mqtt",
      "Username": "mqtt username",
      "Password": "mqtt password",
      "Host": "homeassistant",
      "Port": "1883",
      "Secure": false
    },
    "Discovery": true,
    "DirectDisarm": false
  },

  "Concord": {
    "TcpAddress": "192.168.0.100",
    "TcpPort": 4001,
    "SerialPort": "COM1",
    "Connection": "TcpServer",
    "AutomationUserId": 0,
    "Users": [
      {
        "Name": "Home",
        "Id": 0
      }
    ]
  }
}

The following are required MQTT settings:

Option Values Description default
Username string User defined in Mosquitto broker configuration
Password string Password defined in Mosquitto broker configurationr
Host string Hostname or ip address of MQTT broker homeassistant
Port numeric TCP port for MQTT 1883

Concord library is configured for connection method and the arm/disarm automation user id must be specified:

Option Values Description default
TcpAddress string Required when using TCP client or server method
TcpPort numeric Required when using TCP client or server method
Connection 'TcpServer','TcpClient','SerialPort' Communication method
AutomationUserId numeric User id for the code that will be used to arm or disarm security partition

Supported MQTT versions

  • 5.0.0
  • 3.1.1
  • 3.1.0

see MQTTnet

License

MIT License

Concord2mqtt Copyright (c) 2009-2021 Mark Berndt

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

concord2mqtt's People

Contributors

markfrancisonly avatar

Stargazers

 avatar  avatar

Watchers

 avatar

concord2mqtt's Issues

Unable to Disarm

Arming from HASS works great. Cannot disarm. Set DirectDisarm to true. Tried all userids including 246 for system master.
would appreciate configuration.yaml example for alarm_control_panel to pass remote code for disarm

alarm_control_panel:
  - platform: mqtt
    state_topic: "homeassistant/alarm_control_panel/panel_partition_1/state"
    command_topic: "homeassistant/alarm_control_panel/panel_partition_1/command"
   name: "Panel Partition 1"
    value_template: "{{ value_json.state }}"
    code: REMOTE_CODE
    command_template: "{ action: '{{ action }}', code: '{{ code }}'}"
    code_arm_required: false
    code_disarm_required: true

Need help with docker-compose and missing libnserial.so.1

I have HA installed on a VM and the SuperBus module connected via USB to Serial. HA can see the USB Serial.

I am trying to get this work with docker-compose but I am getting errors since it cannot locate your github directly and searches for Dockerfile. Only way I can get it installed is to download the entire repo and run it locally. Is this the right way?

Also I am getting this error once the install completes

WARNING: Image for service concord2mqtt was built because it did not already exist. To rebuild this image you must use docker-compose build or docker-compose up --build.
Creating concord2mqtt_concord2mqtt_1 ... done
Attaching to concord2mqtt_concord2mqtt_1
concord2mqtt_1 | info: Automation.Concord2Mqtt.Host[0]
concord2mqtt_1 | Concord2Mqtt started at 01/20/2022 22:43:44 -05:00
concord2mqtt_1 | info: Microsoft.Hosting.Lifetime[0]
concord2mqtt_1 | Application started. Press Ctrl+C to shut down.
concord2mqtt_1 | info: Microsoft.Hosting.Lifetime[0]
concord2mqtt_1 | Hosting environment: Production
concord2mqtt_1 | info: Microsoft.Hosting.Lifetime[0]
concord2mqtt_1 | Content root path: /app
concord2mqtt_1 | fail: Automation.Concord2Mqtt.Host[0]
concord2mqtt_1 | Host failed to start home automation server
concord2mqtt_1 | System.DllNotFoundException: Unable to load shared library 'libnserial.so.1' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibnserial.so.1: cannot open shared object file: No such file or directory
concord2mqtt_1 | at RJCP.IO.Ports.Native.Unix.UnsafeNativeMethods.serial_init()
concord2mqtt_1 | at RJCP.IO.Ports.Native.Unix.SerialUnix.serial_init()
concord2mqtt_1 | at RJCP.IO.Ports.Native.UnixNativeSerial..ctor()
concord2mqtt_1 | at RJCP.IO.Ports.SerialPortStream.CreateNativeSerial()
concord2mqtt_1 | at RJCP.IO.Ports.SerialPortStream..ctor()
concord2mqtt_1 | at RJCP.IO.Ports.SerialPortStream..ctor(String port)
concord2mqtt_1 | at RJCP.IO.Ports.SerialPortStream..ctor(String port, Int32 baud, Int32 data, Parity parity, StopBits stopbits)
concord2mqtt_1 | at Automation.Concord.SerialCommunicationDevice.ConfigureSerialPort(String portName) in /src/Concord/Communication Devices/SerialCommunicationDevice.cs:line 73
concord2mqtt_1 | at Automation.Concord.SerialCommunicationDevice..ctor(String portName) in /src/Concord/Communication Devices/SerialCommunicationDevice.cs:line 26
concord2mqtt_1 | at Automation.Concord2Mqtt.Concord2Mqtt..ctor(ILogger logger, Concord2MqttConfiguration settings, ConcordConfiguration concordSettings) in /src/Concord2Mqtt/Concord2Mqtt.cs:line 37
concord2mqtt_1 | at Automation.Concord2Mqtt.Host.b__6_0() in /src/Concord2Mqtt/Host.cs:line 50
concord2mqtt_1 | info: Automation.Concord2Mqtt.Host[0]
concord2mqtt_1 | Failed to start home automation server. Restarting in 5 seconds
concord2mqtt_1 | info: Automation.Concord2Mqtt.Host[0]
concord2mqtt_1 | Concord2Mqtt started at 01/20/2022 22:43:49 -05:00

Connecting via Tcp - stupid question

Hello! This is probably a stupid question, but I'm trying to connect via Tcp. (using an rs232 to ethernet adapter)
BinarySensors are visible in home assistant when running with the "TcpClient" connection, but there are a lot of prints along the lines of, "Panel: Messages have not been recieved from message processor in 10000 ms"

The documentation mentions that both TcpServer and TcpClient should be used in the case of Tcp- does that mean I need to run two instances of this, one as a client and one as a server? and if so, is it possible to run both on the same machine?

below is my appsettings.json, in case that is needed:

  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },

  "Concord2Mqtt": {
    "MQTT": {
      "ClientId": "concord2mqtt",
      "Username": "mqtt-user",
      "Password": "******",
      "Host": "192.168.1.*",
      "Port": "1883",
      "Secure": false
    },
    "Discovery": true,
    "DirectDisarm": false
  },

  "Concord": {
    "TcpAddress": "192.168.1.*",
    "TcpPort": 23,
    "SerialPort": "COM1",
    "Connection": "TcpClient",
    "AutomationUserId": 0,
    "Users": [
      {
        "Name": "Home",
        "Id": 0
      }
    ]
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.