Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnvisaLink Network Error #62

Closed
danielraffel opened this issue Jan 2, 2025 · 3 comments
Closed

EnvisaLink Network Error #62

danielraffel opened this issue Jan 2, 2025 · 3 comments

Comments

@danielraffel
Copy link

danielraffel commented Jan 2, 2025

Over the past 24 hours, I’ve noticed that the Homebridge Envisalink Ademco plugin can no longer control my Eyezon Duo via the Apple Home app.

Running Proxmox with Homebridge v1.8.5 · UI v4.67.0 · on Node.js v22.12.0 on Debian v12 (6.8.12-5-pve)

However, control of the Duo through the Eyezon app works without issues, and accessing the Duo device portal via the IP address specified in the configuration also functions properly.

{
    "name": "Envisalink-Ademco",
    "host": "192.168.86.150",
    "port": 4025,

Here are some logs captured after rebooting Homebridge and attempting to control the alarm using the alarm controller widget in the Apple Home app. For instance, trying to switch the alarm from Off to Night doesn’t work. However, it works correctly at the panel and in the Eyezon mobile app.

image
[1/1/2025, 10:16:40 PM] [Envisalink-Ademco] getPanelStatusLowBattery: Return Low Battery Status -  0
[1/1/2025, 10:17:00 PM] [Envisalink-Ademco] getPanelStatusLowBattery: Return Low Battery Status -  0
[1/1/2025, 10:17:08 PM] [Envisalink-Ademco] getPanelStatusLowBattery: Return Low Battery Status -  0
[1/1/2025, 10:17:13 PM] [Envisalink-Ademco] getPanelStatusLowBattery: Return Low Battery Status -  0
[1/1/2025, 10:17:16 PM] [Envisalink-Ademco] setTargetState: Homekit alarm requested set -  2
[1/1/2025, 10:17:16 PM] [Envisalink-Ademco] setTargetState: Current alarm state is -  READY
[1/1/2025, 10:17:16 PM] [Envisalink-Ademco] Arming the alarm system to Night, [Partition 1].
[1/1/2025, 10:17:16 PM] [Envisalink-Ademco] setTargetState: Sending command(s).
[1/1/2025, 10:17:16 PM] [Envisalink-Ademco] Data Stream: data stream is: {"connecting":true,"_hadError":false,"_parent":null,"_host":null,"_closeAfterHandlingError":false,"_events":{"end":[null,null]},"_readableState":{"highWaterMark":65536,"buffer":[],"bufferIndex":0,"length":0,"pipes":[],"awaitDrainWriters":null},"_writableState":{"highWaterMark":65536,"length":0,"corked":0,"writelen":0,"bufferedIndex":0,"pendingcb":0},"allowHalfOpen":false,"_eventsCount":5,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null}
[1/1/2025, 10:17:16 PM] [Envisalink-Ademco] setTargetState: Command unsuccessful, returning to homekit previous state -  3
[1/1/2025, 10:17:16 PM] [Envisalink-Ademco] Command not successful. Current session connected status is: false and data stream object is defined: true
[1/1/2025, 10:17:17 PM] [Envisalink-Ademco] setAlarmRecoveryValues: Setting Alarm state to READY
[1/1/2025, 10:18:53 PM] [Envisalink-Ademco] EnvisaLink Network Error:  Error: connect ETIMEDOUT 192.168.86.150:4025
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16) {
  errno: -110,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '192.168.86.150',
  port: 4025
}
[1/1/2025, 10:18:53 PM] [Envisalink-Ademco] EnvisaLink server connection closed due to a transmission error. 
[1/1/2025, 10:18:53 PM] [Envisalink-Ademco] envisalinkUpdate:  Status changed -  { source: 'session_connect_status', qualifier: 1 }
[1/1/2025, 10:18:53 PM] [Envisalink-Ademco] Re-attempting server connection every: 30 seconds.
[1/1/2025, 10:19:23 PM] [Envisalink-Ademco] Checking for Heartbeat and connection status...
[1/1/2025, 10:19:23 PM] [Envisalink-Ademco] Heartbeat time drift is: 163, connection is active: false and the data stream object defined: true. Trying to re-connect session...
[1/1/2025, 10:19:28 PM] [Envisalink-Ademco] Starting connection to envisalink module at: 192.168.86.150, port: 4025
[1/1/2025, 10:21:41 PM] [Envisalink-Ademco] EnvisaLink Network Error:  Error: connect ETIMEDOUT 192.168.86.150:4025
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16) {
  errno: -110,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '192.168.86.150',
  port: 4025
}
[1/1/2025, 10:21:41 PM] [Envisalink-Ademco] EnvisaLink server connection closed due to a transmission error. 
[1/1/2025, 10:21:41 PM] [Envisalink-Ademco] Re-attempting server connection every: 30 seconds.

