node-alarm-dot-com / homebridge-node-alarm-dot-com

Alarm.com plugin for Homebridge using Node.js
MIT License
61 stars 24 forks source link

Issue with Garage Door not responding and reporting incorrect status #47

Closed Paulg5678 closed 4 years ago

Paulg5678 commented 4 years ago

Describe the bug Almost all of the time, the garage door accessory shows the opposite status of reality (and what is reported by alarm.com website/app), also, after I use the home app to open/close the garage door I get 'No Response' on the garage door icon in the Home app for a long time before it reports a status again (which is 9/10 times the inverse of reality)

To Reproduce Updated to most recent version of plugin Cleared cached accessories cache restarted homebridge Garage door initially showed as 'open' in accessories pane of home bridge and on iPhone home app (door is closed in reality, and shows closed in alarm.com) tapped on garage door icon in home app door opens Home app shows 'No Response' on garage door icon between 10 and 30 minutes later Home app displays garage door status as closed (is open actually) tap garage door icon in Home app Door closes Home app icon shows 'No Response' again for garage door Behavior repeats...

Expected behavior Garage door icon displays closed (door is actually closed) Tap garage door icon in home app Garage door opens Home app displays garage door status as 'Open' Tap garage door icon in home app Garage Door closes Home app displays garage door status as 'Closed'

**ADC-SystemStates.json ADC-SystemStates.json.txt

**

Homebridge System (please complete the following information):

ngori commented 4 years ago

@Paulg5678 What garage door opener device are you using with ADC? Did you try cycling the door with a physical control?

Paulg5678 commented 4 years ago

The device I'm using with ADC for my garage door is called 'Linear'. and yeah, I tried using the physical control to open/close the door, and I still get the inconsistent status in the Home app

ngori commented 4 years ago

@Paulg5678 OK. That's the same device I have installed. I've been using a variant of this code for ~9 months and never experienced an opposite state problem like this. A situation where the status is reversed should correct itself on the next poll of the system. For example, If I close our door with our numeric keypad. Home app will refresh as closed on the next poll

The no response behavior I do get (I just ignore it). I believe that is a function of the time it takes to execute the close command and then get the next status from the device from the next poll.

Is your poll timeout set for the default 60 seconds?

Paulg5678 commented 4 years ago

I hear you that it 'should' correct itself on the next poll, but no luck here. I've had the door closed for the past 4 hours at least and the home app still shows open.

I can go ahead and ignore the 'no response' issue, but it does seem to persist for quite a while. and my device poll timeout is set at 60 (default)

Paulg5678 commented 4 years ago

if it is any additional help, I just noticed these entries in my home bridge log. I had opened and closed the garage door with the physical control.

[8/2/2020, 21:13:33] [Security System] Updating lock Garage (91619076-1213), state=1, prev=0 [8/2/2020, 21:13:33] [Security System] TypeError: Cannot read property 'getCharacteristic' of undefined at ADCPlatform.statLockState (/usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:966:9) at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:312:20 at Array.forEach () at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:307:26 at Array.forEach () at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:265:22 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:97:5) [8/2/2020, 21:14:32] [Security System] Updating lock Garage (91619076-1213), state=0, prev=1 [8/2/2020, 21:14:32] [Security System] TypeError: Cannot read property 'getCharacteristic' of undefined at ADCPlatform.statLockState (/usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:966:9) at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:312:20 at Array.forEach () at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:307:26 at Array.forEach () at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:265:22 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:97:5)

ngori commented 4 years ago

Well that is interesting. It looks like your garage is being initialized as a lock. That would explain the stare reversal. A state of 1 for a garage is open and a lock secure. 2 is closed for garage and unsecured for a lock. Not sure why it's happening but that is definitely the cause.

Paulg5678 commented 4 years ago

is there anything I can do to sort that out?

mkormendy commented 4 years ago

Not saying this is the problem, but maybe check with your installer to see what he designated your garage door as on the system. Although it should be assigned and picked up by our plugin only based off what is provided in those groups, maybe there’s an inverted option on their configuration side.

Paulg5678 commented 4 years ago

