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

Question about compatibility for Serial over IP connection (ESP8266) for EVO192 with ver.6.86 #465

Open
qntris opened this issue Jun 5, 2024 · 13 comments
Labels
question Further information is requested

Comments

@qntris
Copy link

qntris commented Jun 5, 2024

Alarm system

EVO192, FW is 6.86 , connection method is Serial over IP with ESP8266 -->

Environment

##Configuration

LOGGING_FILE: null
LOGGING_LEVEL_CONSOLE: 20
LOGGING_LEVEL_FILE: 40
LOGGING_DUMP_PACKETS: true
LOGGING_DUMP_MESSAGES: true
LOGGING_DUMP_STATUS: true
LOGGING_DUMP_EVENTS: true
CONNECTION_TYPE: IP
SERIAL_PORT: /dev/ttyUSB0
SERIAL_BAUD: 9600
IP_CONNECTION_HOST: <ip>
IP_CONNECTION_PORT: 23
IP_CONNECTION_PASSWORD: paradox # tried paradox and null
IP_CONNECTION_SITEID: null
IP_CONNECTION_EMAIL: null
IP_CONNECTION_PANEL_SERIAL: null
IP_CONNECTION_BARE: true
LIMITS: {}
SYNC_TIME: true
PASSWORD: '0000' # Tried 0000 and my main user password
MQTT_ENABLE: true
MQTT_HOST: <host>
MQTT_PORT: 1883
MQTT_USERNAME: <user>
MQTT_PASSWORD: <password>
MQTT_RETAIN: true
MQTT_BIND_ADDRESS: 127.0.0.1
MQTT_BIND_PORT: 0
MQTT_HOMEASSISTANT_AUTODISCOVERY_ENABLE: true

Question

I am using this integration on two other platforms (MG5050) and it works flawlessly. Tried it on an EVO192 with 6.86 fw version and it can't connect to the panel. Not even showing the version of the panel. The ESP8266 is properly configured and I am able to ping it.
I see that in the Compatibility page, the 6.86 fw is listed as working with the IP module, but no info on connection with Serial over IP. Does that mean that it is not working or not tested with it? Should it at least print the panel version in the logs, even if not supported?

Logs (if required)

INFO     - PAI - Starting...
INFO     - PAI.paradox.paradox - Connecting to interface
INFO     - PAI.paradox.paradox - Using IP Connection
INFO     - PAI.paradox.connections.ip.connection - Connecting. Try 1/3
INFO     - PAI.paradox.connections.connection - Connection established
INFO     - PAI.paradox.paradox - Connecting to Panel
INFO     - PAI.paradox.interfaces.mqtt.core - MQTT Broker Connected
ERROR    - PAI.paradox.paradox - Timeout while connecting to panel. Is an other connection active?
@qntris qntris added the question Further information is requested label Jun 5, 2024
@yozik04
Copy link
Collaborator

yozik04 commented Jun 5, 2024

Should be working the same way. What serial speed you configured on ESP module? EVO has higher baud rate.

@qntris
Copy link
Author

qntris commented Jun 5, 2024

I am using the default values from this file:
https://github.com/ParadoxAlarmInterface/pai/files/8478086/ESP8266.OverTCP.to.Serial.txt
What should be the baud rate for EVO192 ?
Do I change it in this line in the file,
//start UART and the server
Serial.begin(9600);

or in the add-on config in Home Assistant:
SERIAL_BAUD: 9600

@yozik04
Copy link
Collaborator

yozik04 commented Jun 7, 2024

38400 or 57600. Depends on what is selected in settings. PAI config does not matter it connects with IP Bare connection to the ESP.

@qntris
Copy link
Author

qntris commented Jun 28, 2024

@yozik04 , I tried multiple things but the result is the same. Here's what I did:

  • changed the baud rate in the config (both in PAI add on and in the firmware I upload to the ESP8266) to 38400 or 57600 - no luck
  • swapped the TX and RX - no luck
  • took an ESP32 WROOM board, flashed it, set it up with 57600 baud rate, connected it to the panel, output is the same (also tried swapping the TX and RX):
    2024-06-28 09:24:47,571 - INFO - MainThread - PAI.paradox.paradox - Connecting to interface 2024-06-28 09:24:47,571 - INFO - MainThread - PAI.paradox.connections.ip.connection - Connecting. Try 1/3 2024-06-28 09:24:47,571 - DEBUG - MainThread - PAI.paradox.interfaces.mqtt.core - MQTT: paradox/interface/pai_status=initializing 2024-06-28 09:24:47,571 - DEBUG - MainThread - PAI.paradox.interfaces.mqtt.core - MQTT: paradox/interface/availability=offline 2024-06-28 09:24:47,648 - INFO - MainThread - PAI.paradox.connections.connection - Connection established 2024-06-28 09:24:47,648 - INFO - MainThread - PAI.paradox.paradox - Connecting to Panel 2024-06-28 09:24:48,650 - DEBUG - MainThread - PAI.paradox.paradox - send/receive timeout in 1.0013 s 2024-06-28 09:24:48,650 - DEBUG - MainThread - PAI.paradox.paradox - Request retry (attempt 2/5) 2024-06-28 09:24:49,652 - DEBUG - MainThread - PAI.paradox.paradox - send/receive timeout in 1.0014 s 2024-06-28 09:24:49,652 - DEBUG - MainThread - PAI.paradox.paradox - Request retry (attempt 3/5) 2024-06-28 09:24:50,653 - DEBUG - MainThread - PAI.paradox.paradox - send/receive timeout in 1.0014 s 2024-06-28 09:24:50,653 - DEBUG - MainThread - PAI.paradox.paradox - Request retry (attempt 4/5) 2024-06-28 09:24:51,655 - DEBUG - MainThread - PAI.paradox.paradox - send/receive timeout in 1.0014 s 2024-06-28 09:24:51,655 - DEBUG - MainThread - PAI.paradox.paradox - Request retry (attempt 5/5) 2024-06-28 09:24:52,656 - DEBUG - MainThread - PAI.paradox.paradox - send/receive timeout in 1.0014 s 2024-06-28 09:24:52,657 - ERROR - MainThread - PAI.paradox.paradox - Timeout while connecting to panel. Is an other connection active? 2024-06-28 09:24:52,657 - ERROR - MainThread - PAI - Unable to connect to alarm 2024-06-28 09:24:52,657 - DEBUG - MainThread - PAI.paradox.interfaces.mqtt.core - MQTT:

I am sure the serial port is not locked since a friend of mine was able to connect to the alarm with BabyWare (couple of months ago) before I installed it in this summer home of mine. The firmware (based on the sticker of the board is 6.86). What else can I try, any ideas?

@yozik04
Copy link
Collaborator

yozik04 commented Jun 28, 2024

Did you try ESP32 WROOM board with 38400 baud rate?

@qntris
Copy link
Author

qntris commented Jun 28, 2024

Hi Yozik, I've just tried but didn't work (again set the 38400 both in the ESP32 firmware and in the PAI add-on config).
I've realised that I was using 3.3v from my buck converter. Increased it to 5V and connected the ESP32 on the 5V pin. Again, no luck. Checking the ESP32 pins with the multimeter, it seems that there's no voltage on the G16 and G17 pins which map to RX2 and TX2. There is proper voltage on the TX0 and RX0 pins. Are you sure, that Serial1 in the code does not have to map the RX2 and TX2 pins as they are not enabled by default?
https://github.com/cybertza/PAI-ESP32

@yozik04
Copy link
Collaborator

yozik04 commented Jun 28, 2024

No idea. Let’s ask @cybertza ;)

@cybertza
Copy link
Contributor

Morning Gents.

Yea, you should be able to use a Software Serial to TCP serial software on a windows machine and babyW to confirm your config of the serial port, speed and so forth, herein lies the answer as well, I believe that certain firmwares do not support unencrypted comms, hence that it worked with babyW.

Then further more so there was a read about multiple ports and so forth. I don't have a Evo192 around, so I can't 100% confirm this, but I have seen more websites advertise and sell unblocked ones.

What is required to unlock them I don't know, may be as simple as a flag from the keypad, may be a firmware build?

Would need to get a 192 to test with, that I have been meaning to do, but haven't ...

@yozik04
Copy link
Collaborator

yozik04 commented Jun 29, 2024

EVO 6.86 does not have encrypted serial.

@cybertza
Copy link
Contributor

I would then recomend testing via the method I suggested. Then configuration for this is basically just a serial tcp bridge.

I would have to get a 192 to personally test it, so you guys are welcome to send me one and I'll do the testing and manual for one.

Th rest is rather well documented, and as mentioned unit is just a serial to tcp bridge, technically you can do the same as the paradox usb as with a usb to serial device on the 5050 range and alike.

Without hardware to test I can unfortunately not give more input on the topic, nor confirm the above statements made above.

@qntris
Copy link
Author

qntris commented Jul 2, 2024

I managed to fix it and here's what I've done:

  1. Used WinLoad to update the firmware from 4.63 -> 6.90 (it was strange that the sticker on the alarm panel was 6.86)
  2. Confirmed that the baud rate is 57600
  3. Changed the jumper wires for the TX and RX pins coming from the ESP8266 (switched to ESP8266 since the result with ESP32 was the same)
  4. Exchanged the Rx and Tx pins (perhaps on the EVO they are RX , TX, GND, 12V, instead of TX, RX...)

Except the firmware upgrade, I've tried the other three steps multiple times before that and it didn't work. Perhaps it was the firmware or some combination of those.

Then I was able to successfully connect to the panel. I am noticing a 2-3 seconds delay between the time a sensor is activated and when the MQTT message is received. Is that expected and would it improve if I use ESP32?

@yozik04
Copy link
Collaborator

yozik04 commented Jul 2, 2024

Check this: https://github.com/ParadoxAlarmInterface/pai/wiki/Configuration#improving-performance

@cybertza
Copy link
Contributor

cybertza commented Jul 2, 2024

Yea, the esp 8266 should be well fine at 56k even as soft serial, so if the WiFi is fine, then it should be just about the same, I just found the 8266's give up easier if you don't have any circuit to protect it, it's just been my experience, that the esp32 feels like it works better for longer, they obviously run a bit faster and some have multi core so the WiFi and the serial/soft serial don't always run in the same core.

None of this is truly scientific, my first 8266 ran for about a year, second one the same, Wemos 32 is probably sitting around 2 years fairly stable.

I'm running something like this with it.

https://www.wemos.cc/en/latest/d1_mini_shield/dc_power.html

https://www.wemos.cc/en/latest/s2/s2_mini.html

Think that's more or less the combo.

If you do find some interesting results, let me know then I can update the documents.

Especially relating to the ports and such, esp32 also has more hw serial, so could interface into the alarm more than one place if the panel supports it.

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

No branches or pull requests

3 participants