-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Joe Krill
committed
Oct 22, 2018
0 parents
commit 5aec7e1
Showing
49 changed files
with
17,514 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#root = true | ||
|
||
[*] | ||
indent_style = space | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
max_line_length = 100 | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
node_modules | ||
coverage | ||
.nyc_output | ||
.DS_Store | ||
*.log | ||
.vscode | ||
.idea | ||
dist | ||
compiled | ||
.awcache | ||
.rpt2_cache | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
language: node_js | ||
branches: | ||
only: | ||
- master | ||
- /^greenkeeper/.*$/ | ||
cache: | ||
yarn: true | ||
directories: | ||
- node_modules | ||
notifications: | ||
email: false | ||
node_js: | ||
- node | ||
script: | ||
- npm run test:prod && npm run build | ||
after_success: | ||
- npm run report-coverage | ||
- npm run deploy-docs | ||
- npm run semantic-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright 2017 Joe Krill <joe@joekrill.com> | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# elk-connect | ||
|
||
A module for connecting to an [Elk M1](https://www.elkproducts.com/product-catalog/m1-gold-cross-platform-control) security system over a TCP connection. | ||
|
||
|
||
### Usage | ||
|
||
Install with NPM or Yarn | ||
|
||
``` | ||
npm install elk-client | ||
// or | ||
yarn add elk-client | ||
``` | ||
|
||
``` | ||
import { ElkClient } from 'elk-client'; | ||
// Parse a message | ||
const client = new ElkClient('elkm1s://someuser:supersecretpassword@192.168.0.251?timeout=30'); | ||
client | ||
.connect() | ||
.then(() => client.getArmingStatus()) | ||
.then((armingStatus) => { | ||
const area1 = armingStatus.getAreaStatus(1); | ||
console.log('Area 1 status:', ArmingLevel[area1.armingLevel]) | ||
}) | ||
.then(() => client.disconnect()) | ||
.then(() => { | ||
console.log('Done!'); | ||
}) | ||
.catch((err) => { | ||
console.error(err); | ||
}); | ||
``` |
Oops, something went wrong.