Alrighty, I'll call the alarm company tomorrow. It does show up as a garage door in the alarm.com website and app though.

Paulg5678 commented 4 years ago

Is there anything specific I should ask? any keywords you'd need to know about or anything?

mkormendy commented 4 years ago

Oh wait,... that’s really odd,.. can you zip up your /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/ folder (recursively so it gets the dependencies as well) and attach here? I’ll check in the morning if the correct versions of the files updated properly.

mkormendy commented 4 years ago

Okay I had a look and the update worked correctly and is using the latest versions of the files. Can you uninstall the plugin, clear the accessory cache again, and reinstall and attempt again. This would be the last step before contacting your Alarm.com installer. (I deleted your zip file just to keep this thread clean of extraneous files)

ngori commented 4 years ago

@mkormendy My thought was that this might be an installer issue.

@Paulg5678 Random but does the garage opener show as a garage on your panel? I have a Qolsys IQ and there is a section for locks and a section for garages

Do you see your garage at this URL?

https://www.alarm.com/web/system/home/garage

What about this URL? https://www.alarm.com/web/system/home/locks

Paulg5678 commented 4 years ago

@ngori I just checked the 2 urls you mentioned and the garage door only shows up under the https://www.alarm.com/web/system/home/garage

@mkormendy I will follow your suggestion of uninstalling/reinstalling the plugin and let you know the results.

Paulg5678 commented 4 years ago

ok, so, followed your suggestions and it still seems things are backwards, here is the home bridge log after a restart following the reinstall of your plugin, it looks like the garage door is initially identified correctly, then gets grabbed again as a lock

