{"_id":"elkington","_rev":"12-a894520305ac9c714786bd42e06d2413","name":"elkington","description":"A node.js module for interfacing with the Elk M1 Gold automation controller","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.1-alpha":{"author":{"name":"Kevin O'Hara","email":"kevinohara80@gmail.com"},"name":"elkington","description":"A node.js module for interfacing with the Elk M1 Gold automation controller","keywords":["elk","home","automation","security","hardware","m1","m1xep","elkm1","home"],"version":"0.0.1-alpha","repository":{"type":"git","url":"git://github.com/kevinohara80/elkington.git"},"main":"index.js","engines":{"node":"~0.6.7"},"dependencies":{"safereturn":"*"},"devDependencies":{"mocha":"*","should":"*"},"scripts":{"test":"mocha --reporter spec"},"bugs":{"url":"http://github.com/kevinohara80/elkington/issues"},"license":"MIT","_id":"elkington@0.0.1-alpha","dist":{"shasum":"fdec1cdcf0af92030443b2c8cc0860d3cdf03265","tarball":"https://registry.npmjs.org/elkington/-/elkington-0.0.1-alpha.tgz","integrity":"sha512-b4CURa3jq6rKhzWaaULzUH6PoW4weOZiYv4uOjXavvfAg6Ilz4XQzxa0ri8rGk7bnGXt/5326wWuimVoPAK37w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJpU/cFSFVUlyznb/JC+62oMRCgrxcPFAeBxP35mCniwIgMX/E+b5cpKZ5Rq2+PhQeCeOHPmFVUbkDaAUEfdIQeFI="}]},"maintainers":[{"name":"kevinohara80","email":"kevinohara80@gmail.com"}]},"0.0.1":{"author":{"name":"Kevin O'Hara","email":"kevinohara80@gmail.com"},"name":"elkington","description":"A node.js module for interfacing with the Elk M1 Gold automation controller","keywords":["elk","home","automation","security","hardware","m1","m1xep","elkm1","home"],"version":"0.0.1","repository":{"type":"git","url":"git://github.com/kevinohara80/elkington.git"},"main":"index.js","engines":{"node":">0.6.x"},"dependencies":{"safereturn":"*"},"devDependencies":{"mocha":"*","should":"*"},"scripts":{"test":"mocha --reporter spec"},"bugs":{"url":"http://github.com/kevinohara80/elkington/issues"},"license":"MIT","_id":"elkington@0.0.1","dist":{"shasum":"69109e8432f306c6cbb871ba063e79e520951de7","tarball":"https://registry.npmjs.org/elkington/-/elkington-0.0.1.tgz","integrity":"sha512-w6X+lEBND7wQPuxMasQJ4oVVfvnl41LFkYDoV0SI0FGPQGpTbCWZ77sNLEwLC7Sn9MmE3L7OfbOFAiZh6mLS8g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqd4cGegpityQB5mcalGIje7HGO8KLF9J7XdeLG29c6gIgDh/qFE3f4DNmCGuLvsRzhcyGHHEC/lL0n+3Q/ZvmsGY="}]},"maintainers":[{"name":"kevinohara80","email":"kevinohara80@gmail.com"}]},"0.0.2":{"author":{"name":"Kevin O'Hara","email":"kevinohara80@gmail.com"},"name":"elkington","description":"A node.js module for interfacing with the Elk M1 Gold automation controller","keywords":["elk","home","automation","security","hardware","m1","m1xep","elkm1","home"],"version":"0.0.2","repository":{"type":"git","url":"git://github.com/kevinohara80/elkington.git"},"main":"index.js","engines":{"node":">0.6.x"},"dependencies":{"safereturn":"*"},"devDependencies":{"mocha":"*","should":"*"},"scripts":{"test":"mocha --reporter spec"},"bugs":{"url":"http://github.com/kevinohara80/elkington/issues"},"license":"MIT","_id":"elkington@0.0.2","dist":{"shasum":"9a422e48d46cab99c203cf0bc837dfbed8be1254","tarball":"https://registry.npmjs.org/elkington/-/elkington-0.0.2.tgz","integrity":"sha512-tLpVKNkpcAZq5/+ZPxgBZWwoPPVG5/HGKRyP7xrgLwo+G2f8XbUSFeXg/ddkG+Gmk+GhizjyX94tD1L48z3UkA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEmJlsXvDDk8AVQsGdP73ysjN64iwNYUiF/ViyCoJyLAAiEA9hVdG45BINX6n2yqoHqmbKXS5wd++1wskIj3+OjqTa0="}]},"maintainers":[{"name":"kevinohara80","email":"kevinohara80@gmail.com"}]},"0.1.0":{"author":{"name":"Kevin O'Hara","email":"kevinohara80@gmail.com"},"name":"elkington","description":"A node.js module for interfacing with the Elk M1 Gold automation controller","keywords":["elk","home","automation","security","hardware","m1","m1xep","elkm1","home"],"version":"0.1.0","repository":{"type":"git","url":"git://github.com/kevinohara80/elkington.git"},"main":"index.js","engines":{"node":">0.6.x"},"dependencies":{"safereturn":"*"},"devDependencies":{"mocha":"*","should":"*"},"scripts":{"test":"mocha --reporter spec"},"bugs":{"url":"http://github.com/kevinohara80/elkington/issues"},"license":"MIT","gitHead":"80bc9cc77faeee2a8ce22c0c12a2c73023044131","homepage":"https://github.com/kevinohara80/elkington","_id":"elkington@0.1.0","_shasum":"9ccb2a091d1715c81374b66d5460a29d6cfe2391","_from":".","_npmVersion":"2.1.12","_nodeVersion":"0.10.33","_npmUser":{"name":"kevinohara80","email":"kevinohara80@gmail.com"},"maintainers":[{"name":"kevinohara80","email":"kevinohara80@gmail.com"}],"dist":{"shasum":"9ccb2a091d1715c81374b66d5460a29d6cfe2391","tarball":"https://registry.npmjs.org/elkington/-/elkington-0.1.0.tgz","integrity":"sha512-EfOlUW567yXHHCxXv5kM2q9xVwkwIV5zYTL9K8AvUNs7hloQvQRaDhm7t/MyvR6N0GftU/jheRVER8syxMigXw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDMWgonsEtZHjVEb1qbNZGHKCc8oZY/jgb7cYjfvXKDpAIgYVm4OH0V6urrePYrNBiIv297Gly8IkPsT3Ga4zO+c3k="}]}}},"readme":"# elkington\n\n[![build status](https://secure.travis-ci.org/kevinohara80/elkington.png)](http://travis-ci.org/kevinohara80/elkington)\n\n**elkington** is a node.js module for interfacing with the [Elk M1 Gold](http://www.elkproducts.com/product-catalog/m1-gold-cross-platform-control) automation controller. \n\n**This is currently experimental and under development. Not all Elk messages are currently being parsed.**\n\n## Features\n\n* Simple API with function calls for Elk commands\n* Supports many Elk commands\n* Supports both secure and non-secure communication ports\n\n## Usage\n\nTo get started, call `createConnection()` to create a new connection and register some event handlers:\n\n```javascript\nvar elkington = require('elkington');\n\n/// create a connection\nvar elk = elkington.createConnection({ \n  port: 2101, \n  host: '192.168.1.13' \n});\n\n// register event handlers\nelk.on('any', function(msg){\n  console.log('Incoming message: ' + msg.message);\n});\n```\n\nOr a secure connection can be established...\n\n```javascript\n/// create a connection\nvar elk = elkington.createConnection({ \n  port: 2601, \n  host: 'myelk.myhouse.com',\n  username: 'somebody',\n  password: 'yoyoyo',\n  useSecure: true \n});\n```\n\n### Handling events\n\n**elkington** provides a lot of commands. Some of the commands will invoke a response from the controller. You can optionally pass in a callback to these commands.\n\n```javascript\nelk.alarmByZoneRequest(function(err, resp){\n  if(err) {\n    console.log(err.message);\n  } else {\n    console.log('Got the alarm by zone response');\n  }\n});\n```\n\nOr you can listen for the response in a separate event handler and just call the method.\n\n```javascript\n// AZ is the message type for 'Alarm by Zone Reply'\nelk.on('AZ', function(msg) {\n  console.log('area1 arm status: ' + msg.data.area1.armStatus);\n});\n\nelk.alarmByZoneRequest();\n```\n\n### Speaking\n\nThe Elk M1 has a large library of words that it can say over it's speaker. With the **elkington** `speak()` function, you can make your Elk say all kinds of wacky (or useful) stuff...\n\n```javascript\nelk.speak('defective hottub pump');\n```\n\n...now something more useful:\n\n```javascript\nvar elkington = require('elkington');\nvar request = require('request');\nvar elk = elkington.createConnection({ port: 2101 , host: '192.168.1.13'});\n\nelk.on('connect', function() {\n  \n  // say the outside temp on connection to the Elk\n  var opts = {\n    url: 'http://query.yahooapis.com/v1/public/yql',\n    qs: {\n      q: 'select item from weather.forecast where location = \"48307\"',\n      format: 'json'\n    }\n  };\n  \n  request(opts, function(error, response, body) {\n    if(!error) {\n      var temp = JSON.parse(body).query.results.channel.item.condition.temp.toString();    \n      elk.speak('outside temperature is ' + temp + ' degrees');\n    }\n  });\n  \n}); \n```\n\nThe speak function can even interpret numerical values\n\n```javascript\n// speaker says 'two thousand twelve'\nelk.speak('2012');\n```\n\n## Event API\n\n### on(event, callback) \n\nRegister an event listener.\n\n## Arm/Disarm API\n\n### disarm([callback])\n\nDisarm the Elk. Callback is optional.\n\n### armAway([options])\n\nArm the Elk in Away Mode.\n\n### armStay([options])\n\nArm the Elk in Stay Mode.\n\n### armStayInstant([options])\n\nArm the Elk in Stay Mode instantaneously.\n\n### armNight([options])\n\nArm the Elk in Night Mode.\n\n### armNightInstant([options])\n\nArm the Elk in Night Mode instantaneously.\n\n### armVacation([options])\n\nArm the Elk in Vacation Mode.\n\n### armStepAway([options])\n\nArm and step to next Away mode\n\n### armStepStay([options])\n\nArm and step to next Stay mode\n\n### armingStatusRequest([callback])\n\nRequest the arming statuses for all areas. Callback is optional. The callback returns the results of the Arming Status Response sent by the Elk.\n\n## Events\n\n**elkington** can emit the following events. With the exception of the utility `any` event, the events use the same two-character, uppercase codes from the Elk RS-232 ASCII protocol:\n\n* `any`: Any message from the Elk\n* `AR`: Alarm Reporting to Ethernet\n* `AS`: Arming status report data\n* `AT`: Ethernet Test to IP\n* `AZ`: Alarm by zone reply\n* `CC`: Control output change update\n* `CR`: Custom value report data\n* `CS`: Control output status report data\n* `CU`: Change user code reply\n* `CV`: Counter Value Data\n* `DS`: Lighting Poll Response\n* `DK`: Display KP LCD Data\n* `EM`: Email Trigger to M1XEP\n* `IC`: Send invalid user code digits\n* `IE`: Installer program exited\n* `IP`: M1XSP Insteon Program\n* `IR`: M1XSP Insteon Read\n* `KA`: Keypad areas report data\n* `KC`: Keypad key change update\n* `KF`: Function key pressed data\n* `LD`: Log data with index\n* `LW`: Reply temperature data\n* `PC`: PLC change update\n* `PS`: PLC status report data\n* `RE`: Reset Ethernet Module\n* `RP`: ELKRP connected\n* `RR`: Real Time Clock Data\n* `SD`: Text string description report data\n* `SS`: System Trouble Status data\n* `ST`: Temperature report data\n* `TC`: Task change update\n* `TR`: Thermostat data report\n* `UA`: User code areas report data\n* `VN`: Reply Version Number of M1\n* `XB`: reserved by ELKRP\n* `XK`: Request Ethernet test\n* `ZB`: Zone bypass report data\n* `ZC`: Zone change update\n* `ZD`: Zone definition report data\n* `ZP`: Zone partition report data\n* `ZS`: Zone status report data\n* `ZV`: Zone analog voltage data\n\n## Words\n\nThe **elkington** `speak()` function supports the following words:\n\n*custom1, custom2, custom3, custom4, custom5, custom6, custom7, custom8, custom9, custom10, zero, one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eighteen, nineteen, twenty, thirty, forty, fifty, sixty, seventy, eighty, ninety, hundred, thousand, silence200ms, silence500ms, tone800hz, a, access, acknowledged, ac_power, activate, activated, active, adjust, air, alarm, alert, all, am, an, and, answer, any, are, area, arm, armed, at, attic, audio, auto, authorized, automatic, automation, auxiliary, away, b, back, barn, basement, bathroom, battery, bedroom, been, bell, bottom, break, breakfast, bright, building, burglar, button, by, bypassed, cabinet, call, camera, cancel, carbon_monoxide, card, center, central, change, check, chime, circuit, clear, closed, closet, code, cold, condition, connect, control, cool, cooling, corner, crawlspace, danger, day, deck, decrease, defective, degrees, delay, den, denied, detected, detector, device, dial, dialing, dim, dining_room, disable, disarm, disarmed, dock, door, doors, down, driveway, east, emergency, enable, end, energy, enrollment, enter, entering, entertainment, enter_the, entry, environment, equipment, error, evacuate, event, exercise, expander, exit, exterior, f, fail, failure, family_room, fan, feed, fence, fire, first, flood, floor, followed, force, fountain, foyer, freeze, front, full, furnace, fuse, game, garage, gas, gate, glass, go, good, goodbye, great, group, guest, gun, hall, hallway, hanging_up, hang_up, has, has_expired, have, hear_menu_options, heat, help, high, hold, home, hot, hottub, house, humidity, hvac, if, immediately, in, inches, increase, inner, input, inside, instant, interior, in_the, intruder, intruder_message, intrusion, invalid, is, is_about_to_expire, is_active, is_armed, is_canceled, is_closed, is_disarmed, is_low, is_off, is_ok, is_on, is_open, jacuzzi, jewelry, keep, key, keypad, kitchen, lamp, laundry, lawn, leak, leave, left, less, level, library, light, lights, line, living_room, loading, lobby, location, lock, low, lower, m, machine, mail, main, mains, manual, master, max, media, medical, medicine, memory, menu, message, middle, minute, missing, mode, module, monitor, more, motion, motor, next, night, no, normal, north, not, notified, now, number, nursery, of, off, office, oh, ok, on, online, only, open, operating, option, or, other, out, outlet, output, outside, over, overhead, panel, panic, parking, partition, patio, pause, perimeter, personal, phone, place, play, please, plus, pm, police, pool, porch, port, pound, pounds, power, press, pressure, problem, program, protected, pump, radio, raise, ready, rear, receiver, record, recreation, relay, remain_calm, remote, repeat, report, reporting, reset, restored, return, right, roof, room, running, safe, save, screen, second, secure, security, select, sensor, serial, service, set, setback, setpoint, setting, shed, shipping, shock, shop, shorted, shunted, side, silence, siren, sliding, smoke, someone, south, spare, speaker, sprinkler, stairs, stairway, star, start, status, stay, stock, stop, storage, storm, studio, study, sump, sun, switch, system, tamper, tank, task, telephone, television, temperature, test, thank_you, that, the, theater, thermostat, third, time, toggle, top, transformer, transmitter, trespassing, trouble, turn, twice, type, under, unit, unlocked, unoccupied, up, user, utility, vacation, valve, video, violated, visitor, wake_up, walk, wall, warehouse, warning, water, way, welcome, west, what, when, where, will, window, windows, with, work, yard, year, you, zone, zones*\n\n## Links\n\n- [Elk RS-232 ASCII Protocol](http://www.scribd.com/doc/50097012/Elk-m1-Rs232-Protocol)\n\n## Todo\n\n- Oh, man. Where do I start.\n\n","maintainers":[{"name":"kevinohara80","email":"kevinohara80@gmail.com"}],"time":{"modified":"2022-06-16T08:50:07.332Z","created":"2012-08-05T02:36:13.276Z","0.0.1-alpha":"2012-08-05T02:36:13.908Z","0.0.1":"2012-08-23T13:46:44.344Z","0.0.2":"2012-08-23T14:23:06.705Z","0.1.0":"2015-01-18T18:47:39.296Z"},"author":{"name":"Kevin O'Hara","email":"kevinohara80@gmail.com"},"repository":{"type":"git","url":"git://github.com/kevinohara80/elkington.git"},"users":{"kevinohara80":true},"homepage":"https://github.com/kevinohara80/elkington","keywords":["elk","home","automation","security","hardware","m1","m1xep","elkm1","home"],"bugs":{"url":"http://github.com/kevinohara80/elkington/issues"},"license":"MIT","readmeFilename":"README.md"}