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
356 stars 95 forks source link

Connection to MG5000 #6

Closed rjduraocosta closed 6 years ago

rjduraocosta commented 6 years ago

Hello @jpbarraca good evening,

I do not know if I am writing in the correct place because I am very new to all of this and I intend to use your interface with my MG5000 alarm system. Could you provide me detailled info please on how to set everything up to test the connection based on a Windows system. Which cable did you use. Sorry to ask all of this but I am really new to this and really would like to test your work and use it to control and verify the state of my alarm system in my home automation system openHAB.

Thanks in advance for all your help.

Best regards.

jpbarraca commented 6 years ago

Use a standard USB-serial (PL2303, CH340, FTDI, etc...) adapter and connect your computer to the alarm SERIAL port (it is named). The pinout, from top to bottom is: TX, RX, GND, 12v (do not connect).

Babyware and PAI should be able to connect without issues.

rjduraocosta commented 6 years ago

Thanks for your reply. At the moment i am struggling with python3.5 / 3.6 and windows. I have errors when I try to install the requirements in the text file. It says it does not find gi==1.2. I have tried installing Visual Studio build tools to install PyGObject so that te gi.repository is found but no success. I will keep with this until i reach somewhere.

Thanks again.

jpbarraca commented 6 years ago

You can ignore gi if you do not plan to use Signal

rjduraocosta commented 6 years ago

Thanks, I will give it a go.

jpbarraca commented 6 years ago

Actually, windows and Signal will be a problem because the communication between PAI and the Signal Daemon is through dbus.

rjduraocosta commented 6 years ago

Well, in that case I think I must switch to something linux based like ubuntu or try and test it on a Pi (if i can get one to test) and afterwards change my openHAB server to Linux as well. Thanks again for all your help.

jpbarraca commented 6 years ago

A NanoPi Neo is small enough to fit the MG5050 enclosure, and be powered from the 12V battery (using a DC-DC converter), and can connect to the Panel using a Serial Level Converter.

rjduraocosta commented 6 years ago

Thanks for the suggestion. I decided to make a virtual machine with Ubuntu 16.04 Desktop and test it there, if everything goes all right I am going to change my home server or go with the Nano Pi Neo. At the moment I am facing the following issue as I try installing the requirements:

Could not find a version that satisfies the requirement gi==1.2 (from -r requirements.txt (line 5)) (from versions: ) No matching distribution found for gi==1.2 (from -r requirements.txt (line 5))

I tried installing the following packages:

sudo apt install python-gi python-gi-cairo python3-gi python3-gi-cairo gir1.2-gtk-3.0

but no success the error appears again.

iondarie commented 6 years ago

If it helps, i deleted the required version numbers from all “==1.2”

And it works

You may also need these 2 commands:

sudo apt install libcairo2-dev sudo apt install libgirepository1.0-dev

rjduraocosta commented 6 years ago

Thanks for the tip, but I still have an error:

Could not find a version that satisfies the requirement gi (from -r requirements.txt (line 5)) (from versions: ) No matching distribution found for gi (from -r requirements.txt (line 5))

Any more ideas?

Thanks.

iondarie commented 6 years ago

pydbus pushbullet.py ws4py construct gi paho_mqtt pyserial pygobject

This is the content of my requirements.txt

rjduraocosta commented 6 years ago

Thanks for sharing, but I am still at the same point:

Could not find a version that satisfies the requirement gi (from -r requirements.txt (line 5)) (from versions: ) No matching distribution found for gi (from -r requirements.txt (line 5))

Yesterday I tried installing all sorts of packages but with no good result.

iondarie commented 6 years ago

sudo python3 pip3 install gi

Or even better:

sudo apt-get install python3-gi

rjduraocosta commented 6 years ago

Thanks for the tip, but i tried with no success:

python3: can't open file 'pip3': [Errno 2] No such file or directory

The thing is that I searched and searched yesterday tried many things but nothing, I am also very new to linux...

jpbarraca commented 6 years ago

apt-get install python3-pip

rjduraocosta commented 6 years ago

Thanks for your reply.

After sudo apt-get install python3-pip I get the following: Reading package lists... Done Building dependency tree
Reading state information... Done python3-pip is already the newest version (8.1.1-2ubuntu0.4). The following packages were automatically installed and are no longer required: linux-headers-4.15.0-29 linux-headers-4.15.0-29-generic linux-image-4.15.0-29-generic linux-modules-4.15.0-29-generic linux-modules-extra-4.15.0-29-generic Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