[8/3/2020, 10:48:18] [Security System] Received 1 partitions from Alarm.com [8/3/2020, 10:48:18] [Security System] Adding partition Panel (id=91619076-127, uuid=37dbc987-5e50-4ff8-b18e-d7157efa43c4) [8/3/2020, 10:48:19] [Security System] Updating partition Panel (91619076-127), state=3, prev=null [8/3/2020, 10:48:19] [Security System] Updating partition Panel (91619076-127), desiredState=3, prev=null [8/3/2020, 10:48:19] [Security System] Updating partition Panel (91619076-127), statusFault=false, prev=null [8/3/2020, 10:48:19] [Security System] Added partition Panel (91619076-127) [8/3/2020, 10:48:19] [Security System] Received 7 sensors from Alarm.com [8/3/2020, 10:48:19] [Security System] Adding Contact Sensor "Back Door" (id=91619076-2, uuid=f2b59874-05e6-47d6-97ba-e38649c42e20) [8/3/2020, 10:48:19] [Security System] Updating sensor Back Door (91619076-2), state=0, prev=null [8/3/2020, 10:48:19] [Security System] Added sensor Back Door (91619076-2) [8/3/2020, 10:48:19] [Security System] Adding Contact Sensor "Carbon-monoxide" (id=91619076-5, uuid=81b57aaf-6c70-4c1a-9348-a1a9990cde3c) [8/3/2020, 10:48:19] [Security System] Updating sensor Carbon-monoxide (91619076-5), state=0, prev=null [8/3/2020, 10:48:19] [Security System] Added sensor Carbon-monoxide (91619076-5) [8/3/2020, 10:48:20] [Security System] Adding Contact Sensor "Fire Alarm" (id=91619076-8, uuid=a4de5bff-e23b-4127-9a8a-2f612c16c59c) [8/3/2020, 10:48:20] [Security System] Updating sensor Fire Alarm (91619076-8), state=0, prev=null [8/3/2020, 10:48:20] [Security System] Added sensor Fire Alarm (91619076-8) [8/3/2020, 10:48:20] [Security System] Adding Contact Sensor "Front Door" (id=91619076-1, uuid=4716e9e0-e137-438e-925c-c0f4e0770ccf) [8/3/2020, 10:48:20] [Security System] Updating sensor Front Door (91619076-1), state=0, prev=null [8/3/2020, 10:48:20] [Security System] Added sensor Front Door (91619076-1) [8/3/2020, 10:48:20] [Security System] Adding Occupancy Sensor "Motion Sensor" (id=91619076-4, uuid=ff99220a-8066-4e28-adf7-7283a7a6433f) [8/3/2020, 10:48:20] [Security System] Updating sensor Motion Sensor (91619076-4), state=1, prev=null [8/3/2020, 10:48:20] [Security System] Added sensor Motion Sensor (91619076-4) [8/3/2020, 10:48:20] [Security System] Adding Contact Sensor "Mudroom Door" (id=91619076-6, uuid=4e4ea317-1679-4f5c-ab83-83234a060381) [8/3/2020, 10:48:20] [Security System] Updating sensor Mudroom Door (91619076-6), state=0, prev=null [8/3/2020, 10:48:20] [Security System] Added sensor Mudroom Door (91619076-6) [8/3/2020, 10:48:20] [Security System] Adding Contact Sensor "Windows" (id=91619076-3, uuid=dcffb16c-a19a-4a53-9cb3-0478f451c26c) [8/3/2020, 10:48:20] [Security System] Updating sensor Windows (91619076-3), state=0, prev=null [8/3/2020, 10:48:20] [Security System] Added sensor Windows (91619076-3) [8/3/2020, 10:48:20] [Security System] Received 1 lights from Alarm.com [8/3/2020, 10:48:20] [Security System] Adding Door Lock "Deadbolt" (id=91619076-1211, uuid=b4e3be4e-750e-4daf-8bad-6679861e1596) (0 0) [8/3/2020, 10:48:21] [Security System] Updating lock Deadbolt (91619076-1211), state=3, prev=0 [8/3/2020, 10:48:21] [Security System] Added lock Deadbolt (91619076-1211) [8/3/2020, 10:48:21] [Security System] Received 1 locks from Alarm.com [8/3/2020, 10:48:21] [Security System] Adding Garage Door "Garage" (id=91619076-1213, uuid=30e4967e-5b3b-4342-a3a7-94af5f1c0624) (2 2) [8/3/2020, 10:48:21] [Security System] Updating garage Garage (91619076-1213), state=1, prev=2 [8/3/2020, 10:48:21] [Security System] Added garage-door Garage (91619076-1213) [8/3/2020, 10:49:03] [Security System] Updating light Deadbolt (91619076-1211), state=undefined, prev=3 [8/3/2020, 10:49:03] [Security System] TypeError: Cannot read property 'getCharacteristic' of undefined at ADCPlatform.statLightState (/usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:793:9) at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:299:20 at Array.forEach () at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:294:27 at Array.forEach () at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:265:22 at processTicksAndRejections (internal/process/task_queues.js:97:5) [8/3/2020, 10:50:03] [Security System] Updating lock Garage (91619076-1213), state=0, prev=1 [8/3/2020, 10:50:03] [Security System] TypeError: Cannot read property 'getCharacteristic' of undefined at ADCPlatform.statLockState (/usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:966:9) at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:312:20 at Array.forEach () at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:307:26 at Array.forEach () at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:265:22 at processTicksAndRejections (internal/process/task_queues.js:97:5) [8/3/2020, 10:51:04] [Security System] TypeError: Cannot read property 'getCharacteristic' of undefined at ADCPlatform.statLockState (/usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:974:9) at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:312:20 at Array.forEach () at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:307:26 at Array.forEach () at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:265:22 at processTicksAndRejections (internal/process/task_queues.js:97:5)

ngori commented 4 years ago

@Paulg5678 It looks like your deadbolt is initially added as a lock then referenced as a light. All the devices then are off by 1 device type. Do you have any lights? It appears the plugin receives 1 light from ADC.

Paulg5678 commented 4 years ago

no, I don't have any lights on the system

ngori commented 4 years ago

@chase9 Chase, weird bug here where the plugin is possibly trying to add a light when there isn't one on the system? Any ideas?

Paulg5678 commented 4 years ago

Hey folks, just checking in to see if any headway or ideas have come up around this issue?

chase9 commented 4 years ago

This morning I started looking through the code to see if I could find out what would cause something like this to happen. Unfortunately I couldn’t find anything, but I do plan on spending time this week going through this project and fulfilling some of the tasks I’ve fallen behind on.

