Universal Relay Prop for Escape Room with STM32 Nucleo-144 connected with Ethernet.
In your Escape Room, PiPyRelayProp centralizes the control of your main relays:
- lights
- electricity
- maglocks (doors)
- smoke machines (warmp-up and shots)
No coding is required, the relay outputs are configured with the PyRelayControl wiring GUI and the commands can be triggered with the PyRelayControl panel or a regular control panel for Room by xcape.io users.
- Prepare Arduino IDE and Nucleo
- Installation for STM32 Nucleo-144 (F767ZI)
- Relay Prop wiring and control panel
- Relay modules
- Prop commands
- Prop data messages
- Prop configuration for Room by xcape.io
You will find instructions in the ArduinoProps.md (1. Installation and usage) to install:
- ArduinoProps library
- PubSubClient library
- ListLib library
Next you need to install ArduinoJson library:
Then add STM32 boards in the Boards Manager, adding package_stm_index.json
to Additional Boards Manager URLs in Preferences:
URL to add: /~https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json
Eventually, install STM32 libraries:
- STM32duino Examples
- STM32duino LwIP
- STM32duino STM32Ethernet
Download RelayProp-master.zip
, the sketch NucleoRelayProp.ino
is in the NucleoRelayProp folder in RelayProp/NucleoRelayProp/
.
Advanced users may clone the /~https://github.com/xcape-io/RelayProp repository.
Open the NucleoRelayProp.ino
sketch in the Arduino IDE to set MQTT topics for your Escape Room:
NucleoRelayProp prop(u8"Relay Nucleo", // as MQTT client id, should be unique per client for given broker
u8"Room/My room/Props/Relay Nucleo/inbox",
u8"Room/My room/Props/Relay Nucleo/outbox",
u8"Room/My room/Props/Relay Nucleo/wiring/#",
"192.168.1.42", // your MQTT server IP address
1883); // your MQTT server port;
Then upload the sktech to the Relay Mega board.
All relay outputs are setup with the PyRelayControl GUI:
See PyRelayControl
See RELAY_MODULES.md
STM32 Nucleo-144 boards expose the ST Zio connector, which extends the Arduino Uno V3 connectivity with 73 digital outputs (D0
to D72
).
Commands are implicitly defined with the PyRelayControl GUI, you can create group commands by naming variables in groups with the /
separator.
Relay commands are built from the variable name:
props:on
: power on the propssmoke/on:1
: ower on the smoke machinesmoke/fog:1
: release fog from the smoke machine
Group commands uses the /*
tag:
maglock/*:0
: release all the maglocksdoor/*:0
: open all the doors
Relay state variables are sent as defined with the PyRelayControl GUI, as well as the board and settings informations:
wiring:
0: not configured
1 to 73: number of pins configured
board:
STM32 Nucleo-144
For example:
board=STM32 Nucleo-144
wiring=9
Room by xcape.io users can add the Relay Pi prop to their props:
And create a regular control panel:
Faure Systems (Jun 28th, 2020)