mantorok1 / homebridge-omnilink-platform

Homebridge Plugin for HAI/Leviton Omni series Security & Home Automation Systems
Apache License 2.0
12 stars 0 forks source link

Can’t set security modes #20

Closed btgh closed 1 year ago

btgh commented 1 year ago

Describe The Bug:

When I try to change the security mode I get the following error: Area 1 [Area 1]: Set Mode failed [Cannot read properties of undefined (reading 'name')] To Reproduce:

Set mode from home to away or off Expected behavior:

Change security mode Logs:

Show the Homebridge logs here, remove any sensitive information.

[9/11/2022, 8:50:28 AM] [OmniPro] TCP Connection: Open [9/11/2022, 8:50:28 AM] Driveway DDE6 is running on port 34699. [9/11/2022, 8:50:28 AM] Please add [Driveway DDE6] manually in Home app. Setup Code: 230-50-467 [9/11/2022, 8:50:28 AM] Homebridge v1.5.0 (HAP v0.10.2) (Sandwich) is running on port 51484. [9/11/2022, 8:50:28 AM] [OmniPro] Performing Auto-Discovery [9/11/2022, 8:50:29 AM] [Ring] Found the following locations: [9/11/2022, 8:50:29 AM] [Ring] locationId: drt3kg-2rj8f-0 - Arlington [9/11/2022, 8:50:29 AM] [Ring] Configuring 4 cameras and 4 devices for location "Arlington" - locationId: drt3kg-2rj8f-0 [9/11/2022, 8:50:29 AM] [Ring] Hidden accessory 54ebf213-0c8f-4e28-ade1-507f1958dc7b lpd_v2 Arlington Front Door [9/11/2022, 8:50:29 AM] [Ring] Hidden accessory ab737361-3ecd-4a44-8d6b-c9e77ec4b283 cocoa_camera Diving board [9/11/2022, 8:50:36 AM] [OmniPro] Thermostat 1 [LR Tstat]: 21C; Off [9/11/2022, 8:50:36 AM] [OmniPro] Thermostat 2 [2nd Tstat]: 22.5C; Off [9/11/2022, 8:50:36 AM] [OmniPro] Thermostat 3 [MBR Tstat]: 21.5C; Off [9/11/2022, 8:50:36 AM] [OmniPro] Writing config to cache [/var/lib/homebridge/OmnilinkPlatform/OmniPro.json] [9/11/2022, 8:50:36 AM] [OmniPro] Configure temperaturesensor: 2nd PESM [9/11/2022, 8:50:37 AM] [OmniPro] Configure temperaturesensor: BASEMENT PESM [9/11/2022, 8:50:37 AM] [OmniPro] Configure temperaturesensor: Outdoor Temp [9/11/2022, 8:50:37 AM] [OmniPro] Configure button: Calm Lightin [9/11/2022, 8:50:37 AM] [OmniPro] Configure button: LIghts Off [9/11/2022, 8:50:37 AM] [OmniPro] Configure button: First Only [9/11/2022, 8:50:37 AM] [OmniPro] Configure button: Heat 2nd [9/11/2022, 8:50:37 AM] [OmniPro] Configure button: Heat to 58 [9/11/2022, 8:50:37 AM] [OmniPro] Configure button: DrivewayOff [9/11/2022, 8:50:37 AM] [OmniPro] Configure button: Hot Water On [9/11/2022, 8:50:37 AM] [OmniPro] Configure button: Ht Water Off [9/11/2022, 8:50:37 AM] [OmniPro] Configure button: Hot Water 1 [9/11/2022, 8:50:37 AM] [OmniPro] Configure button: Hold Heat [9/11/2022, 8:50:37 AM] [OmniPro] Configure thermostat: LR Tstat [9/11/2022, 8:50:37 AM] [OmniPro] Configure thermostat: 2nd Tstat [9/11/2022, 8:50:37 AM] [OmniPro] Configure thermostat: MBR Tstat [9/11/2022, 8:50:37 AM] [OmniPro] Configure unitlightbulb: 1st Hallway [9/11/2022, 8:50:37 AM] [OmniPro] Configure unitlightbulb: Fireplace [9/11/2022, 8:50:37 AM] [OmniPro] Configure unitlightbulb: 2nd Steps [9/11/2022, 8:50:37 AM] [OmniPro] Configure unitlightbulb: Mud Room [9/11/2022, 8:50:37 AM] [OmniPro] Configure unitlightbulb: Kitchen [9/11/2022, 8:50:37 AM] [OmniPro] Configure unitlightbulb: Front Door [9/11/2022, 8:50:37 AM] [OmniPro] Configure unitlightbulb: Chimney [9/11/2022, 8:50:37 AM] [OmniPro] Configure unitlightbulb: Side Door [9/11/2022, 8:50:37 AM] [OmniPro] Configure unitswitch: Ceiling Fan [9/11/2022, 8:50:37 AM] [OmniPro] Configure unitswitch: HW Tank [9/11/2022, 8:50:37 AM] [OmniPro] Configure smokesensor: Smoke Alarm [9/11/2022, 8:50:37 AM] [OmniPro] Configure contactsensor: Oil Burner [9/11/2022, 8:50:37 AM] [OmniPro] Configure contactsensor: Fridge Temp [9/11/2022, 8:50:37 AM] [OmniPro] Configure contactsensor: Driveway Sensor [9/11/2022, 8:50:37 AM] [OmniPro] Configure contactsensor: Boiler Demand [9/11/2022, 8:50:37 AM] [OmniPro] Configure unitlightbulb: China Cabint [9/11/2022, 8:50:37 AM] [OmniPro] Configure securitysystem: Area 1 [9/11/2022, 8:50:37 AM] [OmniPro] Found: Omni IIe [Firmware version: 3.11] [9/11/2022, 8:50:37 AM] [OmniPro] Areas found: 1 [9/11/2022, 8:50:37 AM] [OmniPro] 1: Area 1 [9/11/2022, 8:50:37 AM] [OmniPro] Zones found: 9 [9/11/2022, 8:50:37 AM] [OmniPro] 1: Oil Burner [AuxiliaryEmergency] [9/11/2022, 8:50:37 AM] [OmniPro] 2: Fridge Temp [Auxiliary] [9/11/2022, 8:50:37 AM] [OmniPro] 3: Smoke Alarm [Auxiliary] [9/11/2022, 8:50:37 AM] [OmniPro] 5: Driveway Sensor [Perimeter] [9/11/2022, 8:50:37 AM] [OmniPro] 6: Boiler Demand [Auxiliary] [9/11/2022, 8:50:37 AM] [OmniPro] 9: 2nd PESM [ProgrammableEnergySaverModule] [9/11/2022, 8:50:37 AM] [OmniPro] 10: BASEMENT PESM [ProgrammableEnergySaverModule] [9/11/2022, 8:50:37 AM] [OmniPro] 12: Outdoor Temp [ExtendedRangeOutdoorTemperature] [9/11/2022, 8:50:37 AM] [OmniPro] 16: Thermostat [Auxiliary] [9/11/2022, 8:50:37 AM] [OmniPro] Units found: 26 [9/11/2022, 8:50:37 AM] [OmniPro] 1: China Cabint [Extended] [9/11/2022, 8:50:37 AM] [OmniPro] 17: 1st Scene [UPB] [9/11/2022, 8:50:37 AM] [OmniPro] 18: 1st Hallway [UPB] [9/11/2022, 8:50:37 AM] [OmniPro] 19: Fireplace [UPB] [9/11/2022, 8:50:37 AM] [OmniPro] 20: 2nd Steps [UPB] [9/11/2022, 8:50:37 AM] [OmniPro] 21: Mud Room [UPB] [9/11/2022, 8:50:37 AM] [OmniPro] 22: Kitchen [UPB] [9/11/2022, 8:50:37 AM] [OmniPro] 23: Front Door [UPB] [9/11/2022, 8:50:37 AM] [OmniPro] 24: Chimney [UPB] [9/11/2022, 8:50:37 AM] [OmniPro] 25: Ceiling Fan [UPB] [9/11/2022, 8:50:37 AM] [OmniPro] 26: Side Door [UPB] [9/11/2022, 8:50:37 AM] [OmniPro] 67: HW Tank [Output] [9/11/2022, 8:50:37 AM] [OmniPro] 75: Summer [Flag] [9/11/2022, 8:50:37 AM] [OmniPro] 76: InMotionEvnt [Flag] [9/11/2022, 8:50:37 AM] [OmniPro] 77: outMrMotion [Flag] [9/11/2022, 8:50:37 AM] [OmniPro] 78: 1stOnlyOn [Flag] [9/11/2022, 8:50:37 AM] [OmniPro] 79: Driveway Off [Flag] [9/11/2022, 8:50:37 AM] [OmniPro] 80: 1stHeatOn [Flag] [9/11/2022, 8:50:37 AM] [OmniPro] 81: BoilerOn [Flag] [9/11/2022, 8:50:37 AM] [OmniPro] 82: mbrHeatOn [Flag] [9/11/2022, 8:50:37 AM] [OmniPro] 83: 2ndHeatOn [Flag] [9/11/2022, 8:50:37 AM] [OmniPro] 84: hotWaterOff [Flag] [9/11/2022, 8:50:37 AM] [OmniPro] 85: PreHeat MBR [Flag] [9/11/2022, 8:50:37 AM] [OmniPro] 86: BoilerStart [Flag] [9/11/2022, 8:50:37 AM] [OmniPro] 87: BoilStop [Flag] [9/11/2022, 8:50:37 AM] [OmniPro] 89: holdHeat [Flag] [9/11/2022, 8:50:37 AM] [OmniPro] Buttons found: 10 [9/11/2022, 8:50:37 AM] [OmniPro] 1: Calm Lightin [9/11/2022, 8:50:37 AM] [OmniPro] 2: LIghts Off [9/11/2022, 8:50:37 AM] [OmniPro] 3: First Only [9/11/2022, 8:50:37 AM] [OmniPro] 4: Heat 2nd [9/11/2022, 8:50:37 AM] [OmniPro] 5: Heat to 58 [9/11/2022, 8:50:37 AM] [OmniPro] 6: DrivewayOff [9/11/2022, 8:50:37 AM] [OmniPro] 7: Hot Water On [9/11/2022, 8:50:37 AM] [OmniPro] 8: Ht Water Off [9/11/2022, 8:50:37 AM] [OmniPro] 9: Hot Water 1 [9/11/2022, 8:50:37 AM] [OmniPro] 10: Hold Heat [9/11/2022, 8:50:37 AM] [OmniPro] Thermostats found: 3 [9/11/2022, 8:50:37 AM] [OmniPro] 1: LR Tstat [Heat] [9/11/2022, 8:50:37 AM] [OmniPro] 2: 2nd Tstat [Heat] [9/11/2022, 8:50:37 AM] [OmniPro] 3: MBR Tstat [Heat] [9/11/2022, 8:50:37 AM] [OmniPro] Access Controls found: 0 [9/11/2022, 8:50:37 AM] [OmniPro] Auxiliary Sensors found: 3 [9/11/2022, 8:50:37 AM] [OmniPro] 9: 2nd PESM [ProgrammableEnergySaverModule] [9/11/2022, 8:50:37 AM] [OmniPro] 10: BASEMENT PESM [ProgrammableEnergySaverModule] [9/11/2022, 8:50:37 AM] [OmniPro] 12: Outdoor Temp [ExtendedRangeOutdoorTemperature] [9/11/2022, 8:50:37 AM] [OmniPro] Audio Sources found: 0 [9/11/2022, 8:50:37 AM] [OmniPro] Audio Zones found: 0 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory SecuritySystem Area 1 1 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory SmokeSensor Smoke Alarm 3 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory ContactSensor Oil Burner 1 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory ContactSensor Fridge Temp 2 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory ContactSensor Driveway Sensor 5 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory ContactSensor Boiler Demand 6 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory TemperatureSensor 2nd PESM 9 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory TemperatureSensor BASEMENT PESM 10 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory TemperatureSensor Outdoor Temp 12 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory Button Calm Lightin 1 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory Button LIghts Off 2 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory Button First Only 3 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory Button Heat 2nd 4 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory Button Heat to 58 5 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory Button DrivewayOff 6 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory Button Hot Water On 7 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory Button Ht Water Off 8 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory Button Hot Water 1 9 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory Button Hold Heat 10 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory UnitSwitch Ceiling Fan 25 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory UnitSwitch HW Tank 67 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory UnitLightbulb China Cabint 1 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory UnitLightbulb 1st Hallway 18 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory UnitLightbulb Fireplace 19 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory UnitLightbulb 2nd Steps 20 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory UnitLightbulb Mud Room 21 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory UnitLightbulb Kitchen 22 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory UnitLightbulb Front Door 23 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory UnitLightbulb Chimney 24 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory UnitLightbulb Side Door 26 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory Thermostat LR Tstat 1 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory Thermostat 2nd Tstat 2 [9/11/2022, 8:50:37 AM] [OmniPro] AccessoryService addAccessory Accessory Thermostat MBR Tstat 3 [9/11/2022, 8:50:37 AM] [OmniPro] MQTT: No broker host defined