Out of curiosity, do you have a split system?

Chase Lau

Please excuse any grammatical errors as this was sent from my iPhone.

On Aug 15, 2020, at 2:40 PM, Paulg5678 notifications@github.com wrote:

 Hey folks, just checking in to see if any headway or ideas have come up around this issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Paulg5678 commented 4 years ago

Define "split system"?

chase9 commented 4 years ago

I mean split system such that you have multiple alarm panels and you have a separate login for each one. You have the ability to link your systems together, but I think you would know if you had one.

Paulg5678 commented 4 years ago

Nope, just have the one system

Paulg5678 commented 4 years ago

Let me know if there's anything additional you need from me i.e. logs or anything

Paulg5678 commented 4 years ago

Good evening, any updates on this? Does perhaps the json response I attached to the bug report show anything weird to y'all? I got to looking at it and it seems that the deadbolt is in a section called "lights" but is given the type devices/lock. could this be a potential culprit?

mkormendy commented 4 years ago

I haven't touched this project for a number of weeks. Sorry, I don't have any solutions at this time.

ngori commented 4 years ago

@Paulg5678 Just a random thought have you tried removing all the cached alarm.com accessories. It's a pain if you have them in rooms but could be worth a try.

I saw you reinstalled the plugin but wasn't sure if you cleared the cached accessories

Paulg5678 commented 4 years ago

@ngori Yeah, that was one of the first things I tried

Paulg5678 commented 4 years ago

I'm not 100% but I feel like there's something funny about the way that json response is structured and/or being parsed

ngori commented 4 years ago

@Paulg5678 What is the behavior/response if you add 91619076-1211) to your ignore devices in your config? I believe that is your deadbolt?

Paulg5678 commented 4 years ago

let me give that a stab

Paulg5678 commented 4 years ago

