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
351 stars 94 forks source link

EVO HD connection error #42

Closed jooka1978 closed 5 years ago

jooka1978 commented 5 years ago

Hi,

I would like to use my Paradox EVO HD under home assistant connecting via IP150 ( v 1.40.00). It connects to the IP module successfully and Found Panel EVOHD version 6.144 build 8, but it can not connect the Panel. The panel has the default '0000' password and in the config file I use PASSWORD = b'0000' # PC Password. Set to None if Panel has no Password Below is the log. Can you please help? Thanks

2019-02-11 18:17:29,611 - INFO - PAI - Starting Paradox Alarm Interface 2019-02-11 18:17:29,611 - INFO - PAI - Console Log level set to 20 2019-02-11 18:17:29,611 - INFO - PAI.paradox.interfaces.interface_manager - Using MQTT Interface 2019-02-11 18:17:29,803 - INFO - PAI.paradox.interfaces.mqtt_interface - MQTT Broker Connected 2019-02-11 18:17:30,792 - INFO - PAI - Using IP Connection 2019-02-11 18:17:31,243 - INFO - PAI - Starting... 2019-02-11 18:17:31,244 - INFO - PAI.paradox.paradox - Connecting to interface 2019-02-11 18:17:31,263 - INFO - PAI.paradox.connections.ip_connection - Authentication Success. Panel version 20, firmware: 1.64 2019-02-11 18:17:31,306 - INFO - PAI.paradox.connections.ip_connection - Session Established with IP Module INFO:PAI.paradox.connections.ip_connection:Session Established with IP Module 2019-02-11 18:17:31,307 - INFO - PAI.paradox.paradox - Connecting to panel INFO:PAI.paradox.paradox:Connecting to panel 2019-02-11 18:17:31,307 - INFO - PAI.paradox.paradox - Initiating communication INFO:PAI.paradox.paradox:Initiating communication 2019-02-11 18:17:31,356 - INFO - PAI.paradox.paradox - Found Panel EVOHD version 6.144 build 8 INFO:PAI.paradox.paradox:Found Panel EVOHD version 6.144 build 8 2019-02-11 18:17:31,357 - INFO - PAI.paradox.paradox - Starting communication INFO:PAI.paradox.paradox:Starting communication 2019-02-11 18:17:31,478 - INFO - PAI.paradox.hardware.spectra_magellan.panel - Initializing communication INFO:PAI.paradox.hardware.spectra_magellan.panel:Initializing communication 2019-02-11 18:17:31,528 - ERROR - PAI.paradox.hardware.spectra_magellan.panel - Authentication Failed. Wrong Password? ERROR:PAI.paradox.hardware.spectra_magellan.panel:Authentication Failed. Wrong Password? 2019-02-11 18:17:31,529 - ERROR - PAI - Unable to connect to alarm

iondarie commented 5 years ago

i presume u set the correct info here?:

IP Connection Details

IP_CONNECTION_HOST = '' # IP Module address when using direct IP Connection IP_CONNECTION_PORT = 10000 # IP Module port when using direct IP Connection IP_CONNECTION_PASSWORD = b'' # IP Module password IP_CONNECTION_SITEID = '' # SITE ID. IF defined, connection will be made through this method. IP_CONNECTION_EMAIL = '' # Email registered in the site

jooka1978 commented 5 years ago

Yes, I am not using site ID. IP_CONNECTION_HOST = '192.168.0.X' # IP Module address when using direct IP Connection IP_CONNECTION_PORT = 10000 # IP Module port when using direct IP Connection IP_CONNECTION_PASSWORD = b'XXX' # IP Module password IP_CONNECTION_SITEID = None # SITE ID. IF defined, connection will be made through this method. IP_CONNECTION_EMAIL = None # Email registered in the site

iondarie commented 5 years ago

Well there you go we have solved the problem: site id and email are required for ip150 with fw above 1.39

If u have Babyware you will see you cannot connect to the alarm directly trough the ip address. You need to use site id

jooka1978 commented 5 years ago

Oh, I see. Thanks for the info, I will set up my EVO with site ID and email.

iondarie commented 5 years ago

I think it is already setup with siteid and email. I had no other option when i installed mine witch came from factory with 1.40

If you have any other questions pleas do not hesitate to ask.

Also please let us know if the problem was solved so that the topic can be marked accordingly and closed.

jpbarraca commented 5 years ago

But we have an error as the EVOHD is being interfaced as a MG/SP. Probably we do not know about this panel. @yozik04 Can you check this?

jooka1978 commented 5 years ago

Ok, I have just read about this site ID. It is needed only if I want to reach my EVo from the internet as I understand. I do not really want to open my system, I prefer using it only on my LAN. This why I use IP150 with direct connection. @jpbarraca yes in my log it says: PAI.paradox.hardware.spectra_magellan.panel, not an EVO. Thanks for looking into it. If you need my system for testing just let me know it is only in test mode now.

