ParadoxAlarmInterface / pai

Paradox Magellan, Spectra and EVO, with MQTT, Signal, Pushbullet, Pushover and others
https://gitter.im/paradox-alarm-interface
Eclipse Public License 2.0
340 stars 91 forks source link

SP6000+ unable to complete connection #334

Closed CenterNZ closed 1 year ago

CenterNZ commented 1 year ago

Alarm system

Describe your panel model (ex: EVO192, Spectra SP4000, Magellan MG5050), access mode (Serial, IP150, etc..). SP6000+, with ESP32 Serial/IP adaptor. Have tested on 1.05, 1.10 and 1.20 firmware on panel.

Environment

HASSIO running on Proxmox,

Git branch

Both master and dev branches I have tried.

Describe the bug

Unable to connect to SP6000+ board with PAI. Serial connection is established, panel replies with

To Reproduce

Steps to reproduce the behavior: Start PAI with ESP32 serial/IP interface. Have tried with & without logic level shifter.

Logs

2022-12-16 21:56:28,240 - INFO     - MainThread - PAI - Starting Paradox Alarm Interface 3.2.0-dev
2022-12-16 21:56:28,240 - INFO     - MainThread - PAI - Config loaded from /data/options.json
2022-12-16 21:56:28,240 - INFO     - MainThread - PAI - Console Log level set to 1
2022-12-16 21:56:28,243 - DEBUG    - MainThread - PAI.paradox.interfaces.interface_manager - Registering IPInterface
2022-12-16 21:56:28,243 - INFO     - MainThread - PAI.paradox.interfaces.ip_interface.interface - Starting IPInterface Interface
2022-12-16 21:56:28,243 - INFO     - MainThread - PAI - Starting...
2022-12-16 21:56:28,243 - INFO     - MainThread - PAI.paradox.paradox - Connecting to interface
2022-12-16 21:56:28,243 - INFO     - MainThread - PAI.paradox.paradox - Using IP Connection
2022-12-16 21:56:28,373 - INFO     - MainThread - PAI.paradox.connections.ip.connection - Connecting. Try 1/3
2022-12-16 21:56:28,374 - INFO     - MainThread - PAI.paradox.interfaces.ip_interface.interface - IP Interface: serving on ('0.0.0.0', 10000)
2022-12-16 21:56:28,374 - INFO     - MainThread - PAI.paradox.interfaces.ip_interface.interface - IP Interface started
2022-12-16 21:56:28,466 - INFO     - MainThread - PAI.paradox.connections.connection - Connection established
2022-12-16 21:56:28,466 - INFO     - MainThread - PAI.paradox.paradox - Connecting to Panel
2022-12-16 21:56:28,879 - DEBUG    - MainThread - PAI.paradox.lib.encodings - Loaded paradox_en encoding
2022-12-16 21:56:28,880 - INFO     - MainThread - PAI.paradox.paradox - Panel Identified SP600+  version 1.20 build 0
2022-12-16 21:56:28,880 - INFO     - MainThread - PAI.paradox.paradox - Initiating panel connection
2022-12-16 21:56:29,882 - DEBUG    - MainThread - PAI.paradox.paradox - Request retry (attempt 2/5)
2022-12-16 21:56:30,883 - DEBUG    - MainThread - PAI.paradox.paradox - Request retry (attempt 3/5)
2022-12-16 21:56:31,885 - DEBUG    - MainThread - PAI.paradox.paradox - Request retry (attempt 4/5)
2022-12-16 21:56:32,887 - DEBUG    - MainThread - PAI.paradox.paradox - Request retry (attempt 5/5)
2022-12-16 21:56:33,889 - ERROR    - MainThread - PAI.paradox.paradox - Timeout while connecting to panel. Is an other connection active?
2022-12-16 21:56:33,889 - ERROR    - MainThread - PAI - Unable to connect to alarm

Snippet from associated UART debug output:

[22:00:42][D][uart_debug:114]: >>> 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 72
[22:00:43][D][uart_debug:114]: <<< 72 FF 04 03 10 00 A4 C6 01 01 20 00 29 20 43 CE 00 32 01 10 06 00 00 00 00 E4 FF 57 53 50 36 30 30 2B 00 07 5C
[22:00:43][D][uart_debug:114]: >>> 5F 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 81
[22:00:44][D][uart_debug:114]: >>> 5F 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 81
[22:00:45][D][uart_debug:114]: >>> 5F 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 81
[22:00:46][D][uart_debug:114]: >>> 5F 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 81
[22:00:48][D][uart_debug:114]: >>> 5F 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 81

logfile.txt config.txt

yozik04 commented 1 year ago

Maybe old firmware? See Compatibility page

yozik04 commented 1 year ago

Somebody also mentioned that 115200 baud needs to be used for SP6000+. But if panel answeres maybe you have it right.

CenterNZ commented 1 year ago

Yeah, have baud set to 115200 in the serial to IP. Also have now just tried direct serial connection to server (without the ESP) with the same results unfortunately.

yozik04 commented 1 year ago

I have inspected serial capture and it looks like we see new protocol there. Maybe it is the new encrypted protocol that we did not had time to investigate yet.

I see common prefix is e0 fe 2e 00 (some byte command)

Something needs to be added here: https://github.com/ParadoxAlarmInterface/pai/blob/119c14b19f63520dced4de5a4b30ff23a36ae62b/paradox/hardware/spectra_magellan/panel.py#L173 Previously we only had e0 prefixed Live events.

e0 ff = requested event (based on EVO protocol) e0 fe = something new that we have not seen before.

One more thing: I found product_id 198 in capture but SPECTRA_SP6000_PLUS is 29 in our enum. Panel has label: WSP600+

yozik04 commented 1 year ago

Let's continue in #337