[9/5/2020, 11:32:21] [Security System] Received 1 partitions from Alarm.com [9/5/2020, 11:32:21] [Security System] Removing Panel (91619076-127) from HomeBridge [9/5/2020, 11:32:21] [Security System] Adding partition Panel (id=91619076-127, uuid=37dbc987-5e50-4ff8-b18e-d7157efa43c4) [9/5/2020, 11:32:21] [Security System] Updating partition Panel (91619076-127), state=3, prev=null [9/5/2020, 11:32:21] [Security System] Updating partition Panel (91619076-127), desiredState=3, prev=null [9/5/2020, 11:32:21] [Security System] Updating partition Panel (91619076-127), statusFault=false, prev=null [9/5/2020, 11:32:21] [Security System] Added partition Panel (91619076-127) [9/5/2020, 11:32:21] [Security System] Received 7 sensors from Alarm.com [9/5/2020, 11:32:21] [Security System] Removing Back Door (91619076-2) from HomeBridge [9/5/2020, 11:32:21] [Security System] Adding Contact Sensor "Back Door" (id=91619076-2, uuid=f2b59874-05e6-47d6-97ba-e38649c42e20) [9/5/2020, 11:32:21] [Security System] Updating sensor Back Door (91619076-2), state=0, prev=null [9/5/2020, 11:32:21] [Security System] Added sensor Back Door (91619076-2) [9/5/2020, 11:32:21] [Security System] Removing Carbon-monoxide (91619076-5) from HomeBridge [9/5/2020, 11:32:21] [Security System] Adding Contact Sensor "Carbon-monoxide" (id=91619076-5, uuid=81b57aaf-6c70-4c1a-9348-a1a9990cde3c) [9/5/2020, 11:32:22] [Security System] Updating sensor Carbon-monoxide (91619076-5), state=0, prev=null [9/5/2020, 11:32:22] [Security System] Added sensor Carbon-monoxide (91619076-5) [9/5/2020, 11:32:22] [Security System] Removing Fire Alarm (91619076-8) from HomeBridge [9/5/2020, 11:32:22] [Security System] Adding Contact Sensor "Fire Alarm" (id=91619076-8, uuid=a4de5bff-e23b-4127-9a8a-2f612c16c59c) [9/5/2020, 11:32:22] [Security System] Updating sensor Fire Alarm (91619076-8), state=0, prev=null [9/5/2020, 11:32:22] [Security System] Added sensor Fire Alarm (91619076-8) [9/5/2020, 11:32:22] [Security System] Removing Front Door (91619076-1) from HomeBridge [9/5/2020, 11:32:22] [Security System] Adding Contact Sensor "Front Door" (id=91619076-1, uuid=4716e9e0-e137-438e-925c-c0f4e0770ccf) [9/5/2020, 11:32:23] [Security System] Updating sensor Front Door (91619076-1), state=0, prev=null [9/5/2020, 11:32:23] [Security System] Added sensor Front Door (91619076-1) [9/5/2020, 11:32:23] [Security System] Removing Motion Sensor (91619076-4) from HomeBridge [9/5/2020, 11:32:23] [Security System] Adding Occupancy Sensor "Motion Sensor" (id=91619076-4, uuid=ff99220a-8066-4e28-adf7-7283a7a6433f) [9/5/2020, 11:32:23] [Security System] Updating sensor Motion Sensor (91619076-4), state=1, prev=null [9/5/2020, 11:32:23] [Security System] Added sensor Motion Sensor (91619076-4) [9/5/2020, 11:32:23] [Security System] Removing Mudroom Door (91619076-6) from HomeBridge [9/5/2020, 11:32:23] [Security System] Adding Contact Sensor "Mudroom Door" (id=91619076-6, uuid=4e4ea317-1679-4f5c-ab83-83234a060381) [9/5/2020, 11:32:23] [Security System] Updating sensor Mudroom Door (91619076-6), state=0, prev=null [9/5/2020, 11:32:23] [Security System] Added sensor Mudroom Door (91619076-6) [9/5/2020, 11:32:23] [Security System] Removing Windows (91619076-3) from HomeBridge [9/5/2020, 11:32:23] [Security System] Adding Contact Sensor "Windows" (id=91619076-3, uuid=dcffb16c-a19a-4a53-9cb3-0478f451c26c) [9/5/2020, 11:32:23] [Security System] Updating sensor Windows (91619076-3), state=0, prev=null [9/5/2020, 11:32:23] [Security System] Added sensor Windows (91619076-3) [9/5/2020, 11:32:23] [Security System] Received 1 lights from Alarm.com [9/5/2020, 11:32:23] [Security System] Ignored sensor Deadbolt (91619076-1211) [9/5/2020, 11:32:23] [Security System] Received 1 locks from Alarm.com [9/5/2020, 11:32:23] [Security System] Removing Garage (91619076-1213) from HomeBridge [9/5/2020, 11:32:23] [Security System] Adding Garage Door "Garage" (id=91619076-1213, uuid=30e4967e-5b3b-4342-a3a7-94af5f1c0624) (2 2) [9/5/2020, 11:32:24] [Security System] Updating garage Garage (91619076-1213), state=1, prev=2 [9/5/2020, 11:32:24] [Security System] Added garage-door Garage (91619076-1213) [9/5/2020, 11:33:11] [Security System] Updating lock Garage (91619076-1213), state=0, prev=1 [9/5/2020, 11:33:11] [Security System] TypeError: Cannot read property 'getCharacteristic' of undefined at ADCPlatform.statLockState (/usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:966:9) at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:312:20 at Array.forEach () at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:307:26 at Array.forEach () at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:265:22 at processTicksAndRejections (internal/process/task_queues.js:97:5)

ngori commented 4 years ago

Thanks. There is still some weird indexing array or type mismatch error. Is your log level set to Verbose? Set equal to 4 in the index.js? Could you try setting to 4 and doing the same thing?

Paulg5678 commented 4 years ago

Got this after setting log level to 4 and restarting home bridge

