Giter Site home page Giter Site logo

jonvadney / mqtt-concord4 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from automaton82/mqtt-concord4

0.0 1.0 0.0 104 KB

A clone of device-concord4 which was originally for SmartThings via a web-server, this now hosts itself via MQTT and works with Home Assistant.

License: MIT License

Python 99.94% Shell 0.06%

mqtt-concord4's Introduction

MQTT-concord4

This is based off the original device-concord4 here.

Which is forked from the original here.

The original concord4 was made for SmartThings via a web-server. Since SmartThings is now sun-setting classic along with custom DTH UIs, it no longer works.

As such I'm moving to Home Assistant and still want to use this integration. Since MQTT is very easy to use with HA, I've modified the primary server to use MQTT instead of RESTful.

Prerequisites

  • Hardware (Concord 4 or equivalent panel) with a Superbus 2000 automation module attached to it
  • RS232 connection (to the AM panel)
  • Python 2.7
  • Python packages: requests, future, pyserial (pip install), paho-mqtt (pip install)
  • Raspberry Pi (recommended)

Installation

  1. Edit concordsvr_mqtt.conf with your favourite editor, such as nano concordsvr_mqtt.conf

    • Set host to the host of your MQTT, and the port
    • Set mqttuser to the base64 encoded name of the user to login, and mqttpassword to the base64 encoded password of that user
  2. Start the program using python concordsvr_mqtt.py

  3. If desired, it can be started on every boot by using crontab -e and adding:

    • @reboot cd /home/pi/ && ./start_concordsvr &

    Where start_concordsvr contains:

    • #!/bin/bash
    • cd /home/pi/concordsvr/ && python ./concordsvr_mqtt.py

Home Assistant

You can create entities in Home Assistant to represent the various sensors by adding MQTT library to HA, and then editing the configuration.yaml file to include something like:

# MQTT binary sensor
binary_sensor:
    - platform: mqtt
    name: "Front Door"
    state_topic: "concord/zone/1"
    payload_on: "open"
    payload_off: "closed"
    device_class: opening

This adds the front door sensor as an entity you can put on any dashboard.

The alarm entity can be created with the following item in the configuration:

# Alarm setup
alarm_control_panel:
    - platform: mqtt
    state_topic: "concord/alarm"
    command_topic: "concord/alarm/set"
    code_arm_required: false
    code_disarm_required: false

MQTT

The topic listened to is concord/#. The topic to set is:

  • concord/alarm/set

With payloads of:

  • arm_home
  • arm_away
  • disarm

The device will send out messages like:

  • concord/zone/x

Where x is the zone number, like 1. Payload is 'open' or 'closed. It also sends:

  • concord/alarm

With payloads of:

  • armed_home
  • armed_away
  • disarmed

Notes

The previous ST version supported 'loud' as an option for arming / disarming, but I didn't implement that as my panel doesn't support it anyways. If desired it could be added back as the payload for the various topics.

mqtt-concord4's People

Contributors

automaton82 avatar jonvadney avatar

Watchers

 avatar

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.