Your first rule
A rule waits on the computer for something to happen, then does one thing. This page walks through the M1 scenario: shut down the computer when the render finishes.
1. Ask
Section titled “1. Ask”Start the render first: a rule that waits for a program can only be added while that program is running.
Then type or say “shut down when blender finishes” in the ask box, or pick “Add a rule” by hand. With a planner set up, the sentence becomes a proposed action; without one, the ask box searches the action list. Either way the result is one action:
{"action": "rule.add", "params": {"trigger": {"process_ends": {"name": "blender.exe"}}, "then": "shutdown"}}2. Read the card
Section titled “2. Read the card”The phone shows a confirmation card built by code from that action (here for a computer named Studio PC):
| Line | Text |
|---|---|
| Title | Shut down when blender.exe closes |
| Sentence | Shut down Studio PC. The rule is saved on it and runs even if your phone is offline. |
| Later time | When blender.exe closes |
| Button | Set rule |
The card has a later time because the rule doesn’t run now. It has no undo line: you can cancel the rule any time, and Studio PC shows a 60-second notice before it shuts down. A rule that shuts down or sleeps needs your fingerprint or PIN, on the same card.
3. Confirm
Section titled “3. Confirm”Tap Set rule and pass the fingerprint or PIN prompt. The phone signs the command and sends it. The computer checks the signature, then the action. Because the rule shuts down, it then asks the power helper who is signed in: if another user is signed in, the phone says “Someone else is signed in on Studio PC, so it did nothing.”, and if the helper cannot be used it says “Something went wrong on Studio PC.” Last, the computer checks that the program is running. If it is not, the phone says “Studio PC cannot find that program.”
4. Wait
Section titled “4. Wait”The rule is saved on the computer and survives a restart of Tealhand Host. Every 5 seconds the computer looks at the processes. The program counts as ended when it is missing from two checks in a row, so a render that restarts its worker between frames does not trigger the rule.
5. The 60-second notice
Section titled “5. The 60-second notice”When the program has ended, the computer:
- checks again that nobody else is signed in (otherwise the rule is refused: “another user is signed in”),
- starts a 60-second notice. The Tealhand app on the computer shows it with a Cancel button, and the phone gets an event with the deadline.
At the deadline it looks again before doing anything. The shutdown does not happen when:
- the program is running again (the notice ends and the rule waits again from the start),
- the phone that set the rule is no longer connected,
- remote control was turned off on the computer,
- another user signed in meanwhile,
- the computer slept or hung through the notice (more than 30 seconds past the deadline).
Then Tealhand Host calls tealhand-power shutdown.
Cancel it
Section titled “Cancel it”| From | How |
|---|---|
| The phone, before the rule fires | Cancel the rule (“Cancel rule” on its card) |
| The phone, during the notice | “Cancel shutdown”: this stops the notice and the rule that started it |
| The computer, during the notice | Cancel shutdown on the notice in the Tealhand app (or Esc). On a computer without the app, use the phone |
| Another of your computers | Cancel rule under Power on that computer’s page in the Tealhand app |
A cancelled rule never fires again. Both cancels work even with remote control off, because they only lower risk.
- More triggers and what each state means: Shut down when a render finishes.
- Every action and its card: Actions.