THE HUB

The Hub/GLOBAL CACHE/End Points/Flex Relay Sensor

GLOBAL CACHE, End Points

Flex Relay Sensor

Control
IP
Encoding
ASCII
IP
TCP port 4998
Line ending
CR
Roles
End point

Commands

33 commands
OTHER33
GET DEVICE MODE getdevices
Reply: device,0,0 %adevice,1,1 RELAYSENSORendlistdevicesVariables: One line per module, each ending CR, then endlistdevices. %a = ETHERNET, WIFI. A Flex always reports one port on module 1, whatever the cable carries. Sensors on module 2 are not listed (a known bug)Ending: cr
OPEN RELAY 1 setstate,1:1,0
Reply: state,1:1,0Variables: A relay must be configured with SET RELAY_TYPE before it switchesEnding: cr
OPEN RELAY 2 setstate,1:2,0
Reply: state,1:2,0Variables: A relay must be configured with SET RELAY_TYPE before it switchesEnding: cr
OPEN RELAY 3 setstate,1:3,0
Reply: state,1:3,0Variables: A relay must be configured with SET RELAY_TYPE before it switchesEnding: cr
OPEN RELAY 4 setstate,1:4,0
Reply: state,1:4,0Variables: A relay must be configured with SET RELAY_TYPE before it switchesEnding: cr
CLOSE RELAY 1 setstate,1:1,1
Reply: state,1:1,1Variables: A relay must be configured with SET RELAY_TYPE before it switchesEnding: cr
CLOSE RELAY 2 setstate,1:2,1
Reply: state,1:2,1Variables: A relay must be configured with SET RELAY_TYPE before it switchesEnding: cr
CLOSE RELAY 3 setstate,1:3,1
Reply: state,1:3,1Variables: A relay must be configured with SET RELAY_TYPE before it switchesEnding: cr
CLOSE RELAY 4 setstate,1:4,1
Reply: state,1:4,1Variables: A relay must be configured with SET RELAY_TYPE before it switchesEnding: cr
GET FIRMWARE VERSION getversion
Reply: %vVariables: %v = firmware part number and version, for example 710-3000-21Ending: cr
GET NETWORK get_NET,0:1
Reply: NET,0:1,%a,%b,%c,%d,%eVariables: %a = UNLOCKED, LOCKED %b = DHCP, STATIC %c = IP address %d = subnet mask %e = gatewayEnding: cr
GET CABLE MODE get_RELAYSENSOR,1:1
Reply: RELAYSENSOR,1:1,%aVariables: %a = 4R4S. Documented in the Flex API 1.6 onlyEnding: cr
SET MODE RELAY_SENSOR set_RELAYSENSOR,1:1
Reply: RELAYSENSOR,1:1Variables: Documented in the Flex API 1.6 only; the Unified API has no command that selects the relay and sensor cableEnding: cr
GET RELAY_STATE 1 getstate,1:1
Reply: state,1:1,%sVariables: %s = 0 open, 1 closedEnding: cr
GET RELAY_STATE 2 getstate,1:2
Reply: state,1:2,%sVariables: %s = 0 open, 1 closedEnding: cr
GET RELAY_STATE 3 getstate,1:3
Reply: state,1:3,%sVariables: %s = 0 open, 1 closedEnding: cr
GET RELAY_STATE 4 getstate,1:4
Reply: state,1:4,%sVariables: %s = 0 open, 1 closedEnding: cr
PULSE RELAY 1 setstate,1:1,1,%t
Reply: state,1:1,1Variables: %t = hold time 1-4294967295 ms, then the relay returns to its previous state. Firmware 22 and laterEnding: cr
PULSE RELAY 2 setstate,1:2,1,%t
Reply: state,1:2,1Variables: %t = hold time 1-4294967295 ms, then the relay returns to its previous state. Firmware 22 and laterEnding: cr
PULSE RELAY 3 setstate,1:3,1,%t
Reply: state,1:3,1Variables: %t = hold time 1-4294967295 ms, then the relay returns to its previous state. Firmware 22 and laterEnding: cr
PULSE RELAY 4 setstate,1:4,1,%t
Reply: state,1:4,1Variables: %t = hold time 1-4294967295 ms, then the relay returns to its previous state. Firmware 22 and laterEnding: cr
GET RELAY_TYPE 1 get_RELAY,1:1
Reply: RELAY,1:1,%tVariables: %t = SPST, SPDT, DPDT, Disabled, UnavailableEnding: cr
SET RELAY_TYPE 1 set_RELAY,1:1,%t
Reply: RELAY,1:1,%tVariables: %t = SPST, SPDT, DPDT, Disabled. SPDT takes two ports and DPDT four, starting at an odd port. Set every affected port to Disabled first, or no change is applied and an error is returnedEnding: cr
GET RELAY_TYPE 2 get_RELAY,1:2
Reply: RELAY,1:2,%tVariables: %t = SPST, SPDT, DPDT, Disabled, UnavailableEnding: cr
SET RELAY_TYPE 2 set_RELAY,1:2,%t
Reply: RELAY,1:2,%tVariables: %t = SPST, SPDT, DPDT, Disabled. SPDT takes two ports and DPDT four, starting at an odd port. Set every affected port to Disabled first, or no change is applied and an error is returnedEnding: cr
GET RELAY_TYPE 3 get_RELAY,1:3
Reply: RELAY,1:3,%tVariables: %t = SPST, SPDT, DPDT, Disabled, UnavailableEnding: cr
SET RELAY_TYPE 3 set_RELAY,1:3,%t
Reply: RELAY,1:3,%tVariables: %t = SPST, SPDT, DPDT, Disabled. SPDT takes two ports and DPDT four, starting at an odd port. Set every affected port to Disabled first, or no change is applied and an error is returnedEnding: cr
GET RELAY_TYPE 4 get_RELAY,1:4
Reply: RELAY,1:4,%tVariables: %t = SPST, SPDT, DPDT, Disabled, UnavailableEnding: cr
SET RELAY_TYPE 4 set_RELAY,1:4,%t
Reply: RELAY,1:4,%tVariables: %t = SPST, SPDT, DPDT, Disabled. SPDT takes two ports and DPDT four, starting at an odd port. Set every affected port to Disabled first, or no change is applied and an error is returnedEnding: cr
GET SENSOR_STATE 1 getstate,2:1
Reply: state,2:1,%sVariables: %s = 0, 1. Polarity differs by document, so read the value, not a labelEnding: cr
GET SENSOR_STATE 2 getstate,2:2
Reply: state,2:2,%sVariables: %s = 0, 1. Polarity differs by document, so read the value, not a labelEnding: cr
GET SENSOR_STATE 3 getstate,2:3
Reply: state,2:3,%sVariables: %s = 0, 1. Polarity differs by document, so read the value, not a labelEnding: cr
GET SENSOR_STATE 4 getstate,2:4
Reply: state,2:4,%sVariables: %s = 0, 1. Polarity differs by document, so read the value, not a labelEnding: cr

