Triggers
When the device says X, answer Y — automatically
A trigger is a rule: when a chosen piece of text appears in the data coming from the device, ComIO.Studio sends a reply of yours back, without you touching anything. It is the small automation that turns “the device asks for a password” into “the session logs in by itself”, or keeps a connection alive by answering a periodic poll.
Where you define them
The Triggers section in the sidebar is where you build the rules — one row per rule, with a + button in the header to add another. The number next to the title shows how many rules you have. Each rule also has its own enable switch, so you can keep a rule around but have it sleep.
The toggle switch on the top bar (next to the Triggers icon) turns all rules on and off at once — handy when you want to listen without replying for a moment.
The Triggers section — one row per rule, each with its own enable switch and a remove button
The four fields of a rule
Each row carries:
- Pattern — the text to look for in the incoming data, e.g.
Password:orPING. The match is a plain text search: case-sensitive, no regular expressions, no hex pattern. The bytes coming from the device are read as UTF-8 and your pattern is looked for inside them as a substring. - Response — what to send back when the pattern is found.
- Mode — Text or Hex. This decides
how the Response field is read, not how the Pattern is searched: a
text response honours escape sequences (
\r,\n,\t) and gets the EOL appended; a hex response is sent byte for byte, with nothing added. - EOL — line ending appended to a Text response: None, CR, LF or CRLF. Ignored in Hex mode.
A small ✕ button on the right of each row removes that rule; the rows below move up.
No save button
Like macros, triggers have no “Save” or “Cancel” button. Every
change goes to disk straight away. The list lives in
settings/triggers/triggers_config.json and survives restarts.
How a match fires
When a piece of data comes in, each enabled rule is checked in order: if its Pattern is found anywhere in the incoming bytes, the Response goes out on the port, and the matching part of the incoming data is consumed — so one appearance of the pattern does not fire the same rule twice. If several rules match, each fires in its turn.
The fired response appears in the terminal with the direction mark TX_TRG (see the Terminal chapter), so you can tell a trigger's reply apart from your own typing, a macro, a script or the AI assistant.
Example: auto-login
Pattern: "Password:"
Response: "mypassword" Mode=Text EOL=CRLF
→ When the device sends "Password:", ComIO.Studio
automatically replies with "mypassword\r\n".
Example: keep-alive
Pattern: "PING"
Response: "PONG" Mode=Text EOL=LF
→ Each time the device sends "PING", the answer "PONG\n" goes back.