K1LL3R234 / homebridge-texecom

A plugin for homebridge (https://github.com/nfarina/homebridge) to integrate Texecom Premier Elite zones into HomeKit
MIT License
0 stars 0 forks source link

Unable to connect - comport 3 #6

Closed metaljay closed 1 hour ago

metaljay commented 1 day ago

Hi,

I am able to connect via wintex remotely using an ESP8266 and ser2net but when I set comport3 as 'creston' and install the plugin nothing actually works, where am I going wrong? Could it be the data being sent from ser2net? (its set a no processing or formatting, just raw data)

I have smart com in comport 1 and 2.

[10/7/2024, 3:32:17 PM] [Texecom] Initializing Texecom platform...
[10/7/2024, 3:32:17 PM] [Texecom] Computed SN: 4ZOgHs+NMK0K/+/TMs6TTjL/znI=
[10/7/2024, 3:32:17 PM] [Texecom] Computed SN: b8l4r3KNQ8WfqkANX24EcayFDUw=
[10/7/2024, 3:32:17 PM] [Texecom] Computed SN: IhQHwDrlxzEJzOcdJ+JGN4JPMzM=
[10/7/2024, 3:32:17 PM] [Texecom] Computed SN: xjUopSJ0o10cB72eVag8brBz3oE=
[10/7/2024, 3:32:17 PM] [Texecom] Computed SN: 3h9TtvvD/s01sLvJY+IZAqFJ5eM=
[10/7/2024, 3:32:17 PM] [Texecom] Computed SN: 4ZOgHs+NMK0K/+/TMs6TTjL/znI=
[10/7/2024, 3:32:17 PM] Initializing platform accessory 'Hallway'...
[10/7/2024, 3:32:17 PM] Initializing platform accessory 'Lounge'...
[10/7/2024, 3:32:17 PM] Initializing platform accessory 'Kitchen'...
[10/7/2024, 3:32:17 PM] Initializing platform accessory 'Garage'...
[10/7/2024, 3:32:17 PM] Initializing platform accessory 'Landing'...
[10/7/2024, 3:32:17 PM] Initializing platform accessory 'Home'...
[2024/10/07, 15:32:17] [Texecom[DEBUG]] Set target state 3 and current state 3 in response to notification from alarm
[10/7/2024, 3:32:17 PM] [Texecom] Connected via IP
[2024/10/07, 15:33:42] [Texecom[DEBUG]] Sending arm/disarm command 1 to area 001
[2024/10/07, 15:33:42] [Texecom[DEBUG]] Command sent: W1234
[2024/10/07, 15:33:44] [Texecom[DEBUG]] Retrying command due to timeout, retries left: 1
[2024/10/07, 15:33:44] [Texecom[DEBUG]] Command sent: W1234
[2024/10/07, 15:33:44] [Texecom[DEBUG]] IP data received: O�H
[2024/10/07, 15:33:44] [Texecom[DEBUG]] Unknown string from Texecom: O�H
[2024/10/07, 15:33:46] [Texecom[DEBUG]] Callback with error Error: Timeout after retries

Here is my config:

{
    "name": "Texecom",
    "ip_address": "192.168.2.10",
    "ip_port": 23,
    "baud_rate": 19200,
    "udl": 1234,
    "zones": [
        {
            "name": "Hallway",
            "zone_number": "1",
            "zone_type": "motion",
            "dwell": 0
        },
        {
            "name": "Lounge",
            "zone_number": "2",
            "zone_type": "motion",
            "dwell": 0
        },
        {
            "name": "Kitchen",
            "zone_number": "3",
            "zone_type": "motion",
            "dwell": 0
        },
        {
            "name": "Garage",
            "zone_number": "4",
            "zone_type": "motion",
            "dwell": 0
        },
        {
            "name": "Landing",
            "zone_number": "5",
            "zone_type": "motion",
            "dwell": 0
        }
    ],
    "areas": [
        {
            "name": "Home",
            "area_number": "1",
            "area_type": "securitysystem",
            "dwell": 0
        }
    ],
    "debug": true,
    "platform": "Texecom"
}
Screenshot 2024-10-07 at 3 40 43 pm
metaljay commented 1 day ago

Weirdly, if I change comport 3 to 'nothing fitted' I CAN set the alarm status but I don't see any triggers from the sensors. Someone commented on another thread (for another homeassistant plugin for Texecom) that it's quite sensitive to the data being sent over multiple packets. Could this be changed at all? https://github.com/dchesterton/texecom2mqtt-hassio/issues/77

Screenshot 2024-10-07 at 7 00 22 pm
[2024/10/07, 18:58:37] [Texecom[DEBUG]] Sending arm/disarm command 1 to area 001
[2024/10/07, 18:58:37] [Texecom[DEBUG]] Command sent: W1234
[2024/10/07, 18:58:38] [Texecom[DEBUG]] IP data received: OK

[2024/10/07, 18:58:38] [Texecom[DEBUG]] Unknown string from Texecom: OK

[2024/10/07, 18:58:38] [Texecom[DEBUG]] Command sent: A
[2024/10/07, 18:58:39] [Texecom[DEBUG]] Retrying command due to timeout, retries left: 1
[2024/10/07, 18:58:39] [Texecom[DEBUG]] Command sent: W1234
[2024/10/07, 18:58:40] [Texecom[DEBUG]] IP data received: OK

[2024/10/07, 18:58:40] [Texecom[DEBUG]] Unknown string from Texecom: OK

[2024/10/07, 18:58:40] [Texecom[DEBUG]] Setting current status of area 001 to 1 because alarm responded OK
[2024/10/07, 18:59:01] [Texecom[DEBUG]] Sending arm/disarm command 3 to area 001
[2024/10/07, 18:59:01] [Texecom[DEBUG]] Command sent: W1234
[2024/10/07, 18:59:03] [Texecom[DEBUG]] IP data received: OK

[2024/10/07, 18:59:03] [Texecom[DEBUG]] Unknown string from Texecom: OK

[2024/10/07, 18:59:03] [Texecom[DEBUG]] Command sent: D
[2024/10/07, 18:59:03] [Texecom[DEBUG]] Retrying command due to timeout, retries left: 1
[2024/10/07, 18:59:03] [Texecom[DEBUG]] Command sent: W1234
[2024/10/07, 18:59:05] [Texecom[DEBUG]] IP data received: OK

[2024/10/07, 18:59:05] [Texecom[DEBUG]] Unknown string from Texecom: OK

[2024/10/07, 18:59:05] [Texecom[DEBUG]] Setting current status of area 001 to 3 because alarm responded OK

If I go back to creston:

[2024/10/07, 19:03:23] [Texecom[DEBUG]] Sending arm/disarm command 2 to area 001
[2024/10/07, 19:03:23] [Texecom[DEBUG]] Command sent: W1234
[2024/10/07, 19:03:25] [Texecom[DEBUG]] Retrying command due to timeout, retries left: 1
[2024/10/07, 19:03:25] [Texecom[DEBUG]] Command sent: W1234
[2024/10/07, 19:03:26] [Texecom[DEBUG]] IP data received: O�H
[2024/10/07, 19:03:26] [Texecom[DEBUG]] Unknown string from Texecom: O�H
[2024/10/07, 19:03:27] [Texecom[DEBUG]] Callback with error Error: Timeout after retries
[2024/10/07, 19:03:37] [Texecom[DEBUG]] Sending arm/disarm command 0 to area 001
[2024/10/07, 19:03:37] [Texecom[DEBUG]] Command sent: W1234
[2024/10/07, 19:03:38] [Texecom[DEBUG]] IP data received: O�H
[2024/10/07, 19:03:38] [Texecom[DEBUG]] Unknown string from Texecom: O�H
[2024/10/07, 19:03:39] [Texecom[DEBUG]] Retrying command due to timeout, retries left: 1
[2024/10/07, 19:03:39] [Texecom[DEBUG]] Command sent: W1234
[2024/10/07, 19:03:41] [Texecom[DEBUG]] Callback with error Error: Timeout after retries
[2024/10/07, 19:03:41] [Texecom[DEBUG]] IP data received: O�H
[2024/10/07, 19:03:41] [Texecom[DEBUG]] Unknown string from Texecom: O�H

I am happy to donate an ESP8266 board to you to play around with if you're interested?

K1LL3R234 commented 12 hours ago

Hi, At the serial config of the device. Can you maybe change that to 1 stop bit and not 2 and see if that works.

metaljay commented 3 hours ago

amazing! that now works and I can see triggers + set the alarm, weirdly if I turn off the debug I get this error but it still works?:

Error processing zones for area 0. Please add zones under area.
Error processing zones for area 0. Please add zones under area.
Error processing zones for area 0. Please add zones under area.
Error processing zones for area 0. Please add zones under area.
Error processing zones for area 0. Please add zones under area.

At least it works though! ive donated too 😁

Screenshot 2024-10-08 at 4 43 17 pm

As an aside, why didn't you want to join up with the other Texecom plugin rather than a fork?

K1LL3R234 commented 2 hours ago

I am glad it works. Just check under areas you have to add the zones associated to the area. I added that so that when a zone gets triggered and the area is armed it will trigger.

"platforms": [
    {
        "platform": "Texecom",
        "serial_device": "/dev/ttyUSB0",
        "baud_rate": 19200,
        "udl":1234,
        "zones": [
            {
                "name": "Living Room",
                "zone_number": "7",
                "zone_type": "motion",
                "dwell": 1000
            },
            {
                "name": "Front Door",
                "zone_number": "15",
                "zone_type": "contact",
                "dwell": 1000
            },
            {
                "name": "Back Yard",
                "zone_number": "19",
                "zone_type": "motion",
                "dwell": 1000
            }
        ],
        "areas": [
            {
                "name": "Inside",
                "area_number": "1",
                "area_type": "securitysystem",
                "dwell": 0,
                "zones":[7,15]
            },
            {
                "name": "Outside",
                "area_number": "2",
                "area_type": "securitysystem",
                "dwell": 0,
                "zones":[19]
            }
        ]
    }
]

Thank you for the donation really appreciate it.

I don't join it because I made the changes on the original one for arming etc but they were so rude and decided to fork and start my own.

metaljay commented 1 hour ago

brill, happy to close this as everything is working. My suggestion is to work on getting this plugin verified for homebridge 2.0 so it will become the default plugin.