Cheat sheet

driver.cheatSheet()

What it is

A Global Cache Flex on the FLC-RS cable has four relays and four sensor inputs. The relays combine into SPST, SPDT or DPDT switches.

Specs

Type: 4 relays and 4 sensors on a Flex Link cable (FLC-RS)

Inputs: 4x relays, SPST normally open, 24 V AC/DC 0.5 A; 4x sensor inputs

Mounting: Desktop or surface

Setup

First Use: Set the cable mode with SET MODE RELAY_SENSOR. Every relay is Disabled at power-on: set each relay with SET RELAY_TYPE before switching it. Sensors are on module 2. Works on a Flex IP, Flex IP PoE or Flex WiFi base unit. The cable mode, not the base unit, decides which commands answer. With no DHCP server a Flex IP takes 192.168.1.70. Up to 8 clients on port 4998.

Support

Tech Support Phone: 541-899-4800

Power Cycle: Remove power for ten seconds. Relay states return to open after a reset or power cycle.

About this driver

driver.source()

Confirm each command on your device before you rely on it. Provided as is, with no warranty. To correct something or ask for it to come down, write to info@ctrlbot.io. Licensed CC BY 4.0: credit CTRLbot and link back when you share it. Product page. Manufacturer site.

Revision
1
Updated
2026-11-05
Catalog date
2026-11-12
License
CC-BY-4.0