Duo settings
image

Homebridge is running on Debian and has no problem pinging the Duo

root@homebridge:~# ping 192.168.86.150
PING 192.168.86.150 (192.168.86.150) 56(84) bytes of data.
64 bytes from 192.168.86.150: icmp_seq=1 ttl=64 time=0.741 ms

Debian also has no nftable rules or firewall installed

root@homebridge:~# sudo nft list ruleset
table inet filter {
        chain input {
                type filter hook input priority filter; policy accept;
        }

        chain forward {
                type filter hook forward priority filter; policy accept;
        }

        chain output {
                type filter hook output priority filter; policy accept;
        }
}
root@homebridge:~# sudo ip link show eth0
2: eth0@if15: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether bc:24:11:cc:07:5e brd ff:ff:ff:ff:ff:ff link-netnsid 0

Update
I tried uninstalling and reinstalling the Homebridge plugin (including the child bridge in the Home app) and re-paired it with Apple Home. However, it’s still unable to connect via TPI:

[1/2/2025, 12:08:17 PM] [Envisalink-Ademco] Command not successful. Current session connected status is: false and data stream object is defined: true
[1/2/2025, 12:10:22 PM] [Envisalink-Ademco] EnvisaLink Network Error:  Error: connect ETIMEDOUT 192.168.86.150:4025
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16) {
  errno: -110,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '192.168.86.150',
  port: 4025
}
[1/2/2025, 12:10:22 PM] [Envisalink-Ademco] EnvisaLink server connection closed due to a transmission error. 

I tried calling Eyezon but they don't support TPI integrations and didn't see an issue with the device.

@danielraffel danielraffel changed the title EnvisaLink Network Error: EnvisaLink Network Error Jan 2, 2025
@haywirecoder
Copy link
Owner

Hi,
The error above is a low-level node network stack error. I see you have tested the network connection between Homebridge and the Envisalink module, using Ping that is using ICMP. The plug-in is attempting the connection over TCP over port 4025.

  1. Confirm that you can talk over TCP to port 4025. Using Netcat or Telnet -- should help you verify If indeed you have a good connection between the server and Envisalist two devices.
  2. Two confirm nothing else is talking to the EnvisaLink TPI. EnvisaLink only allows one device over TPI. The Duo device portal via the IP uses a completely different set of services/ports.

In my experience, things just don't stop working without change. I would review your server logs and also attempt to restart EnvisaLink if you haven't already.

@danielraffel
Copy link
Author

thanks for the feedback. while I haven't fixed this issue agree it's a networking issue. assuming I ever figure this out I'll re-open and share my solution. in the meantime, this is not a bug with your software.

@danielraffel
Copy link
Author

tl;dr I switched to a machine that was using a usb ethernet dongle that had RX and TX checksumming enabled which was filtering traffic. Disabling it fixed my issue.

https://danielraffel.me/til/2025/01/07/how-i-fixed-proxmox-network-issues-caused-by-settings-on-a-usb-ethernet-dongle/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants