Github project:
Command is:
python relay_control.py <COM_PORT> <RELAY_NUMBER> <ACTION>
where parameters are:
<COM_PORT>: The COM port to which the relay device is connected (e.g., COM4).
<RELAY_NUMBER>: The relay number you want to control (1-8).
<ACTION>: The action to perform on the relay
0: Read relay status
1: Turn ON
2: Turn OFF
3: Toggle
4: Interlock (Activates one relay while ensuring all other relays are deactivated)
5: Momentary ON (0.5-second hold, then release)
7: All relays ON
8: All relays OFF
To toggle relay 1 connected to COM4:
python relay_control.py COM4 1 3