[9/5/2020, 12:27:35] [Security System] Received 1 partitions from Alarm.com [9/5/2020, 12:27:35] [Security System] Removing Panel (91619076-127) from HomeBridge [9/5/2020, 12:27:35] [Security System] Adding partition Panel (id=91619076-127, uuid=37dbc987-5e50-4ff8-b18e-d7157efa43c4) [9/5/2020, 12:27:35] [Security System] Updating partition Panel (91619076-127), state=3, prev=null [9/5/2020, 12:27:35] [Security System] Updating partition Panel (91619076-127), desiredState=3, prev=null [9/5/2020, 12:27:35] [Security System] Updating partition Panel (91619076-127), statusFault=false, prev=null [9/5/2020, 12:27:35] [Security System] Added partition Panel (91619076-127) [9/5/2020, 12:27:35] [Security System] Received 7 sensors from Alarm.com [9/5/2020, 12:27:35] [Security System] Removing Back Door (91619076-2) from HomeBridge [9/5/2020, 12:27:35] [Security System] Adding Contact Sensor "Back Door" (id=91619076-2, uuid=f2b59874-05e6-47d6-97ba-e38649c42e20) [9/5/2020, 12:27:35] [Security System] Updating sensor Back Door (91619076-2), state=0, prev=null [9/5/2020, 12:27:35] [Security System] Added sensor Back Door (91619076-2) [9/5/2020, 12:27:35] [Security System] Removing Carbon-monoxide (91619076-5) from HomeBridge [9/5/2020, 12:27:35] [Security System] Adding Contact Sensor "Carbon-monoxide" (id=91619076-5, uuid=81b57aaf-6c70-4c1a-9348-a1a9990cde3c) [9/5/2020, 12:27:36] [Security System] Updating sensor Carbon-monoxide (91619076-5), state=0, prev=null [9/5/2020, 12:27:36] [Security System] Added sensor Carbon-monoxide (91619076-5) [9/5/2020, 12:27:36] [Security System] Removing Fire Alarm (91619076-8) from HomeBridge [9/5/2020, 12:27:36] [Security System] Adding Contact Sensor "Fire Alarm" (id=91619076-8, uuid=a4de5bff-e23b-4127-9a8a-2f612c16c59c) [9/5/2020, 12:27:36] [Security System] Updating sensor Fire Alarm (91619076-8), state=0, prev=null [9/5/2020, 12:27:36] [Security System] Added sensor Fire Alarm (91619076-8) [9/5/2020, 12:27:36] [Security System] Removing Front Door (91619076-1) from HomeBridge [9/5/2020, 12:27:36] [Security System] Adding Contact Sensor "Front Door" (id=91619076-1, uuid=4716e9e0-e137-438e-925c-c0f4e0770ccf) [9/5/2020, 12:27:37] [Security System] Updating sensor Front Door (91619076-1), state=0, prev=null [9/5/2020, 12:27:37] [Security System] Added sensor Front Door (91619076-1) [9/5/2020, 12:27:37] [Security System] Removing Motion Sensor (91619076-4) from HomeBridge [9/5/2020, 12:27:37] [Security System] Adding Occupancy Sensor "Motion Sensor" (id=91619076-4, uuid=ff99220a-8066-4e28-adf7-7283a7a6433f) [9/5/2020, 12:27:37] [Security System] Updating sensor Motion Sensor (91619076-4), state=1, prev=null [9/5/2020, 12:27:37] [Security System] Added sensor Motion Sensor (91619076-4) [9/5/2020, 12:27:37] [Security System] Removing Mudroom Door (91619076-6) from HomeBridge [9/5/2020, 12:27:37] [Security System] Adding Contact Sensor "Mudroom Door" (id=91619076-6, uuid=4e4ea317-1679-4f5c-ab83-83234a060381) [9/5/2020, 12:27:37] [Security System] Updating sensor Mudroom Door (91619076-6), state=0, prev=null [9/5/2020, 12:27:37] [Security System] Added sensor Mudroom Door (91619076-6) [9/5/2020, 12:27:37] [Security System] Removing Windows (91619076-3) from HomeBridge [9/5/2020, 12:27:37] [Security System] Adding Contact Sensor "Windows" (id=91619076-3, uuid=dcffb16c-a19a-4a53-9cb3-0478f451c26c) [9/5/2020, 12:27:37] [Security System] Updating sensor Windows (91619076-3), state=0, prev=null [9/5/2020, 12:27:37] [Security System] Added sensor Windows (91619076-3) [9/5/2020, 12:27:37] [Security System] Received 1 lights from Alarm.com [9/5/2020, 12:27:37] [Security System] Ignored sensor Deadbolt (91619076-1211) [9/5/2020, 12:27:37] [Security System] Received 1 locks from Alarm.com [9/5/2020, 12:27:37] [Security System] Removing Garage (91619076-1213) from HomeBridge [9/5/2020, 12:27:38] [Security System] Adding Garage Door "Garage" (id=91619076-1213, uuid=30e4967e-5b3b-4342-a3a7-94af5f1c0624) (2 2) [9/5/2020, 12:27:38] [Security System] Updating garage Garage (91619076-1213), state=1, prev=2 [9/5/2020, 12:27:38] [Security System] Added garage-door Garage (91619076-1213) [9/5/2020, 12:27:38] [Security System] Received no garages from Alarm.com. If you are expecting garages in your Alarm.com setup, you may need to check that your provider has assigned garages in your Alarm.com account [9/5/2020, 12:28:15] [Security System] Updating lock Garage (91619076-1213), state=0, prev=1 [9/5/2020, 12:28:15] [Security System] TypeError: Cannot read property 'getCharacteristic' of undefined at ADCPlatform.statLockState (/usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:966:9) at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:312:20 at Array.forEach () at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:307:26 at Array.forEach () at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/index.js:265:22 at processTicksAndRejections (internal/process/task_queues.js:97:5) [9/5/2020, 12:28:15] [Security System] /var/lib/homebridge/ADC-SystemStates.json written