iondarie commented 5 years ago

Well i hope i am not mistaken but withouth siteid you will not be able to use this script.

Since FW 1.40 on the IP150 i cannot even access my panel trough LAN using BabyWare, i need to use site id and email

yozik04 commented 5 years ago

I am not sure how similar EVO 192 and HD versions are? I have zero documentation about it. EVO login is different from SP/MG. So it can be the cause why it tells wrong password.

yozik04 commented 5 years ago

I do not really want to open my system, I prefer using it only on my LAN. This why I use IP150 with direct connection.

If you do not care about warranty you can downgrade to 1.32 something.

yozik04 commented 5 years ago

I can create a branch so your module will be detected as EVO branch.

jooka1978 commented 5 years ago

Interesting thig is, if I change the PC Password I get a different error:

2019-02-11 21:10:13,837 - INFO - PAI.paradox.paradox - Found Panel EVOHD version 6.144 build 8 INFO:PAI.paradox.paradox:Found Panel EVOHD version 6.144 build 8 2019-02-11 21:10:13,837 - INFO - PAI.paradox.paradox - Starting communication INFO:PAI.paradox.paradox:Starting communication 2019-02-11 21:10:13,959 - INFO - PAI.paradox.hardware.spectra_magellan.panel - Initializing communication INFO:PAI.paradox.hardware.spectra_magellan.panel:Initializing communication 2019-02-11 21:10:14,039 - ERROR - PAI.paradox.hardware.spectra_magellan.panel - Parsing message: e2 ff 00 48 14 13 02 0b 15 09 2d 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ac Traceback (most recent call last): File "/home/homeassistant/.homeassistant/paradox/paradox/hardware/spectra_magellan/panel.py", line 101, in parse_message return LiveEvent.parse(message) File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 304, in parse return self.parse_stream(io.BytesIO(data), *contextkw) File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 316, in parse_stream return self._parsereport(stream, context, "(parsing)") File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 328, in _parsereport obj = self._parse(stream, context, path) File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 1979, in _parse subobj = sc._parsereport(stream, context, path) File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 328, in _parsereport obj = self._parse(stream, context, path) File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 2468, in _parse return self.subcon._parsereport(stream, context, path) File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 328, in _parsereport obj = self._parse(stream, context, path) File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 4347, in _parse obj = self.subcon._parsereport(stream, context, path) File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 328, in _parsereport obj = self._parse(stream, context, path) File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 1979, in _parse subobj = sc._parsereport(stream, context, path) File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 328, in _parsereport obj = self._parse(stream, context, path) File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 2468, in _parse return self.subcon._parsereport(stream, context, path) File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 328, in _parsereport obj = self._parse(stream, context, path) File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 715, in _parse return self._decode(obj, context, path) File "/home/homeassistant/.homeassistant/paradox/paradox/hardware/spectra_magellan/adapters.py", line 9, in _decode return datetime.datetime(obj[0] 100 + obj[1], obj[2], obj[3], obj[4], obj[5]) ValueError: year 25500 is out of range ERROR:PAI.paradox.hardware.spectra_magellan.panel:Parsing message: e2 ff 00 48 14 13 02 0b 15 09 2d 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ac

jpbarraca commented 5 years ago

The current code will not work as PAI is sending messages intended for MG/SP and not for EVO. The formats are different.

jooka1978 commented 5 years ago

Ok, I understand now. And are you planning to develop for EVO? Would it work if I buy a PRN module and use a serial connection?

jpbarraca commented 5 years ago

Send me a full log with debug and packet dumps so that we can make it use the correct messages.

Use keybase, gitter, hangouts or e-mail.

jooka1978 commented 5 years ago

Thanks a lot, I will do it tonight.

yozik04 commented 5 years ago

What I see from the EVO HD description this is advanced model over EVO 192. So most probably EVO 192 version will work fine.

yozik04 commented 5 years ago

Try https://github.com/jpbarraca/pai/tree/evohd_support branch

yozik04 commented 5 years ago

Linking 65a6d1e EVO HD Support commit

jooka1978 commented 5 years ago

Hi,

Sorry guys, I was not at home. Thanks for creating a new branch for EVO HD. just to clarify (sorry for my bad English) should it work now or I have to keep an eye on this branch and you work on it.

Thanks Balazs

On Wed, Feb 13, 2019 at 10:08 AM Jevgeni Kiski notifications@github.com wrote:

Try https://github.com/jpbarraca/pai/tree/evohd_support branch

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpbarraca/pai/issues/42#issuecomment-463117780, or mute the thread https://github.com/notifications/unsubscribe-auth/AjfozZl78pn9iD9fz7lBfoac-_4oWdlyks5vM9YQgaJpZM4a0rC4 .

