Giter Site home page Giter Site logo

bryan-bartow / homebridge-alarm.com Goto Github PK

View Code? Open in Web Editor NEW
42.0 19.0 11.0 83 KB

Alarm.com plugin for Homebridge

License: ISC License

JavaScript 100.00%
homebridge alarmdotcom alarm locks lights homekit home-automation homebridge-plugin homebridge-alarm

homebridge-alarm.com's People

Contributors

andrewmattie avatar bryanbartow avatar jdshkolnik avatar mkormendy avatar rcaslis avatar yungsters avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-alarm.com's Issues

HomeKit/iCloud door lock state does not update after manual change

Hi,
First, THANK YOU for homebridge. This is truly a great project and because of its success I have launched into my first weeks of home automation.

Question: Does the alarm.com plugin periodically query the alarm.com device status and push the state to iCloud, or is it basically on demand when iCloud/HomeKit asks for the state?

Why I'm asking: (and I apologize for the lengthy explanation but I wanted to provide as much detail as possible).

When I manually lock or unlock the door, it seems the updated state isn't automatically making it back to iCloud because my triggers don't fire.

However, if I open a HomeKit enabled app to check the state of the door lock, it will do a refresh of the lock and after it discovers the new state, the trigger fires within seconds. The trigger won't fire until I open the Home app on my phone. At this point I'm pretty sure my phone is controlling all of the automation, even though I have an AppleTV, and here's why.