mkormendy commented 4 years ago

Thanks. There is still some weird indexing array or type mismatch error. Is your log level set to Verbose? Set equal to 4 in the index.js? Could you try setting to 4 and doing the same thing?

You don't have to edit the index.js file, just set the setting for the plugin in the homebridge config.json. Instructions on the main github page at the bottom.

mkormendy commented 4 years ago

@Paulg5678 after setting the log level to 4, there should be a file created called ADC-SystemStates.json in the same folder as the homebridge config.json file. That folder is usually in your user's base folder under .homebridge.

Can you send that directly to me on Slack (now on Discord - updated details in the BEFORE ALL ELSE pinned ticket)? (please don't post it here as there may be sensitive info on it)

Paulg5678 commented 4 years ago

how do I connect to you on Slack?

mkormendy commented 4 years ago

how do I connect to you on Slack?

The Slack (now on Discord - updated details in the BEFORE ALL ELSE pinned ticket) link is in the BEFORE ALL ELSE.. pinned ticket.

mkormendy commented 4 years ago

@ngori so I figured out what's wrong with @Paulg5678's setup. Alarm.com is actually sending a payload with accessories in the wrong categories after all. So it's not this plugin's code that's the problem, but the configuration of his accessories on the account/system.

What's interesting is the payload of accessories identify themselves correctly in their own block, even if they are placed in the wrong category in the payload.

I'd be interested to compare your payload @ngori and my payload .. just to see if that's a more consistent route for generating the accessories. Mind sharing your ADC-SystemStates.json to me on Slack (now on Discord - updated details in the BEFORE ALL ELSE pinned ticket) as well?

mkormendy commented 4 years ago

@Paulg5678 so I looked at my data payload and @ngori's data payload. Both of ours have accessories assigned to the correct categories in the payload which indicates that the accessories are correctly assigned on the account/system.

Unfortunately I'm going to have to close this ticket since this isn't an issue with the plugin but the provider.

mkormendy commented 4 years ago

I'm leaving this ticket open for comments, as this seems to be a fringe case that I haven't had anyone else report a similar scenario. If there is enough interest, or if someone else is willing to rewrite the code to change the parsing structure to accommodate incorrectly assigned accessories, then it's still possible to get this working. But as it is, I can't go and rewrite the code to accommodate an installer/provider's incorrect configuration.

majorgearhead commented 4 years ago

@Paulg5678 I know this is a closed issue, but wondering if you found a way to resolve this with your provider? I am going through the very same thing.