Each recipe is written as the card shows it: When, Only if, Then, Options. Device names, keys and commands are examples; use your own. Commands must exist in the device profile’s command catalog. Test each rule with Test now before saving.
1. Fan on when the room is hot during working hours
- When: Room sensor ·
temperaturerises above 28 and stays so for 5 minutes. - Only if: A time window after 08:00, before 18:00, Monday to Friday.
- Then: Send a command Fan ·
fan.setwithon = true.
A second rule switches it off: When temperature falls below 25 and stays so for 5 minutes; Then fan.set with on = false. The gap between 28 and 25 keeps the fan from cycling.
2. Lights at sunset, off at 23:00
Rule “Lights on”:
- When: Sunrise or sunset · Sunset, 15 minutes after (negative: before).
- Then: Send a command Every Light controller ·
light.setwithon = true.
Rule “Lights off”:
- When: A time of day · 23:00, Every day.
- Then: Send a command Every Light controller ·
light.setwithon = false.
The site needs a location for sunset. See Time, sunrise/sunset, dates and holidays.
3. Heating on weekday mornings, not on public holidays
- When: A time of day · 06:00, Monday to Friday.
- Only if: A public holiday · Today is a working day.
- Then: Change a setting Every Thermostat ·
setpointto 21.
Holidays come from your organisation’s holiday calendar; without one, every day is a working day.
4. Heater off while the loading door is open
- When: Loading door ·
door_openbecomestrue. - Then:
- Send a command Door heater ·
heater.setwithon = false. - Wait until something holds: Loading door ·
door_openisfalse, for at most 30 minutes, then stop. - Send a command Door heater ·
heater.setwithon = true.
- Send a command Door heater ·
- Options: Ignore the new one.
If the door stays open longer than 30 minutes, the run stops and the heater stays off; add a third step under a choice to tell people if you want.
5. Standby pump takes over
- When: An alarm · Pump 1 · is raised, at least Major. Also: A device connects or disconnects · Pump 1 · goes offline.
- Only if: Pump 2 · is online.
- Then:
- Send a command Pump 2 ·
pump.start. - Tell people · Admins · “Pump 1 failed; Pump 2 started.”
- Send a command Pump 2 ·
6. Duty pumps alternate by week
Two rules, one per pump, using days of the month as weeks.
Rule “Pump 1 duty”:
- When: Days of the month · days 1–7, 15–21 and 29–31, at 06:00.
- Then: Change a setting Pump 1 ·
dutyto 1; Change a setting Pump 2 ·dutyto 0.
Rule “Pump 2 duty”: days 8–14 and 22–28, with the values swapped. The pump controllers read their duty shared attribute.
7. Tell people when a device stays offline
Start from the ready rule Tell people when a device stays offline:
- When: Gateway · goes offline.
- Then:
- Wait 10 minutes.
- Choose by a condition: If Gateway is offline then Tell people · Admins · “A device has been offline for 10 minutes.”
A short outage that ends within the wait tells nobody. For a recorded alarm instead, use a Device offline rule.
8. Summer and winter setpoints
- When: A time of day · 05:00, Every day.
- Then: Choose by a condition:
- If Months or dates · Between two dates 05-15 to 09-30 then Change a setting Every Air handler ·
modetocool. - Otherwise Change a setting Every Air handler ·
modetoheat.
- If Months or dates · Between two dates 05-15 to 09-30 then Change a setting Every Air handler ·
9. Night cooling with outside air
- When: Every so often · 15 minutes.
- Only if:
- Day or night · It is night.
- A formula:
[Office].[temperature] > [Outdoor].[temperature] + 3. - A value · Office ·
temperatureis above 23.
- Then: Send a command Window actuators ·
window.open. - Options: Ignore the new one.
10. A flushing sequence started by hand
- When: Only when I press Run now.
- Only if: Tank ·
levelis above 40. - Then:
- Send a command Flush valve ·
valve.open. - Wait 3 minutes.
- Send a command Flush valve ·
valve.close. - Tell people · Members · “Flushing finished.”
- Send a command Flush valve ·
Operators start it with Run now in the card (“Run name now? It moves equipment at once.”).
Tips
- Pair “on” and “off” rules with a gap between their thresholds, or use and stays so for, to avoid cycling.
- Use Every profile rows for whole groups of devices, up to 200 per row.
- A rule that only tells people can be marked Also runs in Manual.
- When a rule grows beyond the card, Detach into an ordinary flow. See Flows.

