haywirecoder / homebridge-envisalink-ademco

Homebridge plug-in for Envisalink Ademco module
MIT License
16 stars 6 forks source link

EnvisaLink ademco plugin stopped working after updating details below #47

Closed damdude closed 11 months ago

damdude commented 11 months ago

unable to read sensor status or change security alarm modes. Homebrige version: 1.7.0, Node.js version: v18.18.2. Homebridge & this envisalink-ademco plugin used to work fine and was able to read sensor status and arm security but after updating its not anymore. I did re-setup the home bridge and all the partitions in HomeKit again after updating.

[11/20/2023, 8:54:54 PM] [Envisalink-Ademco] Starting connection to envisalink module at: 192.168.1.XX, port: 4025 [11/20/2023, 8:54:57 PM] [Envisalink-Ademco] getPanelStatusLowBattery: Return Low Battery Status - 0 [11/20/2023, 8:55:00 PM] [Envisalink-Ademco] setTargetState: Homekit alarm requested set - 2 [11/20/2023, 8:55:00 PM] [Envisalink-Ademco] Arming the alarm system to Night, [Partition 1]. [11/20/2023, 8:55:00 PM] [Envisalink-Ademco] setAlarmState: Partition state command issued. [11/20/2023, 8:55:00 PM] [Envisalink-Ademco] setAlarmState: Command not sent returning home state 3 [11/20/2023, 8:55:00 PM] [homebridge-envisalink-ademco] Characteristic 'Security System Target State': SET handler returned write response value, though the characteristic doesn't support write response. See https://homebridge.io/w/JtMGR for more info. [11/20/2023, 8:55:00 PM] [homebridge-envisalink-ademco] Error: at SecuritySystemTargetState.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:3011:105) at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2627:22 at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:15:18 at EnvisalinkPartitionAccessory.setTargetState (/usr/local/lib/node_modules/homebridge-envisalink-ademco/accessories/partitionAccessory.js:221:10) at SecuritySystemTargetState. (/usr/local/lib/node_modules/homebridge-envisalink-ademco/accessories/partitionAccessory.js:90:52) at SecuritySystemTargetState.emit (node:events:517:28) at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2596:16 at new Promise () at SecuritySystemTargetState. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2594:14) at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:195:27) [11/20/2023, 8:55:00 PM] [Envisalink-Ademco] Setting Alarm state to READY

haywirecoder commented 11 months ago

Hi,

I am running 1.7.1 with Node v20, but also ran the previous version of Node without issue. Few comments

  1. Can you provide all logs associated with the plug start-up? I notice you have a "Starting connection to envisalink module at: 192.168.1.XX, port: 4025", but never successful a connection.
  2. Can you provide the config for the plug-in. Note: You should mask your PIN.
damdude commented 11 months ago
  1. Full Log is here Loading logs using "custom" method... CMD: pm2 logs --raw --out --lines 80 homebridge

[TAILING] Tailing last 80 lines for [homebridge] process (change the value with --lines option) /root/.pm2/logs/homebridge-out.log last 80 lines: [11/21/2023, 5:53:13 PM] [Envisalink-Ademco] Loading accessory from cache: SIDE DOOR [11/21/2023, 5:53:13 PM] [Envisalink-Ademco] Configuring Honeywell VISTA-20P for Homekit... [11/21/2023, 5:53:13 PM] [Envisalink-Ademco] refreshAccessories: Partition number - 1 configured. [11/21/2023, 5:53:13 PM] [Envisalink-Ademco] refreshAccessories: Zone number - 2 configured. [11/21/2023, 5:53:13 PM] [Envisalink-Ademco] refreshAccessories: Zone number - 4 configured. [11/21/2023, 5:53:13 PM] [Envisalink-Ademco] refreshAccessories: Zone number - 3 configured. [11/21/2023, 5:53:13 PM] [Envisalink-Ademco] refreshAccessories: Zone number - 5 configured. [11/21/2023, 5:53:13 PM] [Envisalink-Ademco] Partition configured: 1 [11/21/2023, 5:53:13 PM] [Envisalink-Ademco] Zone accessories configured: 4 [11/21/2023, 5:53:13 PM] [Envisalink-Ademco] Starting connection to envisalink module at: 192.168.1.XX, port: 4025 [11/21/2023, 5:53:13 PM] Publishing bridge accessory (name: Homebridge, publishInfo: { username: 'XX:XX:XX:XX:XX:XX', port: 51826, pincode: '*-*-', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: undefined }). Setup Payload: X-HM://0023ISYWY4E7S Scan this code with your HomeKit app on your iOS device to pair with Homebridge:

Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 031-45-154 │     
└────────────┘     

