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

Alarm.com plugin for Homebridge using Node.js
MIT License
58 stars 23 forks source link

"Received no partitions" on startup #110

Closed pb30 closed 1 year ago

pb30 commented 1 year ago

Describe the bug Error in logs on startup. Devices eventually show up in Homebridge from Alarm.com, but looking at the code, the assumption that partitions always be set seems incorrect. System works fine without it. Not sure what partitions is referring to, security panel? Home is using Qualsys IQ Panel, so not a security system, just smart home panel.

[3/6/2023, 1:49:02 PM] [SmartHome] Logged into Alarm.com as xxx@gmail.com
[3/6/2023, 1:49:03 PM] [SmartHome] Error: Error: Received no partitions from Alarm.com

To Reproduce Start homebridge

Expected behavior No error

ADC-SystemStates.json

{
  id: xxxx,
  attributes: {
    description: "xxx Home",
    hasSnapShotCameras: false,
    supportsSecureArming: false,
    remainingImageQuota: 0,
    systemGroupName: '',
    unitId: xxx,
    accessControlCurrentSystemMode: 0,
    isInPartialLockdown: false,
    icon: 'property-single',
    canWaitForWifiValidation: false,
    canScanForWifi: true
  },
  partitions: [],
  sensors: [
    {
      id: 'xx-xx',
      type: 'devices/sensor',
      attributes: [Object],
      relationships: [Object]
    }
  ],
  lights: [
    {
      id: 'xx-xxx',
      type: 'devices/light',
      attributes: [Object],
      relationships: [Object]
    },
....

Homebridge System (please complete the following information):

chase9 commented 1 year ago

A partition is used in the security industry to separate parts of the system from each other with a single panel. For example, you could have a partition for your garage and have it operate independently from the rest of the house. I thought that you always have at least a single partition which represents the common partition.

Is this what you have? I'm curious about how you can have a panel but not a partition? It sounds like you're not able to arm your panel?

pb30 commented 1 year ago

I think this is the model https://qolsys.com/iq-panel-4/

But yeah, no way to arm/disarm the panel. To the regret of the salesperson I just got the smart home package, not the security package. The panel I think basically just functions as Zwave hub for thermostat/deadbolt. Explains why the plug-in options for arm/disarm were confusing at first too.

In quick local test replacing that throw error with continue seems fine. All accessories get loaded in on initial fetch instead of waiting for first timer refresh.

pb30 commented 1 year ago

(Also, hey from another Minnesotan!)

chase9 commented 1 year ago

Hey, hope you're all braced up for the snow tonight!

I had no idea this was possible, but it seems reasonable to not have that throw an error then. I'll switch it to debug.

chase9 commented 1 year ago

Fixed in 999a4e4