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
337 stars 90 forks source link

MG5050+ locked serial #349

Open yusrimathews opened 1 year ago

yusrimathews commented 1 year ago

Hi,

I have an MG5050+ I tried multiple combinations of the configuration and continuously get the following in the logs:

INFO - PAI.paradox.connections.connection - Connection established

INFO - PAI.paradox.paradox - Connecting to Panel

ERROR - PAI.paradox.paradox - Timeout while connecting to panel. Is an other connection active?

ERROR - PAI - Unable to connect to alarm

After some investigation, the MG5050+ serial ports requires to be unlocked, as per the installers manual:

Enter section [300] to unlock your MG5050+ panel serial ports for use with third-party devices using a TM70/ TM50 Touch keypad.

So my questions:

  1. Is this expected behaviour/ Is the MG5050+ supported?
  2. Anyone else with the issue/ Is there another way to unlock the serial ports?
yusrimathews commented 1 year ago

I conceded and purchased an IP150+ I am now however receiving the following in the logs:

2023-03-02 17:38:24,983 - INFO     - PAI.paradox.paradox - Connecting to Panel
2023-03-02 17:38:25,016 - INFO     - PAI.paradox.paradox - Panel Identified MG505+ version 1.22 build 1
2023-03-02 17:38:25,017 - INFO     - PAI.paradox.paradox - Initiating panel connection
2023-03-02 17:38:25,053 - ERROR    - PAI - Restarting
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/paradox/main.py", line 81, in run_loop
    if await alarm.full_connect():
  File "/usr/local/lib/python3.9/site-packages/paradox/paradox.py", line 212, in full_connect
    if not await self.connect():
  File "/usr/local/lib/python3.9/site-packages/paradox/paradox.py", line 176, in connect
    self.panel = create_panel(
  File "/usr/local/lib/python3.9/site-packages/paradox/hardware/__init__.py", line 44, in create_panel
    raise NotImplementedError(
NotImplementedError: We are not sure what panel you have (product_id: 67).             Please create an issue. Maybe we can help you.

Seems my panel may not be supported?

gu3stZA commented 1 year ago

I managed to get my 5050+ working.

I connect to the MG5050+ on the second serial port (I have another device on the primary serial port) using a Raspberry Pi with some voltage regulators etc etc running PAI on the serial interface of the Pi.

To get it to work, I had to use the dev version of PAI, and change the BAUD rate to 115200 (instead of the old 9600 for the MG5050).

Other than that, it works fine and picks up the panel with the correct name (support for the MG5050+ was added in November last year, I think).

yozik04 commented 1 year ago

@gu3stZA Uhh, that is great. dev and master are actually 100% equal and are released as 3.1.0

Can you please add a line for MG5050+ here. https://github.com/ParadoxAlarmInterface/pai/wiki/Compatibility Please certainly add info about the baud rate. That will greatly help others.

yozik04 commented 1 year ago

@yusrimathews which version are you using?

image

gu3stZA commented 1 year ago

Hi,

I have an MG5050+ I tried multiple combinations of the configuration and continuously get the following in the logs:

INFO - PAI.paradox.connections.connection - Connection established

INFO - PAI.paradox.paradox - Connecting to Panel

ERROR - PAI.paradox.paradox - Timeout while connecting to panel. Is an other connection active?

ERROR - PAI - Unable to connect to alarm

After some investigation, the MG5050+ serial ports requires to be unlocked, as per the installers manual:

Enter section [300] to unlock your MG5050+ panel serial ports for use with third-party devices using a TM70/ TM50 Touch keypad.

So my questions:

1. Is this expected behaviour/ Is the MG5050+ supported?

2. Anyone else with the issue/ Is there another way to unlock the serial ports?

I also contacted my panel supplier and they said that the MG5050+ serial ports are unlocked. They said the message about the serial being locked is for EVO192. I can't confirm this, but I can confirm that I got my PAI working without unlocking anything in section 300 as mentioned in the installation manual of the MG5050+. So perhaps an error in Paradox's documentation.

gu3stZA commented 1 year ago

@gu3stZA Uhh, that is great. dev and master are actually 100% equal and are released as 3.1.0

Can you please add a line for MG5050+ here. https://github.com/ParadoxAlarmInterface/pai/wiki/Compatibility Please certainly add info about the baud rate. That will greatly help others.

I will add an entry, yes.

Sorry, I'm not a dev so I am not too good with git(hub), but I see on that comparison, when you have the base as dev and compare to master, it shows no differences. But if you have the base as master and compare to dev, it shows differences. Dev seems to have more recent commits than master?

Also to note, when I try to install using the command sudo -H pip3 install paradox-alarm-interface I get the error "Mar 03 13:39:51 paradoxpai pai[801]: NotImplementedError: We are not sure what panel you have (product_id: 67)."

Is the version on PIP behind?

I just went back to cloning the git repo on dev branch and then no issues - so I'm not going to mess around with it further incase I break something :)

yozik04 commented 1 year ago

Hah. You are right... Then I need to release a new version...

yozik04 commented 1 year ago

Now it is released... https://pypi.org/project/paradox-alarm-interface/

yusrimathews commented 1 year ago

@gu3stZA thanks! the dev version works and master as well, since the new release!

This is using the IP150+, and it works with both BAUD rates, 9600 and 115200.

I will now also re-try connecting via Serial Over IP (ESP32) and report back.

Regarding the serial being locked, you are right! It's based on the distributor and region - I got the same response as you, so I can confirm.

@yozik04 I also updated the compatibility page to state support via IP150+ for the MG5050+ but I am not sure of the version of the IP150+. I can't connect to it via web browser, so my only source to access it is through Hass at the moment.

yusrimathews commented 1 year ago

@yusrimathews which version are you using?

image

My panel is identified as "MG505+ version 1.22 build 1" and returns 67 as per product ID.

yusrimathews commented 1 year ago

@gu3stZA do you have the same power entities as below?

image

For some reason, it just never returns any volts for the "system power battery". And, I suppose:

gu3stZA commented 1 year ago

@gu3stZA do you have the same power entities as below? image

For some reason, it just never returns any volts for the "system power battery". And, I suppose:

* System Power Battery = AC supply

* System Power Vdc = Board voltage

* System Power Dc = Battery voltage

Yes, I have the same and it looks similar to yours. System Power Battery is 0.0V and the other two have values (similar to yours).

viroge commented 1 year ago

Hi,

I've just bought a MG5050+ which was shipped with 1.22 build 5 and I can't connect: image

I don't have an IP150 module, I'm just trying it via serial.

I can successfully connect via Babyware from the same laptop (PAI is running in WSL until my RPi zero W arrives).

Any idea what I could try to make this work?

yozik04 commented 1 year ago

It is possible that it has encrypted serial. But @gu3stZA got it working so I do not know :)

viroge commented 1 year ago

This is what I can see about encryption in Babyware: image

But I'm not sure if we are talking about the same thing. :)

yozik04 commented 1 year ago

No. This is different. This is encryption over IP.

yusrimathews commented 1 year ago

@viroge regarding locked serial ports, it would state it on the box (see image attached) or your supplier would be able to provide the information. If not, check on the Paradox website for the distributor in your region, send them your serial number to confirm if it's locked or not.

IMG_0880

I am having the same issue as you are, trying to connect Serial over IP (ESP32) so it could be that your serial is not locked and this is due to another issue.

yusrimathews commented 1 year ago

@viroge and I've just solved my issue by switching the TX and RX to the ESP32, now connecting to the MG5050+ successfully. Try that.

viroge commented 1 year ago

@yusrimathews I'm using a 307USB cable to connect, and it's working fine with Babyware. Are you still on 1.22 build 1?

yusrimathews commented 1 year ago

@yusrimathews I'm using a 307USB cable to connect, and it's working fine with Babyware. Are you still on 1.22 build 1?

Yes

viroge commented 1 year ago

Will confirm this with my supplier tomorrow then. I don't have "UNLOCK" on my box.

viroge commented 1 year ago

My supplier told me that it's not possible to unlock these newer versions. (Manufacturing date: Aug 2022) Be aware of 1.22 build 5! :)

Any idea how to solve this? I'm more than happy to provide a dump of the communication between Babyware and the board if that helps.

yozik04 commented 1 year ago

If you can connect with Babyware by using USB cable then nothing is actually locked. It may be encrypted, which we do not support now.

viroge commented 1 year ago

Would this work with an IP150 or IP150+ module?

yusrimathews commented 1 year ago

Would this work with an IP150 or IP150+ module?

If the module supports the board, yes. I am connecting via Serial Over IP (ESP32) and IP150+ successfully.

yusrimathews commented 1 year ago

I managed to get my 5050+ working.

I connect to the MG5050+ on the second serial port (I have another device on the primary serial port) using a Raspberry Pi with some voltage regulators etc etc running PAI on the serial interface of the Pi.

To get it to work, I had to use the dev version of PAI, and change the BAUD rate to 115200 (instead of the old 9600 for the MG5050).

Other than that, it works fine and picks up the panel with the correct name (support for the MG5050+ was added in November last year, I think).

@gu3stZA just to confirm, you are connecting via both serials? Or are you just using the one serial to interact with the board? I ask because, if I connect PAI to the ESP (Serial 1) or IP150+ (Serial 2) it works but if I connect PAI to the ESP and SWAN to the IP150+ one of them gives an error that a user is already connected.

According to this, and other issues reported... only one user can be connected at a time, I just wanted to confirm how you are connecting or if you have a workaround.

gu3stZA commented 1 year ago

I managed to get my 5050+ working. I connect to the MG5050+ on the second serial port (I have another device on the primary serial port) using a Raspberry Pi with some voltage regulators etc etc running PAI on the serial interface of the Pi. To get it to work, I had to use the dev version of PAI, and change the BAUD rate to 115200 (instead of the old 9600 for the MG5050). Other than that, it works fine and picks up the panel with the correct name (support for the MG5050+ was added in November last year, I think).

@gu3stZA just to confirm, you are connecting via both serials? Or are you just using the one serial to interact with the board? I ask because, if I connect PAI to the ESP (Serial 1) or IP150+ (Serial 2) it works but if I connect PAI to the ESP and SWAN to the IP150+ one of them gives an error that a user is already connected.

According to this, and other issues reported... only one user can be connected at a time, I just wanted to confirm how you are connecting or if you have a workaround.

I use both serial ports simultaneously. Serial1 I connect to an Olarm device (https://olarm.com/) which allows me to control the alarm through an app on my phone. at the same time, I connect PAI (through my Raspberry Pi Zero) to Serial2, and then I can control the alarm through PAI/Home Assistant.

Both of these work at the same time, and is the main reason I got the MG5050+ in the first place (although I bought it in hope - I wasn't 100% sure it would work)

yusrimathews commented 1 year ago

@gu3stZA did you have to create an additional user? I am struggling to connect via Hass and IP150+ at the same time.

No issue with PAI connecting but while it’s connected, connecting via IP150+ is proving to be an issue.

g-fusion commented 1 year ago

I also have problems connecting from time to time with MG5050 via IP150. The odd thing is that in parallel of these connections issues, I am receiving Disarming notifications based on automation, sometimes correlated with lost of connections sometimes with a delay.

Some data: PAI - version: 3.2.1 MG5050 - v4.76 build 0 IP150 - firmware: 1.34 The connection to IP150 is local

NB: Just noticed that every restart of PAI or MQTT broker leads to False-positive Disarming notifications I also have reinstalled PAI, clear MQTT retained entries without success. From log file from automation I can see the that Partition Area unavailability is noticed and right after that Disarming is sent (attached)

Automation_trace_log

Logs & screenshots (attached) [PAI_LOG1.txt](https://github.com

Disarming_21 03

/ParadoxAlarmInterface/pai/files/11039373/PAI_LOG1.txt)

grinco commented 9 months ago

Can anyone confirm whether MG5050+ version 1.22 build 5 works? I can communicate with it Babyware via a 3rd party TTL to USB adapter, but getting "ERROR - PAI.paradox.paradox - Timeout while connecting to panel. Is an other connection active?" in PAI. I had similar issue on 1.12 build 6. Section 300 shows that the serial is locked, but I can't change it on my K32LCD+, ordered a TM70 to give it a try.

grinco commented 9 months ago

Can anyone confirm whether MG5050+ version 1.22 build 5 works? I can communicate with it Babyware via a 3rd party TTL to USB adapter, but getting "ERROR - PAI.paradox.paradox - Timeout while connecting to panel. Is an other connection active?" in PAI. I had similar issue on 1.12 build 6. Section 300 shows that the serial is locked, but I can't change it on my K32LCD+, ordered a TM70 to give it a try.

Ok, so after doing some more reading it looks liem Paradox is locking the serial interface on new devices to only work with their branded accessories. It can be unlocked via an unlock code that can be purchased using an installer account Vian insite gold app for 14$ and must be typed in using the TM50 or TM70 keypad. Serial communication should work without issues on the 307USB adapter without the unlock code. I'll try reaching out to the vendor who sold my panel to purchase a serial and update this issue with more information.

yusrimathews commented 9 months ago

@grinco I can confirm it does work, I am running the same panel version and firmware.

I also got stuck where you are, the vendor pointed out to me that you can see if the panel is locked on the label of the box.

Turned out my panel wasn’t locked and I just had to switch the TX and RX cables connected to the serial - restarted and it worked.

grinco commented 9 months ago

@grinco I can confirm it does work, I am running the same panel version and firmware.

I also got stuck where you are, the vendor pointed out to me that you can see if the panel is locked on the label of the box.

Turned out my panel wasn’t locked and I just had to switch the TX and RX cables connected to the serial - restarted and it worked.

Thanks @yusrimathews. My panel is definitely locked. It doesn't say "unlocked" on the box and the section 300 in installer menu says "Serial Locked". I've ordered a TM70 to try unlocking it, but the person who sold it to me doesn't know how to obtain the unlock code - which according to the docs I found online should be ordered in the installer section of the insite gold app. I'll wait for the panel to arrive, than try finding an installer on reddit who can sell me an unlock code and follow-up.

grinco commented 9 months ago

Okay, I have an update. TL;DR you can buy an unlock code from your installer, even if the alarm is locked. Mine was locked, got the code, entered it in section 300 and voila.

Longish story - all EVO models from particular version and above, as well as all Spectra and Magellan plus models are locked by default unless stated otherwise. Paradox support only works with resellers, and won't do much for you as end customer. They redirected me to Czech resellers, who said they wouldn't support a system that was not purchased from them (they were completely ignoring me, just accidentally left me in CC in the support ticket with Paradox where they were complaining about how bad Paradox are at controlling the distribution channels, etc). The system I bought was from a marketplace (similar to how amazon has stuff they sell and stuff sold by third party sellers). The seller - didn't have access to paradox support, and were only talking to their local reseller in the country. It took hundreds of emails with screenshots from manuals, and a ~10 euro payment ro finally have them find an installer who provided an unlock code. Lesson for the future - stay away from any plus model, or buy an unlocked panel straight away to avoid all this back and forth.