[11/21/2023, 5:53:13 PM] Homebridge v1.7.0 (HAP v0.11.1) (Homebridge) is running on port 51826. prebuild-file-path: /usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/prebuilds/freebsd-x64/node.abi108.node [11/21/2023, 5:53:14 PM] [Envisalink-Ademco] getPanelStatusLowBattery: Return Low Battery Status - 0 [11/21/2023, 5:53:37 PM] [Envisalink-Ademco] envisalinkUpdate: Status changed - { source: 'session_connect_status', qualifier: 1 } [11/21/2023, 5:53:37 PM] [Envisalink-Ademco] Starting connection to envisalink module at: 192.168.1.XX, port: 4025 [11/21/2023, 5:53:58 PM] [Envisalink-Ademco] getPanelStatusLowBattery: Return Low Battery Status - 0 [11/21/2023, 5:54:01 PM] [Envisalink-Ademco] Starting connection to envisalink module at: 192.168.1.XX, port: 4025 [11/21/2023, 5:54:02 PM] [Envisalink-Ademco] setTargetState: Homekit alarm requested set - 2 [11/21/2023, 5:54:02 PM] [Envisalink-Ademco] Arming the alarm system to Night, [Partition 1]. [11/21/2023, 5:54:02 PM] [Envisalink-Ademco] setAlarmState: Partition state command issued. [11/21/2023, 5:54:02 PM] [Envisalink-Ademco] setAlarmState: Command not sent returning home state 3 [11/21/2023, 5:54:02 PM] [homebridge-envisalink-ademco] Characteristic 'Security System Target State': SET handler returned write response value, though the characteristic doesn't support write response. See https://homebridge.io/w/JtMGR for more info. [11/21/2023, 5:54:02 PM] [homebridge-envisalink-ademco] Error: at SecuritySystemTargetState.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:3011:105) at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2627:22 at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:15:18 at EnvisalinkPartitionAccessory.setTargetState (/usr/local/lib/node_modules/homebridge-envisalink-ademco/accessories/partitionAccessory.js:221:10) at SecuritySystemTargetState. (/usr/local/lib/node_modules/homebridge-envisalink-ademco/accessories/partitionAccessory.js:90:52) at SecuritySystemTargetState.emit (node:events:517:28) at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2596:16 at new Promise () at SecuritySystemTargetState. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2594:14) at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:195:27) [11/21/2023, 5:54:03 PM] [Envisalink-Ademco] Setting Alarm state to READY

[11/21/2023, 5:54:24 PM] [Envisalink-Ademco] Starting connection to envisalink module at: 192.168.1.XX, port: 4025

  1. Here is the config. { "bridge": { "name": "Homebridge", "username": "XX:XX:XX:XX:XX:XX", "port": 51826, "pin": "XXX-XX-XXX" }, "description": "Home Smart Home", "platforms": [ { "platform": "config", "name": "Config", "port": "80", "auth": "form", "theme": "red", "restart": "pm2 restart homebridge", "sudo": false, "log": { "method": "custom", "command": "pm2 logs --raw --out --lines 80 homebridge" } }, { "name": "Envisalink-Ademco", "host": "192.168.1.XX", "port": 4025, "deviceType": "20P", "password": "user", "pin": "XXXX", "changePartition": false, "openZoneTimeout": 30, "heartbeatInterval": 30, "commandTimeOut": 10, "autoReconnect": true, "sessionWatcher": true, "chimeToggle": false, "envisalinkFailureSuppress": false, "maintenanceMode": false, "partitions": [ { "name": "House", "partitionNumber": "1" } ], "zones": [ { "name": "DOOR1", "partition": "1", "zoneNumber": "2", "sensorType": "door" }, { "name": "WINDOW1", "partition": "1", "zoneNumber": "4", "sensorType": "window" }, { "name": "DOOR2", "partition": "1", "zoneNumber": "3", "sensorType": "door" }, { "name": "DOOR3", "partition": "1", "zoneNumber": "5", "sensorType": "door" } ], "bypass": [ { "enabledbyPass": false } ], "platform": "Envisalink-Ademco" } ], "accessories": [] }
damdude commented 11 months ago

Keep in mind Homebridge is running on TrueNAS-13.0-U5.3 in Jail as plugin. Also, I am able to access the envisaLink through eyezon website and even arm it through eyezon. which means that envisalink doesn't have connection issues.

haywirecoder commented 11 months ago

The log is showing the plug never connecting to the eyeon module. Otherwise, you would see the details associated with that connection. It's interesting, that the Node netlib is not return errors to provide details of the issues that are occurring. However, the log above does actually show 3 attempts, so the module is re-trying to connect. The "Characteristic 'Security System Target State" is an issue that is corrected in an upcoming version, but it is not the root of your issue and doesn't cause plug-in to restart.

Accessing Eyezon website doesn't indicate the module is reachable from your homebridge server. The best way to determine if it is functional is from the homebridge server/instance if you can reach the IP and port of eyezon module (login into the module itself). Can't speak to TrueNas configuration since that is a configuration that I am not familiar with...

damdude commented 11 months ago

I found the issue and I feel embarrassed for not double checking it. looks like put in the wrong IP for the envisaLink it was written as 192.168.1.XX , whereas it was supposed to be 192.168.7.XX. all fixed and working now. Now that I have your attention, do you documentation on how to setup non-global partition pin on this alarm system, and I have glass door break sensor and fire alarm ( I think ) sensor but not hooked up any documentation on how to connect and bring live would be greatly appreciated.

haywirecoder commented 10 months ago

Glad you found the problem. IMO the best document for the program panel is YouTube videos. The Alarm Grid channel is very good and provides step-by-step videos on how to add various sensors. Keep in mind most Vista 10p-21p all use the same programming structure so if the video is talking about 15p it is most likely the same instruction for 21p and visa versa.