Area 1 [Area 1]: Set Mode failed [Cannot read properties of undefined (reading 'name')]

Plugin Config:

Show your Homebridge config.json here, remove any sensitive information.

{ "name": "OmniPro", "address": "192.168.10.10", "port": 4369, "key1": "”, "key2": "", "includeAreas": true, "includeZones": true, "includeBypassZones": false, "includeButtons": true, "includeUnits": true, "includeThermostats": true, "includeEmergencyAlarms": false, "includeAccessControls": true, "includeAuxiliarySensors": true, "setHomeToAway": false, "setNightToAway": false, "securityCode": "", "includeHumidityControls": false, "targetHumiditySetPointType": 1, "targetHumidityDifference": 0, "minTemperature": 0, "maxTemperature": 40, "defaultAccessoryMappings": { "zone": "none", "zoneFireEmergency": "smoke", "unit": "switch" }, "map": { "zones": { "smoke": "3", "contact": "1,2,5,6" }, "units": { "lightbulb": "1,18,19,20,21,22,23,24,26" } }, "exclude": { "zones": "33,34", "units": "17,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89" }, "garageDoors": [ { "openTime": 10 } ], "pushover": { "alarms": { "burglary": false, "fire": true, "gas": false, "auxiliary": false, "freeze": true, "water": false, "duress": false, "temperature": true }, "troubles": { "freeze": false, "batterylow": false, "acpower": false, "phoneline": false, "digitalcommunicator": false, "fuse": false } }, "mqtt": { "showMqttEvents": false }, "syncTime": false, "showHomebridgeEvents": false, "showOmniEvents": true, "showRequestResponse": false, "clearCache": false, "forceAutoDiscovery": false, "platform": "OmniLinkPlatform" },

Screenshots:

Environment:

mantorok1 commented 1 year ago

Hi @btgh, I suspect that error is caused by either the securityCode in the config file being invalid (ie. not known to the Omni) or it doesn't have a name associated with it. The plugin will read the security code from the Omni to get the corresponding name so it can display a message when you set a mode, example:

[9/12/2022, 6:58:34 AM] [Omni] Area 1 [Area 1]: Set Mode ArmAway [Mantorok]

Could you please confirm and let me know

EDIT: I've taken a closer look at the plugin's code and the plugin will only retrieve security codes that are named. The easiest way to define a name for your security code is to use the "PC Access" app on a Windows PC. I believe you can also do it via the keypad panel. If you're not sure how to do this I can make a change to the plugin to allow a security code without a name - its only used for display purposes anyway so not a big deal.

btgh commented 1 year ago

The security code is correct - I can’t find any name if I look at the controller with PC Access and I’ve set a name in the Homebridge config

On Sep 11, 2022, at 5:18 PM, mantorok1 @.***> wrote:

Hi @btgh https://github.com/btgh, I suspect that error is caused by either the securityCode in the config file being invalid (ie. not known to the Omni) or it doesn't have a name associated with it. The plugin will read the security code from the Omni to get the corresponding name so it can display a message when you set a mode, example:

[9/12/2022, 6:58:34 AM] [Omni] Area 1 [Area 1]: Set Mode ArmAway [Mantorok].Could you please confirm and let me know — Reply to this email directly, view it on GitHub https://github.com/mantorok1/homebridge-omnilink-platform/issues/20#issuecomment-1243044924, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKZTSILZS5WSPOT3HFMPKL3V5ZEAZANCNFSM6AAAAAAQJYWU5M. You are receiving this because you were mentioned.

btgh commented 1 year ago

I had the security in quotes - I also tried without bit get the following error instead:

Get Code Id failed [args.code.padEnd is not a function]

On Sep 12, 2022, at 12:11 PM, Bruce Trvalik @.***> wrote:

The security code is correct - I can’t find any name if I look at the controller with PC Access and I’ve set a name in the Homebridge config

On Sep 11, 2022, at 5:18 PM, mantorok1 @. @.>> wrote:

Hi @btgh https://github.com/btgh, I suspect that error is caused by either the securityCode in the config file being invalid (ie. not known to the Omni) or it doesn't have a name associated with it. The plugin will read the security code from the Omni to get the corresponding name so it can display a message when you set a mode, example:

[9/12/2022, 6:58:34 AM] [Omni] Area 1 [Area 1]: Set Mode ArmAway [Mantorok].Could you please confirm and let me know — Reply to this email directly, view it on GitHub https://github.com/mantorok1/homebridge-omnilink-platform/issues/20#issuecomment-1243044924, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKZTSILZS5WSPOT3HFMPKL3V5ZEAZANCNFSM6AAAAAAQJYWU5M. You are receiving this because you were mentioned.

mantorok1 commented 1 year ago

The security code needs to be in quotes in the config file, like this:

"securityCode": "1234",

In PC Access if you go to the "Setup" tab then click on "Codes" in left side menu you should see all the codes. In the column named "Code Name Description" you need to have a name defined - usually your name. If it says something like "CODE 1" then it hasn't been defined. Are you able to set one, save and then update the Omni with it?

mantorok1 commented 1 year ago

Hi @btgh, Did you end up setting a name for your security code in PC Access? If not then you can upgrade the plugin to 1.5.7 which adds support for unnamed security codes.

btgh commented 1 year ago

adding the name to the security code solved my issue - thanks for the enhancement anyway

btgh commented 1 year ago

I updated the security code with a name for my Omni - once I update the “name” in the config it started working - thanks of the help!

On Sep 12, 2022, at 6:46 PM, mantorok1 @.***> wrote:

The security code needs to be in quotes in the config file, like this:

"securityCode": "1234", In PC Access if you go to the "Setup" tab then click on "Codes" in left side menu you should see all the codes. In the column named "Code Name Description" you need to have a name defined - usually your name. If it says something like "CODE 1" then it hasn't been defined. Are you able to set one, save and then update the Omni with it?

— Reply to this email directly, view it on GitHub https://github.com/mantorok1/homebridge-omnilink-platform/issues/20#issuecomment-1244654321, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKZTSIJDHXA7XVDYJ6NM7IDV56XERANCNFSM6AAAAAAQJYWU5M. You are receiving this because you were mentioned.