GithubHelp home page GithubHelp logo

bigthundersr / adt-pulse-mqtt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adt-pulse-mqtt/adt-pulse-mqtt

4.0 3.0 1.0 2.91 MB

Bridge between ADT Pulse and MQTT serrver for use with Home Assistant.

License: MIT License

Shell 2.00% JavaScript 52.35% Java 35.64% Groovy 7.73% Dockerfile 2.29%

adt-pulse-mqtt's Introduction

Home Assistant Add-on Supports aarch64 Architecture Supports amd64 Architecture Supports armhf Architecture

CodeQL Lint Node.js CI Builder

adt-pulse-mqtt

ADT Pulse bridge for Home Assistant using MQTT.

Integrates ADT Pulse with Home Assistant. You can also choose to add the ADT Pulse alarm system and ADT devices to your SmartThings. SmartApp allows automatic running our Routines upon alarm changing states.

Home Assistant Setup

Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.

  • First, add the repository (https://github.com/BigThunderSR/adt-pulse-mqtt) using the Add-on Store in the Home Assistant Supervisor. This is the easiest way to run this add-on, but it can also run as an independent container using Docker. In both cases, communication is through MQTT.
  • Install ADT Pulse MQTT from the store. Don't forget to configure pulse_login with your ADT Pulse Portal username and password. A separate login for Home Assistant is recommended.
  • Configure Add-on Options

ADT Pulse Options

The pulse_login options are:

  • username: The ADT Pulse Portal Username
  • password: The ADT Pulse Portal Password
  • fingerprint: The fingerprint of trusted device authenticated with 2-factor authentication (see below)

2-Factor Authentication

ADT Pulse now requires 2-factor authentication and you will need to provide a device fingerprint:

  1. Open a Chrome browser tab (under Incognito mode)
  2. Open Developer Tools (using Menu โžœ More tools โžœ Developer tools menu or Ctrl+Shift+I)
  3. Click on the Network tab (make sure Preserve log checkbox is checked)
  4. In the filter box, enter signin.jsp?networkid=
  5. Go to https://portal.adtpulse.com or https://portal-ca.adtpulse.com and login to your account
  6. Click Request Code, type in the requested code, and then click Submit Code
  7. Click Trust this device and name the device Homebridge
  8. Click Save and Continue
  9. Click Sign Out in the top right corner of the webpage
  10. Login to your account (once again)
  11. Click on the network call (beginning with signin.jsp?networkid=) appearing in the DevTools window. Select the last one.
  12. In the Payload tab, under Form Data, copy the entire fingerprint (after fingerprint:, do not include spaces)
  13. Paste the copied text into the fingerprint field into your config.json
  14. Close the Chrome window (DO NOT sign out)

MQTT Options

You'll need an MQTT broker. The Mosquitto add-on broker (https://www.home-assistant.io/addons/mosquitto/) is the easiest to implement.

In most cases, only the mqtt_options are needed:

  • mqtt_host: core-mosquitto (if using Mosquitto add-on, otherwise hostname or IP address)
  • mqtt_connection_options:
    • username: MQTT broker username
    • password: MQTT broker password

In most cases, these options are sufficient. Alternatively, the mqtt_url can be specified instead which allows more advanced configurations (see https://www.npmjs.com/package/mqtt#connect).

Home Assistant Configuration

This add-on uses the Home Assistant integrations for MQTT Alarm Control Panel and MQTT Binary Sensor.

To configure these, you must edit your configuration.yaml:

To add the control panel:

mqtt:
   alarm_control_panel:
     - name: "ADT Pulse"
       state_topic: "home/alarm/state"
       command_topic: "home/alarm/cmd"
       payload_arm_home: "arm_home"
       payload_arm_away: "arm_away"
       payload_disarm: "disarm"
       code_arm_required: false  ## Needs to be added starting with HA Core 2024.6 ##

After running the add-on, get a list all the zones found. There are a couple of ways to do this, but they all involve subscribing to the wildcard topic "adt/zones/#".

I recommend the MQTT Snooper app on Android or just use the mosquito command-line command:

# mosquitto_sub -h YOUR_MQTT_IP -v -t "adt/zone/#"

Once you know the names of MQTT topics for your zones, add the following to the configuration.yaml for each zone in binary_sensor:

mqtt:
  binary_sensor:
    - name: "Kitchen Door"
      state_topic: "adt/zone/Kitchen Door/state"
      payload_on: "devStatOpen"
      payload_off: "devStatOK"
      device_class: door
      retain: true

This will provide basic support for door sensors. You can add additional binary sensors for other possible state values. As an example, you can add support for a low battery condition on a sensor.

mqtt:
  binary_sensor:
    - name: "Kitchen Door Sensor Battery"
      state_topic: "adt/zone/Kitchen Door/state"
      payload_on: "devStatLowBatt"
      payload_off: "devStatOK"
      device_class: battery

Note: State topic names come from your Pulse configuration.

The possible state values are:

  • devStatOK (device okay)
  • devStatOpen (door/window opened)
  • devStatMotion (detected motion)
  • devstatLowBatt: (low battery condition)
  • devStatTamper (glass broken or device tamper)
  • devStatAlarm (detected CO/Smoke)
  • devStatUnknown (device offline)

If a device type is not listed, open an issue containing your MQTT dump which lists your zones.

Docker Compose

If you want to run this add-on independently using Docker, here is a sample Docker Compose file:

version: '3'
services:
   pulse-adt-mqtt:
      container_name: pulse-adt-mqtt
      image: bigthundersr/adt-pulse-mqtt
      network_mode: host
      restart: always
      volumes:
       - /local/path/to/config-directory:/data~~

Sample config.json placed in the config-directory:

{
    "pulse_login" : {
        "username": "username",
        "password": "password"
    },
    "mqtt_host" : "mqtt_host"
    "mqtt_connect_options" :  {
      "username" : "username",
      "password" : "password",
      },
    "alarm_state_topic": "home/alarm/state",
    "alarm_command_topic": "home/alarm/cmd",
    "zone_state_topic": "adt/zone",
    "smartthings_topic": "smartthings",
    "smartthings": false
}

Smartthings Support - No Longer Valid Since Smartthings Deprecated Groovy IDE

  • In Hassio, setting of the ADT Pulse MQTT set
"smartthings": true
  • In SmartThings IDE,
  1. add the following devicehandlers: https://github.com/adt-pulse-mqtt/adt-pulse-mqtt/tree/master/devicetypes/haruny/VirtualADTAlarmSystem.src
  2. add the following SmartApp: https://github.com/adt-pulse-mqtt/adt-pulse-mqtt/tree/master/smartapps/haruny/ADTAlarmSmartApp.src
  3. Add your devices using SmartThings IDE. You have to name them the same way they appear in ADT Portal.
  4. Run the SmartApp in your mobile application. Follow the instructions. Do not rename ADT Alarm System device created by the app. Multiple alarm systems/locations is not supported.
  5. In MQTT Bridge app, select all the devices created (Alarm system, contacts, motion etc.)

adt-pulse-mqtt's People

Contributors

bigthundersr avatar digitalcraig avatar haruny avatar dependabot[bot] avatar renovate[bot] avatar e1miran avatar robross0606 avatar

Stargazers

George Wilborn avatar Sava Tshontikidis avatar  avatar  avatar

Watchers

George Wilborn avatar  avatar  avatar

Forkers

robross0606

adt-pulse-mqtt's Issues

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json
Error type: Invalid JSON (parsing failed)
Message: Syntax error: expecting String near ],

"r

Docker: Command not found: /run.sh

I'm not sure exactly when it started but sometime semi recently am seeing this in the logs:

Command not found: /run.sh

Other symptoms are the integration not working. Anyone else seeing this?

Unable to arm or disarm

When attempting to arm 'home' or 'away' I am recieving the following error:

Failed to call service alarm_control_panel/alarm_arm_home. Validation error: Arming requires a code but none was given for alarm_control_panel.adt_pulse

I have attempted to reinstall the addon but it came with the same error.
I couldnt find any existing issues that reference error.
I saw something with SAT codes but I am unaware what that is for or where to provide such a code in the configuration files if needed.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm q Unavailable
npm request Unavailable

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile
adt-pulse-mqtt-test/Dockerfile
adt-pulse-mqtt/Dockerfile
adt-pulse-mqtt/Dockerfile-aarch64
  • balenalib/aarch64-alpine 3.18-run
adt-pulse-mqtt/Dockerfile-amd64
  • balenalib/amd64-alpine 3.18-run
adt-pulse-mqtt/Dockerfile-armhf
  • balenalib/armv7hf-alpine 3.18-run
x-adt-pulse-mqtt-test-alpha/Dockerfile
x-adt-pulse-mqtt-test-alpha/Dockerfile-aarch64
  • balenalib/aarch64-alpine 3.18-run
x-adt-pulse-mqtt-test-alpha/Dockerfile-amd64
  • balenalib/amd64-alpine 3.18-run
x-adt-pulse-mqtt-test-alpha/Dockerfile-armhf
  • balenalib/armv7hf-alpine 3.18-run
github-actions
.github/workflows/builder.yaml
  • actions/checkout v4
  • jitterbit/get-changed-files v1
  • actions/checkout v4
  • docker/login-action v3
  • home-assistant/builder 2024.03.5
.github/workflows/codeql.yml
  • actions/checkout v4
  • github/codeql-action v3
  • github/codeql-action v3
  • github/codeql-action v3
.github/workflows/docker-publish-aarch64.yml
  • actions/checkout v4
  • actions/checkout v4
  • docker/metadata-action v5
  • docker/setup-qemu-action v3
  • docker/setup-buildx-action v3
  • docker/login-action v3
  • docker/login-action v3
  • docker/build-push-action v6
.github/workflows/docker-publish-amd64.yml
  • actions/checkout v4
  • actions/checkout v4
  • docker/metadata-action v5
  • docker/setup-qemu-action v3
  • docker/setup-buildx-action v3
  • docker/login-action v3
  • docker/login-action v3
  • docker/build-push-action v6
.github/workflows/docker-publish-armhf.yml
  • actions/checkout v4
  • actions/checkout v4
  • docker/metadata-action v5
  • docker/setup-qemu-action v3
  • docker/setup-buildx-action v3
  • docker/login-action v3
  • docker/login-action v3
  • docker/build-push-action v6
.github/workflows/docker-publish.yml
  • actions/checkout v4
  • actions/checkout v4
  • docker/metadata-action v5
  • docker/setup-qemu-action v3
  • docker/setup-buildx-action v3
  • docker/login-action v3
  • docker/login-action v3
  • docker/build-push-action v6
.github/workflows/lint.yaml
  • actions/checkout v4.1.7
  • actions/checkout v4.1.7
  • frenck/action-addon-linter v2.15
.github/workflows/node.js.yml
  • actions/checkout v4
  • actions/setup-node v4
npm
adt-pulse-mqtt-test/package.json
  • cheerio ^1.0.0-rc.12
  • glob-parent ^6.0.2
  • lodash ^4.17.21
  • mqtt ^5.7.3
  • q ~1.5.1
  • request 2.88.2
  • tough-cookie ^4.1.4
  • chai ^4.4.1
  • chai-as-promised ^7.1.2
  • chai-spies ^1.1.0
  • coveralls ^3.1.1
  • mocha ^10.6.0
  • mocha-lcov-reporter ^1.3.0
  • nock ^13.5.4
  • nyc ^17.0.0
  • rewire ^7.0.0
adt-pulse-mqtt/package.json
  • cheerio ^1.0.0-rc.12
  • glob-parent ^6.0.2
  • lodash ^4.17.21
  • mqtt ^5.8.0
  • q ~1.5.1
  • request 2.88.2
  • tough-cookie ^4.1.4
  • chai ^4.4.1
  • chai-as-promised ^7.1.2
  • chai-spies ^1.1.0
  • coveralls ^3.1.1
  • mocha ^10.6.0
  • mocha-lcov-reporter ^1.3.0
  • nock ^13.5.4
  • nyc ^17.0.0
  • rewire ^7.0.0
x-adt-pulse-mqtt-test-alpha/package.json
  • cheerio ^1.0.0-rc.12
  • glob-parent ^6.0.2
  • lodash ^4.17.21
  • mqtt ^5.7.3
  • q ~1.5.1
  • request 2.88.2
  • tough-cookie ^4.1.4
  • chai ^4.4.1
  • chai-as-promised ^7.1.2
  • chai-spies ^1.1.0
  • coveralls ^3.1.1
  • mocha ^10.6.0
  • mocha-lcov-reporter ^1.3.0
  • nock ^13.5.4
  • nyc ^17.0.0
  • rewire ^7.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

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.