Then after sudo apt-get install python3-gi I get: Reading package lists... Done Building dependency tree
Reading state information... Done python3-gi is already the newest version (3.20.0-0ubuntu1). The following packages were automatically installed and are no longer required: linux-headers-4.15.0-29 linux-headers-4.15.0-29-generic linux-image-4.15.0-29-generic linux-modules-4.15.0-29-generic linux-modules-extra-4.15.0-29-generic Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

But I still get the error installing the requirements with or without versions:

Could not find a version that satisfies the requirement gi (from -r requirements.txt (line 5)) (from versions: ) No matching distribution found for gi (from -r requirements.txt (line 5))

Could not find a version that satisfies the requirement gi==1.2 (from -r requirements.txt (line 5)) (from versions: ) No matching distribution found for gi==1.2 (from -r requirements.txt (line 5))

I know this is not a linux forum, but i appreciate all the help i can get.

Thanks again.

iondarie commented 6 years ago

sudo python3 pip install gi

rjduraocosta commented 6 years ago

This outputs the following error: python3: can't open file 'pip': [Errno 2] No such file or directory

I am reaching a point where I don't know what else to do. Maybe a fresh ubuntu install?

Thanks for your help

jpbarraca commented 6 years ago

PAI uses Python3. Therefore you must use pip3. It varies with the distribution but pip usually uses python2.

iondarie commented 6 years ago

provide ssh access so i can try to assist.

rjduraocosta commented 6 years ago

Thanks for the offer. I think I got somewhere. gi requirement keeps failling but i decided to give a go and run main.py and I have the following output:

2018-09-14 22:12:42,030 - INFO - PAI - Starting Paradox Alarm Interface 2018-09-14 22:12:42,031 - INFO - PAI - Console Log level set to 20 2018-09-14 22:12:42,031 - INFO - PAI - Using MQTT Interface 2018-09-14 22:12:42,078 - INFO - PAI.mqtt_interface - MQTT Broker Connected 2018-09-14 22:12:43,076 - INFO - PAI - Using Serial Connection 2018-09-14 22:12:43,217 - INFO - PAI - Starting... 2018-09-14 22:12:43,217 - INFO - PAI.paradox - Disconnecting from the Alarm Panel 2018-09-14 22:12:43,315 - WARNING - PAI.paradox - Got ERROR Message: 0 2018-09-14 22:12:43,316 - INFO - PAI.paradox - Connecting to panel 2018-09-14 22:12:43,412 - INFO - PAI.paradox - Found Panel MG5000 version 4.22 build 32 2018-09-14 22:12:43,602 - WARNING - PAI.paradox - Got ERROR Message: 0 2018-09-14 22:12:43,603 - ERROR - PAI - Unable to connect to alarm 2018-09-14 22:12:43,604 - INFO - PAI.mqtt_interface - MQTT Broker Disconnected 2018-09-14 22:12:45,609 - INFO - PAI - Good bye!

PAI connects, identifies the alarm but then the Alarm get's an error message: 0 and PAI disconnects. What could it be? I am using a USB-TTL with FTDI chip 232.

Thanks.

Edit: I tried connecting with babyware and it did not manage to connect because of the following message:

Wrong PanelID.Authetication Failed

Any clue?

Thanks

jpbarraca commented 6 years ago

You need to know the PC password. This is set by the company that installed the alarm. The default is 0000

rjduraocosta commented 6 years ago

Thanks for your reply and help. I don't think they are going to give me the password but it is with to try. For Babyware and PAI do you need also the Panel ID? If the company does not give the code(s) I will have to factory reset the alarm system and program everything again...

Thank you for your help.

jpbarraca commented 6 years ago

You only need the PC password. If you reset the panel, the difficult part is that you will need to configure everything again.

rjduraocosta commented 6 years ago

Thank you for all your help. I asked for the code, but I am not sure that the company is going to give it to me. It should give it because I bought the alarm panel, it is not a rental. I hope I have some good news soon or else I will have to go the hard way.

Thanks

jpbarraca commented 6 years ago

Take a look at the manuals, you may be able to reset and reconfigure everything using babyware.

jpbarraca commented 6 years ago

I'm closing the issue due to inactivity. If you still face problems. Please open a new one.