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

Pai not connecting to IP module after upgrade to 22.04 and python 3.10.6 #369

Closed britsmarius closed 1 year ago

britsmarius commented 1 year ago

I am getting the following after updating to Linux 22.04 and python 3.10.6

I am apple to access the IP150 via web and ping it, the problem seems after authentication.

2023-06-12 22:30:40,701 - INFO - PAI.paradox.connections.connection - Connection established 2023-06-12 22:30:40,701 - INFO - PAI.paradox.connections.ip.commands - Authenticating with IP Module 2023-06-12 22:30:40,702 - ERROR - PAI.paradox.connections.ip.connection - Unhandled exception while connecting (try 3/3) Traceback (most recent call last): File "/home/marius/pai/paradox/connections/ip/connection.py", line 30, in connect await self._try_connect() File "/home/marius/pai/paradox/connections/ip/connection.py", line 121, in _try_connect await IPModuleConnectCommand(self).execute() File "/home/marius/pai/paradox/connections/ip/commands.py", line 16, in execute await self._authenticate_to_ip_module() File "/home/marius/pai/paradox/connections/ip/commands.py", line 104, in _authenticate_to_ip_module msg = IPMessageRequest.build( File "/home/marius/.local/lib/python3.10/site-packages/construct/core.py", line 356, in build self.build_stream(obj, stream, **contextkw) File "/home/marius/.local/lib/python3.10/site-packages/construct/core.py", line 368, in build_stream self._build(obj, stream, context, "(building)") File "/home/marius/.local/lib/python3.10/site-packages/construct/core.py", line 2024, in _build buildret = sc._build(subobj, stream, context, path) File "/home/marius/.local/lib/python3.10/site-packages/construct/core.py", line 2493, in _build return self.subcon._build(obj, stream, context, path) File "/home/marius/.local/lib/python3.10/site-packages/construct/core.py", line 2761, in _build return self.subcon._build(obj, stream, context, path) File "/home/marius/.local/lib/python3.10/site-packages/construct/core.py", line 3621, in _build return sc._build(obj, stream, context, path) File "/home/marius/.local/lib/python3.10/site-packages/construct/core.py", line 722, in _build obj2 = self._encode(obj, context, path) File "/home/marius/pai/paradox/connections/ip/parsers.py", line 70, in encode return encrypt(obj, context..password) File "/home/marius/pai/paradox/lib/crypto.py", line 233, in encrypt rk = _keygen(key) File "/home/marius/pai/paradox/lib/utils.py", line 111, in call if not isinstance(args, collections.Hashable): AttributeError: module 'collections' has no attribute 'Hashable' 2023-06-12 22:30:40,704 - ERROR - PAI.paradox.paradox - Failed to connect to interface 2023-06-12 22:30:40,704 - ERROR - PAI - Unable to connect to alarm ^C2023-06-12 22:30:41,123 - INFO - PAI - Captured signal SIGTERM. Exiting 2023-06-12 22:30:41,123 - INFO - PAI.paradox.paradox - Disconnecting from the Alarm Panel 2023-06-12 22:30:41,124 - INFO - PAI.paradox.paradox - Clean Session 2023-06-12 22:30:41,124 - INFO - PAI.paradox.interfaces.interface_manager - Stopping all interfaces 2023-06-12 22:30:41,124 - INFO - PAI.paradox.interfaces.interface_manager - Stopping BasicMQTTInterface 2023-06-12 22:30:41,126 - INFO - PAI.paradox.interfaces.mqtt.core - MQTT Broker Disconnected 2023-06-12 22:30:41,127 - INFO - PAI.paradox.interfaces.mqtt.core - MQTT loop stopped 2023-06-12 22:30:41,127 - INFO - PAI - Good bye! 2023-06-12 22:30:41,129 - ERROR - PAI.paradox.connections.protocols - Connection was closed: None 2023-06-12 22:30:41,130 - ERROR - PAI.paradox.connections.connection - Connection was lost 2023-06-12 22:30:41,130 - ERROR - PAI.paradox.connections.protocols - Connection was closed: None 2023-06-12 22:30:41,130 - ERROR - PAI.paradox.connections.connection - Connection was lost 2023-06-12 22:30:41,130 - ERROR - PAI.paradox.connections.protocols - Connection was closed: None 2023-06-12 22:30:41,131 - ERROR - PAI.paradox.connections.connection - Connection was lost 2023-06-12 22:31:10,187 - ERROR - PAI.paradox.connections.protocols - Connection was closed: None 2023-06-12 22:31:10,187 - ERROR - PAI.paradox.connections.connection - Connection was lost 2023-06-12 22:31:10,187 - ERROR - PAI.paradox.connections.protocols - Connection was closed: None 2023-06-12 22:31:10,188 - ERROR - PAI.paradox.connections.connection - Connection was lost

yozik04 commented 1 year ago

Please install dependencies properly. Refer to the wiki.

britsmarius commented 1 year ago

i will look into that again but this was working before the update which I wish I never did

yozik04 commented 1 year ago

I suspect 'construct' dependency is too new. I did not had a chance to change the code so it would support newest version.

britsmarius commented 1 year ago

Thank you for your input just want to make sure there is then nothing I can do at the moment with this

yozik04 commented 1 year ago

Why nothing. Just downgrade it to the supported version.

britsmarius commented 1 year ago

If possible please advise on how to do this in Ubuntu 22.04

yozik04 commented 1 year ago

https://pypi.org/project/paradox-alarm-interface/

Did you install from pypi?

britsmarius commented 1 year ago

I did not I have the manual install that worked before. Should I rather use the pypi install

On Wed, 14 Jun 2023 at 07:27, Jevgeni Kiski @.***> wrote:

https://pypi.org/project/paradox-alarm-interface/

Did you install from pypi?

— Reply to this email directly, view it on GitHub https://github.com/ParadoxAlarmInterface/pai/issues/369#issuecomment-1590492365, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANMOEMWSPFC377VJKAHGIX3XLFDTHANCNFSM6AAAAAAZD4RBUA . You are receiving this because you authored the thread.Message ID: @.***>

yozik04 commented 1 year ago

Manual requires understanding what you do. :)

britsmarius commented 1 year ago

I am going the docker route but I think I am missing something with the pai.conf file do you remove the # or only update the fields without removing this as it keeps trying to connect via serial although I have said IP

yozik04 commented 1 year ago

Removing # is called "uncommenting". If you need to change a setting. You uncomment and change the value. Default values are always commented out.

britsmarius commented 1 year ago

I have done this and it then comes up with an error and stops

On Wed, 14 Jun 2023 at 13:16, Jevgeni Kiski @.***> wrote:

Removing # is called "uncommenting". If you need to change a setting. You uncomment and change the value. Default values are always commented out.

— Reply to this email directly, view it on GitHub https://github.com/ParadoxAlarmInterface/pai/issues/369#issuecomment-1590995717, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANMOEMWUY3ZB43LHXQANBM3XLGMSPANCNFSM6AAAAAAZD4RBUA . You are receiving this because you authored the thread.Message ID: @.***>