homebridge-paradox-security-system icon indicating copy to clipboard operation
homebridge-paradox-security-system copied to clipboard

IP150-MQTTv2.py modifications to python v3

Open chlitses opened this issue 3 years ago • 3 comments

Hi all.

I am trying to make the necessary modifications for this topic to run the script in python3. Any ideas, since I am stuck with some errors in IP150-MQTTv2.py & the client.py?

ParadoxIP150v2-master.zip

Or any other ideas how to run the whole process in Python2?

chlitses avatar Dec 21 '21 23:12 chlitses

I’m still running in 2.7 side by side with 3.9, keen to see if there are updates in this thread!

saundersrg avatar Dec 22 '21 06:12 saundersrg

I’m still running in 2.7 side by side with 3.9, keen to see if there are updates in this thread!

is there any way that I run the whole process from 2.7? when I open python s/w from raspberry, I have only option to compile with v3.

chlitses avatar Dec 22 '21 12:12 chlitses

You should be able to use apt-get to install 2.7, then you can update alternatives if I recall if you want to run it commandline. I've got it running as a service and specify 2.7 in there:

[Unit]
Description=Starts and stops the Paradox IP150 Python script
Documentation=https://github.com/Tertiush/ParadoxIP150v2
Wants=network-online.target
After=network-online.target

[Service]
EnvironmentFile=/opt/paradoxip150v2/config.ini
User=homeassistant
Group=homeassistant
WorkingDirectory=/opt/paradoxip150v2/
PermissionsStartOnly=true
ExecStart=/usr/bin/python2.7 /opt/paradoxip150v2/IP150-MQTTv2.py
TimeoutStopSec=20

[Install]
WantedBy=multi-user.target

saundersrg avatar Jan 10 '22 05:01 saundersrg