Unsolved PyQT5-Zigbee App
-
Hi, i try to run this project, but i have problem.
https://github.com/RuslanSdk/XBee-PyQt5-V.1.0
I'm able to add one Xbee/Zigbee module (although i can't see the info for it in the app), but when i try to add second module, the app just shutdown.
Any help ?
-
Hi
Did you try to use the debugger to see what happens ?
It don't list any errors or anything when it crashes ? -
Hi,
Besides @mrjj's good suggestions, the code does not look like it's written for multiple concurrent connections. You should check the architecture.
-
Hi, with Debug mode i've got this response:
C:\python\XBee-PyQt5-V.1.0-master\venv\Scripts\python.exe "C:\Program Files\JetBrains\PyCharm Community Edition 2020.3.3\plugins\python-ce\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 56672 --file C:/XBee-PyQt5-V.1.0-master/XBee_gui.py Connected to pydev debugger (build 211.7628.24) COM-порт: 12, Скорость: 115200 ПОРТ ОТКРЫТ. Устройство готово к работе Firmware version: 21 A7 S2B ZigBee Coordinator API COM-порт: 14, Скорость: 9600 ПОРТ ОТКРЫТ. Устройство готово к работе Firmware version: 23 A7 S2B ZigBee Router API S2B ZigBee Router API
It seems like when i try to connect second device, it replace the first one.
What to do ?
-
Refactor the code so it can handle multiple connection.
-
@SGaist
Well, according to image description, it should establish some network. I hope it does.
https://github.com/RuslanSdk/XBee-PyQt5-V.1.0/blob/master/images/network-map-icon.png -
@SGaist
It is difficult for me, because i'm now to this.
Can someone help me? -
Since you need several objects, you need to use either a list or a dictionary to store these objects depending on how you want to retrieve them later on.
Since you are new to this, I would recommend starting with training the basics before launching yourself in a complex applications.