Dec-29-2021, 07:30 PM
Hello,
I have been dabbling in Python on and off for several years and have found a need to motivate me to learn more: (I have fairly extensive experience in VBA/SQL)
I have a X10 hardware home automation interface (CM15) which recently broke down, there are no replacements for it, but an alternative similar to it (CM19) exists, for which the usual driver (Mochad, written in C) does not work well.
I found Python software for the CM19: https://github.com/trrroy/cm19a/blob/mas...aDriver.py which I would like to modify.
The program allows to switch a light (Amongst some other things) on an off from the command line. It is reloaded for every command.
In 2.7, I found that it did what is said it would, notably communicate via USB with the hardware.
My first step was to convert it from Python 2.7 ( to Python 3.8.
In 3.8 it works every 2nd time (systematically.) only
The only differences in the 2.7 and 3.8 code are print and except statements, which do not seem related to my problem.
However, in 2.7 worked with pyUSB 1.0, 3.8 with pyUSB 1.2
To see the functioning of 2.7 with pyUSB 1.2, I uninstalled pyUSB 1.0 after this running the program with 2.7 shows
ImportError: no module named usb
All attempts, to install puUSB (1.2 or 1.0) including installing in a 2.7 virtual environment, show "Requirement already satisfied: pyUSB in /usr.local/lib/python3.8/dist-packages (1.2.1)" but using 2.7 it is not found?
Uninstalling 3.8 to start from scratch created dire warnings, I did not go-ahead. (I am on Linux Mint 20)
Thanks in advance for any help or advise
Pete
I have been dabbling in Python on and off for several years and have found a need to motivate me to learn more: (I have fairly extensive experience in VBA/SQL)
I have a X10 hardware home automation interface (CM15) which recently broke down, there are no replacements for it, but an alternative similar to it (CM19) exists, for which the usual driver (Mochad, written in C) does not work well.
I found Python software for the CM19: https://github.com/trrroy/cm19a/blob/mas...aDriver.py which I would like to modify.
The program allows to switch a light (Amongst some other things) on an off from the command line. It is reloaded for every command.
In 2.7, I found that it did what is said it would, notably communicate via USB with the hardware.
My first step was to convert it from Python 2.7 ( to Python 3.8.
In 3.8 it works every 2nd time (systematically.) only
The only differences in the 2.7 and 3.8 code are print and except statements, which do not seem related to my problem.
However, in 2.7 worked with pyUSB 1.0, 3.8 with pyUSB 1.2
To see the functioning of 2.7 with pyUSB 1.2, I uninstalled pyUSB 1.0 after this running the program with 2.7 shows
ImportError: no module named usb
All attempts, to install puUSB (1.2 or 1.0) including installing in a 2.7 virtual environment, show "Requirement already satisfied: pyUSB in /usr.local/lib/python3.8/dist-packages (1.2.1)" but using 2.7 it is not found?
Uninstalling 3.8 to start from scratch created dire warnings, I did not go-ahead. (I am on Linux Mint 20)
Thanks in advance for any help or advise
Pete