yozik04 commented 5 years ago

Try the branch. If it works for you I will merge into dev and master later on.

jooka1978 commented 5 years ago

Hi,

Ok, I tried it, but I still gett errors. I attached a log file.

thanks Balazs

On Sun, Feb 17, 2019 at 5:28 PM Jevgeni Kiski notifications@github.com wrote:

Try the branch. If it works for you I will merge into dev and master later on.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpbarraca/pai/issues/42#issuecomment-464477563, or mute the thread https://github.com/notifications/unsubscribe-auth/AjfozaE0S6dXEp6pnBoibUX7bKOOlj_Yks5vOYNLgaJpZM4a0rC4 .

yozik04 commented 5 years ago

Plz send me log to @ gmail.com

yozik04 commented 5 years ago

@jooka1978 Please checkout latest dev branch

add DEVELOPMENT_DUMP_MEMORY = True to your configuration.

Run PAI. After some minutes you will see eeprom.bin and ram.bin in the working directory. Please send them privately to my email.

Then stop PAI and remove the setting. You will not need it again.

yozik04 commented 5 years ago

EVOHD uses a different method to fetch RAM data. Our standard sequest on EVO 192 returns with error: (enum) invalid_record_type 25 @jpbarraca How did you reverse engineered status requests? If I remember right you enabled ip_connection and connected with Babyware through pai? Or wireshark dump will be better?

yozik04 commented 5 years ago

I am not sure if I want to step into this. As I do not have EVO HD by my hand and it will be hard to understand what is what from the wireshark dump.

yozik04 commented 5 years ago

Somebody with development skills and EVO HD setup needs to proceed.

jpbarraca commented 5 years ago

You can use the IP Interface and connect to it using babyware. The messages exchanged will be logged to the console as debug messages.

yozik04 commented 5 years ago

I have disabled status requesting for EVOHD.

Probably other functionality will work. But we need to think about keep alive. We probably can request some junk every 10 seconds.

jpbarraca commented 5 years ago

We must do some request, even if we do not understand the result

yozik04 commented 5 years ago

@jpbarraca We will do when we have a request.

@jooka1978 Can try to connect with Babyware through pai. I never tried to do this in my setup. I have a gut feeling something is broken there.

jooka1978 commented 5 years ago

Hi,

I will do soon. Sorry i did not have time on the weekend.

Jevgeni Kiski notifications@github.com ezt írta (időpont: 2019. febr. 26., K 9:34):

@jpbarraca https://github.com/jpbarraca We will do when we have a request.

@jooka1978 https://github.com/jooka1978 Can try to connect with Babyware through pai. I never tried to do this in my setup. I have a gut feeling something is broken there.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jpbarraca/pai/issues/42#issuecomment-467346140, or mute the thread https://github.com/notifications/unsubscribe-auth/AjfozRI1aHFP9UQ8yir-k3N72Z1okDgdks5vRPGngaJpZM4a0rC4 .

jooka1978 commented 5 years ago

Hi,

What exactly you mean: "connect with Babyware through pai" ?

Balazs

On Tue, Feb 26, 2019 at 9:34 AM Jevgeni Kiski notifications@github.com wrote:

@jpbarraca https://github.com/jpbarraca We will do when we have a request.

@jooka1978 https://github.com/jooka1978 Can try to connect with Babyware through pai. I never tried to do this in my setup. I have a gut feeling something is broken there.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jpbarraca/pai/issues/42#issuecomment-467346140, or mute the thread https://github.com/notifications/unsubscribe-auth/AjfozRI1aHFP9UQ8yir-k3N72Z1okDgdks5vRPGngaJpZM4a0rC4 .

yozik04 commented 5 years ago

PAI has IP Interface that would proxy all requests from babyware to IP150 and back. So you can use PAI and connect with Babyware at the same time.

😅 But it does not work for EVO now. I am trying to figure out why.

jooka1978 commented 5 years ago

Ok:-)) Let me know if i can do anything on my end.

On Sun, 3 Mar 2019, 08:16 Jevgeni Kiski, notifications@github.com wrote:

PAI has IP Interface that would proxy all requests from babyware to IP150 and back. So you can use PAI and connect with Babyware at the same time.

😅 But it does not work for EVO now. I am trying to figure out why.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jpbarraca/pai/issues/42#issuecomment-468996268, or mute the thread https://github.com/notifications/unsubscribe-auth/AjfozbHfBJs1JD9H-0QjdSDtlH0teZFAks5vS3bpgaJpZM4a0rC4 .

jpbarraca commented 5 years ago

@yozik04 check if EVO requires the socket to be closed and opened when starting the IP interface

yozik04 commented 5 years ago