(I have an AppleTV in the house and Siri commands work over LTE when not connected to WiFi, so I know HomeKit is working on it. I expected that the AppleTV and the magic of iCloud would manage the triggers without needing my phone to provide the automation of the triggers. Unfortunately, with my phone completely powered off, this is not the case and the trigger never fires until my phone is powered back on. So at this point I'm sure that the AppleTV is just the means to get the device status to/from my phone where the triggers are stored and executed.)

Now, to the part where I'm wondering if something is missing with the alarm.com plugin or homebridge itself. I have a Hue bridge at home to control the lighting. To examine the difference between a trigger initiated by a light vs. initiated by a door lock I created two triggers, on fires when the light turns off, and another fires when the door is unlocked. Each time I turn the hue light off, the trigger fires within a couple of seconds. When I lock the door (manually), the lock trigger does not fire until I launch the HomeKit enabled app and it refreshes the state of the door lock.

One difference is that the light turning "off" is via a smart switch that talks to the Hue hub, so I assume the hub is pushing an update to iCloud/HomeKit that is pushed to my phone for the trigger to fire. Again, if my phone is powered off, nothing happens, so I assume this has something to do with the state of the bulb being pushed to my phone for to execute the trigger. When my phone is powered on, it fires every time. When I change the door lock, no trigger unless I open the Home app on my phone and it refreshes the lock state.

One thought I had was that the alarm.com site wasn't updating, so I logged in and it always shows the correct door lock state, so the website has the update, but still no trigger fires.

So based on this testing, it seems like there is no periodic polling of the alarm.com device states. Is this correct? Have I been driving myself crazy trying to make something work when it's actually just not a feature that is implemented (polling)?

TypeError Message loading Homebridge

I get a TypeError message when loading homebridge. It says "Cannot read property "indexOf" of undefined at API.platform... I followed the Readme instructions. Signed up for wrapapi account. As for the bookmarking, I clicked each link you listed in WrapAPI Calls section and when the website opened i selected bookmark, i did not touch any of the fields, is that correct? After that, i generated a new API key. As for the config file, i have a panel, but no lights and locks so I changed those to false. My appologies if this is something minor, this is my first raspberry pi and my first time with homebridge. There's more to the error message if that might help you assist me. I attached a photo of the error message.
img_1980

Plugin crashes when user doesn't have locks

The plugin gives the following error on Homebridge startup if the user does not have locks associated with him/her account:

Error while registering accessories: TypeError: Cannot read property 'map' of undefined

This causes the plugin to crash and, therefore, the security panel does not get registered nor does it show up in HomeKit control app(s).

Homebridge launches and fails after alarm attempt

Everything appears to start start normally and then wen i try to access the Security Panel, Homebridge crashes and I get this:
[4/10/2016, 5:02:41 PM] [Security Panel] getting sessionUrl
/opt/local/lib/node_modules/homebridge-alarmdotcom/index.js:53
this.sessionUrl = json.data.sessionUrl;
^

TypeError: Cannot read property 'sessionUrl' of undefined
at AlarmcomAccessory. (/opt/local/lib/node_modules/homebridge-alarmdotcom/index.js:53:34)
at Request.self.callback (/opt/local/lib/node_modules/homebridge-alarmdotcom/node_modules/request/request.js:200:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request. (/opt/local/lib/node_modules/homebridge-alarmdotcom/node_modules/request/request.js:1041:10)
at emitOne (events.js:82:20)
at Request.emit (events.js:169:7)
at IncomingMessage. (/opt/local/lib/node_modules/homebridge-alarmdotcom/node_modules/request/request.js:968:12)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)

any ideas?

homebridge module not getting past startup

Getting error when starting homebridge. Looks to be an issue within the code. Possibly issue dependency?

==> launch.err.txt <==
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.runMain (module.js:590:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3

==> launch.out.txt <==
[2/24/2017, 11:05:04 PM] Loaded config.json with 0 accessories and 4 platforms.
[2/24/2017, 11:05:04 PM] ---
[2/24/2017, 11:05:04 PM] Loading 4 platforms...
[2/24/2017, 11:05:04 PM] [Homebridge Server] Initializing Server platform...
[2/24/2017, 11:05:04 PM] [Alarm] Initializing Alarmdotcom platform...

Error while getting light devices: TypeError: Cannot read property 'map' of undefined

When booting up Homebridge with this plugin, there are two "devices" that are unable to get detected. They are the "light" and "lock" devices. I assume they relate to the WrapAPI endpoints. If that's so, there are no WrapAPI endpoints that contain those words exactly, which could explain why this plugin is attempting to access something that is assumed to exist.

[1/19/2017, 10:11:39 AM] Loaded plugin: homebridge-alarmdotcom                                                        
[1/19/2017, 10:11:39 AM] Registering platform 'homebridge-alarmdotcom.Alarmdotcom'                              
[1/19/2017, 10:11:39 AM] ---                                                                                           
[1/19/2017, 10:11:39 AM] Loaded config.json with 0 accessories and 1 platforms.                                        
[1/19/2017, 10:11:39 AM] ---                                                                                           
[1/19/2017, 10:11:39 AM] Loading 1 platforms...                                                                        
[1/19/2017, 10:11:39 AM] [Entrance alarm] Initializing Alarmdotcom platform...                                         
[1/19/2017, 10:11:39 AM] Loading 0 accessories...                                                                      
[1/19/2017, 10:11:43 AM] [Entrance alarm] Error while getting light devices: TypeError: Cannot read property 'map' of undefined                                                                                                               
[1/19/2017, 10:11:43 AM] [Entrance alarm] Error while getting lock devices: TypeError: Cannot read property 'map' of undefined                                                                                                                
[1/19/2017, 10:11:43 AM] [Entrance alarm] Initializing platform accessory 'Alarm.com Entrance alarm'...

Help needed

Hi,

Hoping someone can help me with some basic install issues.

I have followed each step on this page:
https://www.npmjs.com/package/homebridge-alarmdotcom
including this:
https://www.npmjs.com/package/homebridge-alarmdotcom/tutorial

other then some install permissions, it seems to have installed fine after these:
npm install -g homebridge
npm install -g homebridge-alarmdotcom
no errors reported.

the part that is confusing to me is where to I put config.json file.
it says it has to be ~/.homebridge/config.json

without it, it does not complain, nor any error messages. I then tried to create a .homebridge folder, but found it odd to have to manually create it.

Is this folder supposed to be automatically installed or do I have to create it?

Then inside the config.json file do I just put (with my variables of course), should there be more?:
{
"platforms": [
{
"platform": "Alarmdotcom",
"name": "Security Panel",
"username": "[email protected]",
"password": "testpassword",
"apiKey": "wrapapikeygoeshere",
"apiUsername": "wrapapiusername"
}
]
}

thanks in advance.

Support Silent Arming

By default when I arm stay, I wish for that to be done "silently". This is so that the alarm does not do the beeping countdown. This is an option on the alarm.com mobile app.

In the web there is a checkbox "Silent Arming" that can be set. Any idea if this can be done from the plugin?

Alarm.com garage door integration

Hey guys,

Enjoy the plugin, and it works great for me. I do have a garage door hooked up to Alarm.com, and I would like to integrate it. Would you be willing to let me implement the feature request?

Arm Stay With No Entry Delay

I noticed in the Elgato Eve app that my security panel has four arming options: Stay, Away, Disarm, and Night. Is it possible to setup the Night Arm option to arm the panel stay with no entry delay? Right now it appears to do the same thing as the stay option.

Silent Arming?

Is it possible to have silent arming for the Arm Night? Thanks.

Don't let this plugin die. Take it over!

I just moved into a new home. We will no longer be using an alarm.com system, which means I won't really be able (or need) to work on this plugin anymore. Is there anyone who might be able to take over ownership? I'd hate to see it die as I know there are quite a few active users.

support z-wave lights?

Any chance that support for z-wave lights through alarm.com can be added to this project? Thanks...

Issue - Request `wrapapiuserid/alarmdotcom/initlogin/0.0.4` was unsuccessful: - There was an unexpected error

Hi,

Thank you for doing this awesome work.
This is my first accessory I am adding in homebridge. I am getting the following error when I click on the security panel accessory in home app. It shows 'no response'. When I click on it, I get the following error in terminal. I am running this raspberry pi3.
[Security Panel] Request wrapapiuserid/alarmdotcom/initlogin/0.0.4 was unsuccessful:

  • There was an unexpected error

I have used server api key. Below is the config:

{ "bridge": { "name": "Homebridge", "username": "mac", "port": 51826, "pin": "031-45-154" }, "platforms": [{ "platform":"Alarmdotcom", "name":"Security Panel", "username":"[email protected]", "password":"alarm.com password", "apiKey":"KoWOvbHIqP5rKzcVpblvwPht1mMoyua4", "apiUsername": "wrapapiuserid", "accessories":{ "panel": true, "lights":false, "locks": false } }] }

Issue with locks and garage door integration

It appears the issue we experienced earlier this week concerning, "WrapAPI Login call failing?", is also affecting my locks and garage door integration with Alarm.com. After launching homebridge I see the following messages. I do not have any lights bound to my Alarm.com account so the first two messages may not hold any relevance. Please let me know if you have any suggestions. It was particularly nice when I would say good night to siri, she would turn off lights, set the alarm, close the garage door and engage all of the locks.

[2/11/2017, 7:22:56 AM] [Security Panel] Request username/alarmdotcom/lights/0.1.1 was unsuccessful:

  • There was an unexpected error
    [2/11/2017, 7:22:56 AM] [Security Panel] Error while getting light devices: Error: Request username/alarmdotcom/lights/0.1.1 was unsuccessful:
  • There was an unexpected error
    [2/11/2017, 7:22:57 AM] [Security Panel] Error while getting lock devices: TypeError: Cannot read property 'map' of undefined
    [2/11/2017, 7:22:57 AM] [Security Panel] Initializing platform accessory 'Alarm.com Security Panel'...

Thermostat Support

Does anyone know if there can be support added for thermostats? There is a section for the thermostats on the Wrap API site, but I have zero idea how to record a sequence. If anyone could walk me through it, I would be happy to create it, as I would love the ability to use HomeKit for my thermostats, seeing as they are added through alarm.com.

Cannot read property 'panel' of undefined

Updated to latest this AM and am getting the below on startup:

[2/20/2017, 12:05:37 PM] [Security Panel] Initializing Alarmdotcom platform...
/usr/lib/node_modules/homebridge-alarmdotcom/index.js:71
if (this.config.accessories.panel === true) {
^

TypeError: Cannot read property 'panel' of undefined
at ADCPlatform.accessories (/usr/lib/node_modules/homebridge-alarmdotcom/index.js:71:31)
at Server._loadPlatformAccessories (/usr/lib/node_modules/homebridge/lib/server.js:351:20)
at Server._loadPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:295:16)
at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:77:36)
at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.runMain (module.js:590:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3

Siri Commands

I have installed things but have two questions.

I labeled the name as House Alarm but in app it just shows up as 'Alarm"

I am not sure this is why I also am having problems with Siri changing the state of the alarm from Away to Night to Disarm to Home

What commands are being used/understood by Siri

WrapAPI Login call failing?

Starting today, perhaps yesterday, I've been unable to login using the WrapAPI login call -- looking at the logs (on WrapAPI), I see "Expired Session". Either I've done something wrong, or perhaps Alarm.com's PDA website has changed again.

Anyone else having issues controlling their alarm via HomeBridge?

Garage Door Integration

Hello,

I have garage door integration with alarm.com. Is it possible that this could be added in? I think I tried the PDA login and I don't see garage doors listed there. So wasn't sure if this was possible.

Can not find light in Home app

I have added all the api's yesterday and security panel is working fine on home app. I just added a light to the panel and changed lights to true but I cannot see it in home app. Can you please let me know if I am missing something here.

Unexpected token ILLEGAL - ERROR LOADING PLUGIN homebridge-alarmdotcom

My Alarm.com plugin seems to have started failing this weekend. Not sure if others experience the same.

ct 31 11:37:42 raspberrypi homebridge[8343]: [10/31/2016, 11:37:42 AM] ====================
Oct 31 11:37:42 raspberrypi homebridge[8343]: [10/31/2016, 11:37:42 AM] ERROR LOADING PLUGIN homebridge-alarmdotcom:
Oct 31 11:37:42 raspberrypi homebridge[8343]: [10/31/2016, 11:37:42 AM] SyntaxError: Unexpected token ILLEGAL
Oct 31 11:37:42 raspberrypi homebridge[8343]: at exports.runInThisContext (vm.js:53:16)
Oct 31 11:37:42 raspberrypi homebridge[8343]: at Module._compile (module.js:413:25)
Oct 31 11:37:42 raspberrypi homebridge[8343]: at Object.Module._extensions..js (module.js:452:10)
Oct 31 11:37:42 raspberrypi homebridge[8343]: at Module.load (module.js:355:32)
Oct 31 11:37:42 raspberrypi homebridge[8343]: at Function.Module._load (module.js:310:12)
Oct 31 11:37:42 raspberrypi homebridge[8343]: at Module.require (module.js:365:17)
Oct 31 11:37:42 raspberrypi homebridge[8343]: at require (module.js:384:17)
Oct 31 11:37:42 raspberrypi homebridge[8343]: at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-alarmdotcom/node_modules/asn1/lib/ber/index.js:6:14)
Oct 31 11:37:42 raspberrypi homebridge[8343]: at Module._compile (module.js:434:26)
Oct 31 11:37:42 raspberrypi homebridge[8343]: at Object.Module._extensions..js (module.js:452:10)
Oct 31 11:37:42 raspberrypi homebridge[8343]: at Module.load (module.js:355:32)
Oct 31 11:37:42 raspberrypi homebridge[8343]: at Function.Module._load (module.js:310:12)
Oct 31 11:37:42 raspberrypi homebridge[8343]: at Module.require (module.js:365:17)
Oct 31 11:37:42 raspberrypi homebridge[8343]: at require (module.js:384:17)
Oct 31 11:37:42 raspberrypi homebridge[8343]: at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-alarmdotcom/node_modules/asn1/lib/index.js:6:11)
Oct 31 11:37:42 raspberrypi homebridge[8343]: at Module._compile (module.js:434:26)
Oct 31 11:37:42 raspberrypi homebridge[8343]: [10/31/2016, 11:37:42 AM] ====================

It looks like when the plugin attempts to load, it fails, and then homebridge itself crashes since the plugin cannot be found/registerd due to the loading issue.

Does not notify or log errors for logging in to ADC website

I had a typo in my config.json file where "username" was incorrect, and I couldn't figure out why this plugin wasn't working. Eventually I saw the typo and fixed it. It would have been helpful if the debug output had some info with the error when logging in to the alarm.com website.

A Suggestion

I have been going back to 0.4.1 version because I get name conflicts in homebridge since my lights and locks are on my Razberry as primary zwave controller with ADC as secondary. I'm more than willing to do that, but then realize this might be an enhancement for you to consider, as others might benefit.

My thought is to add some additional parameters to the config.json to enable or disable a class of device. For example, see last 3 lines in sample idea below. Don't feel obligated, but this could prove simple and useful for anyone running ADC controller as secondary. I've found that responsiveness of devices is blazing fast compared to through ADC apps, plus I've been able to add devices that ADC doesn't support. I'd offer to contribute if I knew how to code well!

Configuration sample:

{
"platforms": [
{
"platform": "Alarmdotcom",
"name": "Security Panel",
"username": "[email protected]",
"password": "testpassword",
"apiKey": "wrapapikeygoeshere",
"apiUsername": "wrapapiusername",
"enablePanel": true,
"enableLocks": false,
"enableLights": false
}
]
}

