You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jared Dunbar edited this page Dec 24, 2025
·
2 revisions
The Modbus RTU is an entity that allows your real life electrical
monitoring equipment to communicate with your in game circuits via the
Modbus protocol.
It is necessary to enable it in the config before you can use it. The
game will warn you if it is not enabled in the configuration file.
Note that you need to install the pymodbus pip package:
pip install --user pymodbus
Code listing
import time
from pymodbus.client.sync import ModbusTcpClient
client = ModbusTcpClient('127.0.0.1', 1502)
while True:
read = client.read_input_registers(10, 4).registers
print(read)
client.write_coil(15, read[3] > 1024*32)
time.sleep(0.1)
client.close()
You will also need to enable the Modbus RTU in the game config file. It
only interacts with wireless signals at the time of writing, examples
will be eventually provided.