Skip to content

Commit

Permalink
Initial public repo commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kmalinich committed Nov 1, 2021
1 parent 1ccb75f commit 2fd4f09
Show file tree
Hide file tree
Showing 21 changed files with 3,961 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
*.bak
*.json
*.log
*.md
*.sh
*.swo
*.swp
*.txt
.DS_Store
._*

/.git
/node_modules

/LICENSE
/README.md

/test

/buffer-test-data.js
/device.js
215 changes: 215 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
# Automatically handle line endings for text files
# Leave all files detected as binary untouched
# This handles all files NOT found below
* text=auto


# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.3gp binary
*.3gpp binary
*.7z binary
*.ai binary
*.as binary
*.asf binary
*.asx binary
*.bmp binary
*.db binary
*.eot binary
*.eps binary
*.exe binary
*.fla binary
*.flv binary
*.gif binary
*.gz binary
*.ico binary
*.jar binary
*.jng binary
*.jp2 binary
*.jpeg binary
*.jpg binary
*.jpx binary
*.jxr binary
*.kar binary
*.m4a binary
*.m4v binary
*.mid binary
*.midi binary
*.mng binary
*.mov binary
*.mp3 binary
*.mp4 binary
*.mpeg binary
*.mpg binary
*.node binary
*.o binary
*.ogg binary
*.ogv binary
*.otf binary
*.p binary
*.pdf binary
*.phar binary
*.pkl binary
*.png binary
*.psb binary
*.psd binary
*.pyc binary
*.pyd binary
*.pyo binary
*.ra binary
*.rar binary
*.svgz binary
*.swc binary
*.swf binary
*.tar binary
*.tif binary
*.tiff binary
*.ttf binary
*.wbmp binary
*.webm binary
*.webp binary
*.woff binary
*.woff2 binary
*.xz binary
*.zip binary

# crlf = Windows
# lf = Linux/Unix/macOS 10+

# These files are text and should be normalized (Convert crlf => lf)
*.bat text eol=crlf
*.bnf text
*.bowerrc text
*.bsd text
*.c text
*.cc text
*.cnf text
*.coffee text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.conf text
*.config text
*.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.csv text
*.d text
*.def text
*.df text
*.dockerignore text
*.dot text
*.dts text
*.ejs text
*.el text
*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.gnu text
*.gyp text
*.gypi text
*.h text
*.haml text
*.handlebars text
*.hbs text
*.hbt text
*.htm text
*.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
*.in text
*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.info text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.ini text
*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.jade text
*.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.jst text
*.jsx text
*.latte text
*.less text
*.log text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.ls text
*.map text
*.markdown text
*.md text
*.mdown text
*.mdtxt text
*.mdwn text
*.mit text
*.mk text
*.mkd text
*.mkdn text
*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.mount text
*.mustache text
*.njk text
*.npmignore text
*.od text
*.opts text
*.patch text
*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.phtml text
*.pl text
*.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.pxd text
*.py text
*.py3 text
*.pyw text
*.pyx text
*.rb text
*.sass text
*.scm text
*.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.scss text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.styl text
*.svg text
*.tag text
*.tagx text
*.tap text
*.targ text
*.test text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.tld text
*.tmpl text
*.tpl text
*.trc text
*.ts text
*.tsx text
*.twig text
*.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.xhtml text
*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.yaml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*COPYRIGHT* text
*README* text
.babelrc text
.browserslistrc text
.csslintrc text
.editorconfig text
.eslintignore text
.eslintrc text
.gitattributes text
.gitconfig text
.gitignore text
.gitmodules text
.htaccess text
.htmlhintrc text
.jscsrc text
.jshintignore text
.jshintrc text
.slugignore text
.stylelintrc text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
Dockerfile text
INSTALL text
LICENSE text
Makefile text
NEWS text
Procfile text
TODO text
browserslist text
copyright text
license text
makefile text
readme text
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*.bak
*.log
*.swo
*.swp
._*
.DS_Store

/*.json

/json.bak/
/log/
/node_modules/
/test/
63 changes: 63 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,65 @@
# iris2mqtt

Lowe's Iris Gen1 to MQTT/Home Assistant adapter application

* Uses MQTT autodiscovery with Home Assistant
* Works with:
* Alarm keypads
* Key presses are transmitted as HA events via the HA event API
* Door sensors
* Contact sensor state
* Temperature
* Battery level/voltage
* RSSI
* Motion sensors
* Motion sensor state
* Temperature
* Battery level/voltage
* RSSI
* Power plugs
* On/off state (and control)
* RSSI
* Add your sensor/switch/plug Zigbee remote64 identifiers and names as object keys
under .nodeNames as shown in the config example below
* Also, yes, this needs more documentation

## Example config.json

```json
{
"api": {
"port": 1376
},
"homeassistant": {
"host": "https://ha.localdomain",
"ignoreCert": false,
"port": 8123,
"token": "TOKEN"
},
"mqtt": {
"clientId": "iris2mqtt",
"server": "mqtt.localdomain"
},
"nodeNames": {
"000d6f00024c2cc9": "Garage motion sensor",
"000d6f000258985d": "Kitchen back yard entry door sensor",
"000d6f00028f3f4d": "Living room A sensor",
"000d6f0003b314f2": "Front room A sensor",
"000d6f0003bbf44d": "Stairwell motion sensor",
"000d6f0003bc4ffb": "Living room motion sensor",
"000d6f0003bc5844": "Front room motion sensor",
"000d6f0003bc59cd": "Kitchen motion sensor"
},
"temperatureOffset": {
"000d6f00024c2cc9": -2,
"000d6f000258985d": -2,
"000d6f00028f3f4d": -1.7798788888799895,
"000d6f0003b314f2": -2
},
"xbee": {
"apiMode": 2,
"baudRate": 115200,
"port": "/dev/ttyUSB0"
}
}
```
8 changes: 8 additions & 0 deletions api-cmds.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

SCRIPT="$(realpath "${0}")"
SCRIPT_PATH="$(dirname "${SCRIPT}")"

API_JS="${SCRIPT_PATH}/api.js"

grep -Eo "app\..*.\('.*.'" "${API_JS}" | grep -Ev '\.all\(' | sed -e 's/app\.//g' -e 's/get(/GET\ \ /g' -e 's/post(/POST\ /g'
Loading

0 comments on commit 2fd4f09

Please sign in to comment.