Alarm System Not Updating

Updating the Alarm though Home app has been unsuccessful. When arming, Home will update and show Armed, but the alarm itself never updates. After an updated poll the Home app reverts to the correct status and shows unarmed.

TypeError: Cannot read property 'panel' of undefined

Introduced by latest merge.

Initializing Alarmdotcom platform...
/usr/local/lib/node_modules/homebridge-alarmdotcom/index.js:71
			if(this.config.accessories.panel === true) { accessoryPromises.push(this.getSecuritySystemAccessories()) }
			                          ^

TypeError: Cannot read property 'panel' of undefined
    at ADCPlatform.accessories (/usr/local/lib/node_modules/homebridge-alarmdotcom/index.js:71:30)
    at Server._loadPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:354:20)
    at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:298:16)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:80:36)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

Arm without delay

There seems to be no way to arm the alarm in away mode without delay. In other words when arming at night there should be away to arm the alarm and check no delay so that if an intruder walks in through a door the alarm sounds immediately.

Reference latest versions of API calls as opposed to specific versions

As mentioned here, the plugin should reference latest on all WrapAPI calls instead of a specific version of the app. For instance, this excerpt from the login call:

login() {
  if (!this.currentSession) {
    const session = this.send('initlogin/0.0.3').then(json => {
      const sessionUrl = json.data.sessionUrl;
      return this.send('login/0.1.1', {
        sessionUrl,
        username: this.config.username,
        password: this.config.password,
      }).then(json => {
        switch (json.data.alarmState) {
          case 'Disarmed':
            return Characteristic.SecuritySystemCurrentState.DISARMED;
          case 'Armed Stay':
            return Characteristic.SecuritySystemCurrentState.STAY_ARM;
          case 'Armed Away':
            return Characteristic.SecuritySystemCurrentState.AWAY_ARM;
          default:
            return null;
        }
    })

Should instead read:

login() {
  if (!this.currentSession) {
    const session = this.send('initlogin/latest').then(json => {
      const sessionUrl = json.data.sessionUrl;
      return this.send('login/latest', {
        sessionUrl,
        username: this.config.username,
        password: this.config.password,
      }).then(json => {
        switch (json.data.alarmState) {
          case 'Disarmed':
            return Characteristic.SecuritySystemCurrentState.DISARMED;
          case 'Armed Stay':
            return Characteristic.SecuritySystemCurrentState.STAY_ARM;
          case 'Armed Away':
            return Characteristic.SecuritySystemCurrentState.AWAY_ARM;
          default:
            return null;
        }
    })

This would allow changes to individual calls on WrapAPI to be made without necessitating an update to the plugin itself. Of course, if one of said changes were breaking, the plugin would have to be updated. Those changes should be the exception rather than the rule, however.

Doesnt install on Debian / RaspberryPi

Looks like there are issues installing this on a Raspberry Pi (linux/arm) running Jessie.

Has anyone else got this running on a Pi?

PhantomJS not found on PATH
Unexpected platform or architecture: linux/arm
It seems there is no binary available for your platform/architecture
Try to install PhantomJS globally
npm WARN install:[email protected] [email protected] install: node install.js
npm WARN install:[email protected] Exit status 1
/usr/local/lib
└── (empty)

Dealer

I added a nutone light switch nws15z & it works fine on the iq panel 2 but it doesn't show up on alarm.com. any reasons why?

Alarm.com redesign

Looks like a redesign of alarm.com landing page is messing up some of the integrations. I logged in to make sure I am not seeing a nagging screen and the whole site looks different. The specific error I am getting in homebridge is: Request <username>/alarmdotcom/login/0.1.0 was unsuccessful:

  • None of the output scenarios matched. See the raw data received in rawData

New to Pi and Homebridge

Greetings,

I am new to this whole realm of exciting things so please be patient with my jargon. When my homebred is initialized, I run into the following issue.

[Error: You did not specify {'token'} or {'clinetID', "clientSecret', 'code'}, one set of which is required for the new API]

Also with APIkey do i select a server key or a client key.

If selecting client key do i simply use alarm.com for the host. Thanks

Siri says my apologies "I can't control your home security system"

For some reason, I can't get Siri's commands to work with my security system.

Homekit and Homebridge, and the alarm.com setup is working perfectly when I go into the Homekit app interface and change the Security Panel status.

But when I ask Siri to do it, it says something along the lines of "I can't control your home security system".

Investigate use of "Remember Me" option on login

Alarm.com's site gives the user an option to be "remembered" on login. If this mechanism (most likely a cookie) is permanent, then the plugin would benefit from utilizing it. Skipping the login step would certainly shave a second or two off of the total run time. Before we add this, I'd like to investigate to see if it can be determined whether or not the mechanism is time-limited.

Door Locks

Alarm.com supports integration with various third party home automation accessories like door locks. Would you be opposed to converting this plugin to install as a platform instead of as a single accessory?

As a platform, this plugin would be able to provide the security panel as one accessory and any door locks as additional accessories. I've already confirmed that the mobile version of their site supports both door locks.

No Response

Did something change with alarm.com? I am getting a No Response output message from HomeBridge.

Door lock APIs with no door locks

Bryan,
I don't have any door locks through Frontpoint. I did still enable the API requests through WrapAPI but am seeing the following in the log:
[5/5/2016, 9:13:05 PM] [Security Panel] Error while getting lock devices: TypeError: Cannot read property 'map' of undefined

I don't see this having any adverse effect, but could the API detect whether there are actually any door locks installed? Or maybe put something in the config file to enable/disable the door lock APIs? (It threw a different error when I didn't have the door lock APIs enabled.)

thx!

WrapAPI reporting "Object Moved" after login endpoint

Starting sometime on 8/9/2016 the login WrapAPI now gives the below error. I checked and there are no nag screens. Anyone else running into this in the last 24 hours?

{ "success": false, "outputScenario": null, "data": null, "messages": [ "None of the output scenarios matched. See the raw data received in rawData" ], "errTypes": [ "noMatchedOutputScenario" ], "rawData": { "responses": [ { "statusCode": 302, "body": "<html><head><title>Object moved</title></head><body>\r\n<h2>Object moved to <a href=\"%2fpda%2f404.aspx%3faspxerrorpath%3d%2fpda%2f%7b%7bsessionUrl%7d%7d%2fDefault.aspx\">here</a>.</h2>\r\n</body></html>\r\n", "headers": { "content-type": "text/html; charset=utf-8", "location": "/pda/404.aspx?aspxerrorpath=/pda/{{sessionUrl}}/Default.aspx", "server": "Microsoft-IIS/7.5", "x-powered-by": "ASP.NET", "p3p": "policyref=\"/w3c/p3p.xml\",CP=\"OUR SAMa ADM UNI BUS ALL CUR DSP TAI COR IND STA\"", "access-control-allow-origin": "*", "date": "Wed, 10 Aug 2016 19:06:23 GMT", "connection": "close", "content-length": "199" }, "request": { "uri": { "protocol": "https:", "slashes": true, "auth": null, "host": "www.alarm.com", "port": 443, "hostname": "www.alarm.com", "hash": null, "search": null, "query": null, "pathname": "/pda/%7B%7BsessionUrl%7D%7D/Default.aspx", "path": "/pda/%7B%7BsessionUrl%7D%7D/Default.aspx", "href": "https://www.alarm.com/pda/%7B%7BsessionUrl%7D%7D/Default.aspx" }, "method": "post", "headers": { "origin": "https://www.alarm.com", "accept-language": "en-US,en;q=0.8", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36", "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "referer": "https://www.alarm.com/pda/(S(wuxx1xq5vbiyl145vcz3fs55))/Default.aspx", "Content-Type": "application/x-www-form-urlencoded", "content-length": 4208 } } }, { "statusCode": 404, "body": "<html>\r\n <head>\r\n <title>The resource cannot be found.</title>\r\n <style>\r\n body {font-family:\"Verdana\";font-weight:normal;font-size: .7em;color:black;} \r\n p {font-family:\"Verdana\";font-weight:normal;color:black;margin-top: -5px}\r\n b {font-family:\"Verdana\";font-weight:bold;color:black;margin-top: -5px}\r\n H1 { font-family:\"Verdana\";font-weight:normal;font-size:18pt;color:red }\r\n H2 { font-family:\"Verdana\";font-weight:normal;font-size:14pt;color:maroon }\r\n pre {font-family:\"Lucida Console\";font-size: .9em}\r\n .marker {font-weight: bold; color: black;text-decoration: none;}\r\n .version {color: gray;}\r\n .error {margin-bottom: 10px;}\r\n .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }\r\n </style>\r\n </head>\r\n\r\n <body bgcolor=\"white\">\r\n\r\n <span><H1>Server Error in '/pda' Application.<hr width=100% size=1 color=silver></H1>\r\n\r\n <h2> <i>The resource cannot be found.</i> </h2></span>\r\n\r\n <font face=\"Arial, Helvetica, Geneva, SunSans-Regular, sans-serif \">\r\n\r\n <b> Description: </b>HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. &nbsp;Please review the following URL and make sure that it is spelled correctly.\r\n <br><br>\r\n\r\n <b> Requested URL: </b>/pda/404.aspx<br><br>\r\n\r\n </body>\r\n</html>\r\n", "headers": { "cache-control": "private", "content-type": "text/html; charset=utf-8", "server": "Microsoft-IIS/7.5", "x-aspnet-version": "2.0.50727", "x-powered-by": "ASP.NET", "p3p": "policyref=\"/w3c/p3p.xml\",CP=\"OUR SAMa ADM UNI BUS ALL CUR DSP TAI COR IND STA\"", "access-control-allow-origin": "*", "date": "Wed, 10 Aug 2016 19:06:23 GMT", "connection": "close", "content-length": "1510" }, "request": { "uri": { "protocol": "https:", "slashes": true, "auth": null, "host": "www.alarm.com", "port": 443, "hostname": "www.alarm.com", "hash": null, "search": "?aspxerrorpath=/pda/%7B%7BsessionUrl%7D%7D/Default.aspx", "query": "aspxerrorpath=/pda/%7B%7BsessionUrl%7D%7D/Default.aspx", "pathname": "/pda/404.aspx", "path": "/pda/404.aspx?aspxerrorpath=/pda/%7B%7BsessionUrl%7D%7D/Default.aspx", "href": "https://www.alarm.com/pda/404.aspx?aspxerrorpath=/pda/%7B%7BsessionUrl%7D%7D/Default.aspx" }, "method": "GET", "headers": { "origin": "https://www.alarm.com", "accept-language": "en-US,en;q=0.8", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36", "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "referer": "https://www.alarm.com/pda/(S(wuxx1xq5vbiyl145vcz3fs55))/Default.aspx", "Content-Type": "application/x-www-form-urlencoded" } } } ], "stateToken": REDACTED" } }

Allow more options when automating Security System accessory

Creating an automation for the Security System accessory exposes three options:

  • Triggers
  • Disarms
  • Arms

img_5242

There should be two additional options provided, to correspond with the Alarm.com API:

  • Arms (stay)
  • Arms (away)

They should be added because the Alarm.com API provides this nuance for arming an alarm system. It's common to most alarm systems, really. "Arms (stay)" means that the perimeter of the system is armed, but motion sensors are not; this is common for people who are staying home to sleep, for example, and want the perimeter sensors armed, but do not want to trigger the motion sensors in the middle of night if they walk around or inevitably move in bed. "Arms (away)" means that all sensors are armed.

Exposing this nuance in Home's automation section means that a user can create an automation for turning off all the lights when "Arms (away)" is selected. Currently, selecting "Arms" handles both the "stay" and "away" situations. That makes creating such an automation ineffective, as users who are arming with "stay" probably do not want to turn all the lights off, while users arming with "away" almost certainly do.

Can these provided options be modified, or are they up to Apple's team developing HomeKit and the Home app for the Security System accessory?

Share `sessionUrl` across comands

In order to share the sessionUrl between requests, we need every WrapAPI endpoint to support an error output scenario when the following elements are detected:

<div id="ctl00_ContentPlaceHolder1_ErrorControl1">
    <font color="#FF0000">Sorry, your session has expired. Please login again.<br></font><br>
</div>

When these elements (and text) are detected, the page actually already has a new sessionUrl. So the WrapAPI endpoints should return the new sessionUrl so we can immediately jump right back into logging in without making yet another initlogin request.

Go to this URL to see what the redirected page looks like with an expired session: https://www.alarm.com/pda/(S(bogus))/main.aspx

I would do this myself, but I'm not very familiar with WrapAPI and whether or not I can publish new versions to the alarmdotcom endpoints.

New Error

I have update the AP and config file but I get the following error. Any help would be appreciated.

/opt/local/lib/node_modules/homebridge/lib/api.js:60
throw new Error("The requested accessory '" + name + "' was not registered by any plugin.");
^

Error: The requested accessory 'Alarmdotcom' was not registered by any plugin.
at API.accessory (/opt/local/lib/node_modules/homebridge/lib/api.js:60:13)
at Server._loadAccessories (/opt/local/lib/node_modules/homebridge/lib/server.js:233:42)
at Server.run (/opt/local/lib/node_modules/homebridge/lib/server.js:72:38)
at module.exports (/opt/local/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object. (/opt/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:467:10)
at startup (node.js:136:18)
at node.js:963:3

Home app does not communicate with security panel

Hi, I think I set up everything as intended - test API calls worked properly with the alarm panel. (Have used the server key from wrapapi.com as the key in the config.json file as instructed.) When I run homebridge in terminal, the security panel icon appears next to homebridge in the home app, along with my nest and myq icons. But when I click on the security panel icon in the home app and try to arm / disarm / press home / night, there is no communication with the panel. I just get a push notice from home app announcing the command i just pressed. however the panel does not react to any of the commands. any assistance appreciated.

here's what terminal shows:
[10/3/2016, 2:13:34 PM] [Security Panel] Initializing Alarmdotcom platform...
[10/3/2016, 2:13:34 PM] [Error: You did not specify {'token'} or {'clientId','clientSecret','code'}, one set of which is required for the new API]
[10/3/2016, 2:13:34 PM] Falling back to legacy API.
[10/3/2016, 2:13:34 PM] [MyQ] Logged in with MyQ user ID 0

i think this is the error for myq - which works fine for now.

rest of output from terminal:

[10/3/2016, 2:13:37 PM] [Security Panel] Request iflore/alarmdotcom/lights/0.1.1 was unsuccessful:

  • There was an unexpected error
    [10/3/2016, 2:13:37 PM] [Security Panel] Error while getting light devices: Error: Request iflore/alarmdotcom/lights/0.1.1 was unsuccessful:

  • There was an unexpected error
    [10/3/2016, 2:13:37 PM] [Security Panel] Request iflore/alarmdotcom/locks/0.1.1 was unsuccessful:

  • There was an unexpected error
    [10/3/2016, 2:13:37 PM] [Security Panel] Error while getting lock devices: Error: Request iflore/alarmdotcom/locks/0.1.1 was unsuccessful:

  • There was an unexpected error
    [10/3/2016, 2:13:37 PM] [Security Panel] Initializing platform accessory 'Alarm.com Security Panel'...
    Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

    ┌────────────┐
    │ 987-65-432 │
    └────────────┘

[10/3/2016, 2:13:37 PM] Homebridge is running on port 49667.

i think these errors are because i don't have those devices connected to the panel...

appreciate any feedback. many thanks.

Plugin thinks alarm is armed when it isn't

Thanks for updating the ability to turn on/off extra features! I reinstalled the latest but for some reason the alarm is showing "armed - home" when the alarm is off. I turned on debugging and also saw

  Accessory [Homebridge] Got Characteristic "Security System Current State" value: 0 +2s
  Accessory [Homebridge] Got Characteristic "Security System Target State" value: 0 +3ms

I'm assuming 0 = off? Any thoughts?

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.