PyQt5 GUI app to configure the wiring and control the relays.
-
First install Python 3.8.x in
C:\Python38
(Windows x86-64 executable installer from python.org) -
Download
RelayControlInstallation.zip
from this GitHub repository -
Unflate it in a folder of your choice (for xcape.io Room users, choose the Plugins folder).
-
Run
install.bat
with a double-click to create the Python virtual environment (venv). -
Set MQTT broker IP address in
constants.py
MQTT_DEFAULT_HOST = 'localhost' # replace localhost with your broker IP address
-
Run
test.bat
to test your new settings app.
PyRelayControl is a pure python applet so you can install it on any computer running python with PyQt5.
You will have to install following Python packages:
$ sudo apt-get update
$ sudo apt-get install python3-pip
$ pip3 install --user pyqt5
$ sudo apt-get install python3-pyqt5
$ sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools
Then:
-
Download
RelayControlInstallation.zip
from this GitHub repository -
Unflate it in a folder of your choice
-
From this folder, install requirements
$ pip3 install -r requirements.txt
-
Start the settings app, assuming your MQTT broker IP address is 192.168.1.42
$ python3 main.py -s 192.168.1.42
With the new Raspberry Pi 4 with 2 HDMI outputs and 4GB memory, controlling your escape room with a Raspberry Pi starts to make sense.
You will have to install following Python packages:
$ sudo apt-get update
$ sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools
$ sudo apt-get install python3-pyqt5 python3-pyqt5-dbg
Then:
-
Download
RelayControlInstallation.zip
from this GitHub repository -
Unflate it in a folder of your choice
-
From this folder, install requirements
$ pip3 install -r requirements.txt
-
Start the settings app, assuming your MQTT broker IP address is 192.168.1.42
$ python3 main.py -s 192.168.1.42
PyQt5 installation on Mac can be tricky, see PyQt5 installation on Mac at LearnPyQt.
At fisrt start (prop.ini
not created yet), configure the relay prop:
To configure the Relay prop:
- Choose Arduino, Raspberry or STM32 board model
- Set board option if any (Dragino Yún shield or MCP23017 expander)
- Edit prop MQTT topics (inbosd/outbox/wiring)
- Set MQTT broker IP address and port
At first start, when choosing board model:
- prop name is filled with a default name
- inbox topic is filled with xcape.io recommandations
- outbox topic is filled as well
- wiring topic is filled too
When you apply the prop settings, the control panel appears as well as the wiring dialog (because, it' first start).
Click on a pin button to configure:
To move a configuration to another pin, select an available pin in the output field.
When all pins are configured (they are saved to a local JSON file), you have to Upload wiring to broker so the prop receives the wiring and setup itself its GPIO and commands.
This is done in one-click on Rebuild panel from new wiring:
Passing by, you may fill SSH credentials for Relaunch and Reboot button.
All widgets are light switches and they are gouped (for variable with /
separtor like maglocks/*
):
You can Edit captions and indicators:
The panel widgets editor before customization:
The panel widgets editor after customization:
You can change captions and switch images, move the groups up and down and hide widgets or entire groups.
Eventually, the final control panel:
For Raspberry Pi prop, Relaunch button edition is enabled:
The SSH command is set by default for the PiPyRelayProp, you may have to change the script path:
Faure Systems (Jun 28th, 2020)
- company: FAURE SYSTEMS SAS
- mail: dev at faure dot systems
- github: fauresystems
- web: Faure Systems