@jooka1978 If you still can. Please send me debug log from ip_interface_evo branch when you connect to PAI with Babyware. Try to connect from Babyware within 20 seconds after PAI start.

yozik04 commented 5 years ago

You can also capture connection to the alarm from Babyware with wireshark. That will also be useful.

yozik04 commented 5 years ago

If somebody can provide us with full network capture of EVO HD we can proceed.

Nothing to do for now. Closing.

j0nathan33 commented 5 years ago

Hi,

@yozik04 : Do you receive full network capture of EVO HD ?

Right now for me when pai started, It receive some label from zone, all partition, all user, all zone but nothing in mqtt. In mqtt, I receive some events. If I check in log, I have this error: =

2019-05-05 20:29:32,451 - WARNING - PAI.paradox.hardware.evo.models.evohd - Status requesting for EVOHD is not implemented 2019-05-05 20:29:32,452 - ERROR - PAI.paradox.paradox - Loop Traceback (most recent call last): File "/opt/pai/paradox/paradox.py", line 230, in async_loop reply = await self.panel.request_status(i) TypeError: object NoneType can't be used in 'await' expression 2019-05-05 20:29:32,612 - DEBUG - PAI.paradox.paradox - Receive worker loop

Edit: After I remove function request_status in evohd, In mqtt receive all zone, all partition, etc.

yozik04 commented 5 years ago

Hey, I have received network capture yesterday. Did not had time to investigate...

yozik04 commented 5 years ago

@j0nathan33 If you remove this function from evohd does the PAI keep working for you? Or you get disconnected within 30 seconds?

I investigated the network capture I have received yesterday but unfortunately there was no status requests in it.

j0nathan33 commented 5 years ago

@yozik04 : For me, PAI keep working after 30 seconds and It don't deconnected within 30 seconds. I have only one error in logs :

2019-05-06 20:03:35,339 - DEBUG - PAI.paradox.paradox - Requesting status: 1 2019-05-06 20:03:35,508 - DEBUG - PAI.paradox.paradox - Receive worker loop 2019-05-06 20:03:35,538 - DEBUG - PAI.paradox.paradox - Change zone/IR_salon/open from False to True 2019-05-06 20:03:35,553 - DEBUG - PAI.paradox.paradox - Requesting status: 2 2019-05-06 20:03:35,728 - DEBUG - PAI.paradox.paradox - Requesting status: 3 2019-05-06 20:03:35,843 - DEBUG - PAI.paradox.paradox - Receive worker loop 2019-05-06 20:03:35,887 - DEBUG - PAI.paradox.paradox - Change partition/Maison/ready from True to False 2019-05-06 20:03:35,887 - DEBUG - PAI.paradox.paradox - Key 'partition' doesn't exist in cfg.LIMITS 2019-05-06 20:03:35,890 - DEBUG - PAI.paradox.paradox - Change partition/Maison/all_zone_closed from True to False 2019-05-06 20:03:35,891 - DEBUG - PAI.paradox.paradox - Key 'partition' doesn't exist in cfg.LIMITS 2019-05-06 20:03:35,892 - DEBUG - PAI.paradox.paradox - Change partition/Maison/stay_instant_ready from True to False 2019-05-06 20:03:35,893 - DEBUG - PAI.paradox.paradox - Key 'partition' doesn't exist in cfg.LIMITS 2019-05-06 20:03:35,902 - DEBUG - PAI.paradox.paradox - Requesting status: 4 2019-05-06 20:03:36,030 - DEBUG - PAI.paradox.paradox - Requesting status: 5 2019-05-06 20:03:40,846 - DEBUG - PAI.paradox.paradox - Receive worker loop 2019-05-06 20:03:45,849 - DEBUG - PAI.paradox.paradox - Receive worker loop

yozik04 commented 5 years ago

I have removed override for EVO HD for status requests. Please check. I see similar to EVO192 status requests in the provided dump, no differences.

No idea where (enum) invalid_record_type 25 came from.

j0nathan33 commented 5 years ago

For me, all is working.

Thank :)

yozik04 commented 5 years ago

Great!.

What firmware version you have? We need to put it up somewhere what panels work with PAI.

j0nathan33 commented 5 years ago

Paradox EVOHD : 7.11.006 IP150 : 4.40.004

jooka1978 commented 5 years ago

Hi,

Finally it works for me! Thanks a lot for the good work. Just a quick question. I am using it under Home Assistant. I was able to set up the alarm panel, so I can ARM and DISARM. But I have difficulties to read the sensors state (motion, window, tamper). This is my HA config binary_sensor:

yellowonblack commented 5 years ago

I think the key here is the correct topic: paradox/states/zones/ZONE_LABEL/open Could you try something similar with this?

jooka1978 commented 5 years ago

Thanks, I got it working under HomeAssiatent. In some reason binary_sensor did not work, so I use sensor instead. sensor: