ActuatorToggle Card
The ActuatorToggle card provides on/off control for relays, switches, and other binary actuators.
Toggle Switch
Click the toggle to send a command to the Pi:
- The dashboard writes the desired state to Firebase RTDB
- Node-RED on the Pi reads the command
- The actuator hardware is switched
- The Pi confirms the new state back to RTDB
- The card updates to reflect the confirmed state
Staleness Detection
The card monitors how recently the Pi confirmed the actuator state:
- Fresh (green dot) — State confirmed within the expected interval
- Stale (yellow dot) — No confirmation received recently, may indicate a communication lag
- Offline (red dot) — No confirmation for an extended period
Timeout and Retry
If a command does not get confirmed within the timeout window:
- The card shows a retry button
- You can re-send the command
- If the Pi is offline, the command queues in RTDB and executes when the Pi reconnects
Command Flow
Actuator commands follow the unidirectional data flow:
- Dashboard writes desired state to
/devices/{id}/actuators/{name}in RTDB - Node-RED on Pi subscribes to that path and receives the command
- Hardware GPIO pin is set high or low
- Node-RED publishes the confirmed state back to RTDB
- Dashboard subscribes to the confirmed state and updates the card
The cloud never directly controls hardware. All commands go through the Pi's Node-RED engine.
Safety Considerations
- PID-controlled actuators — Manual toggle may conflict with the PID loop. The card shows a warning when the actuator is under PID control.
- Offline mode — If the Pi loses internet, actuators remain in their last commanded state. PID loops continue running locally.
- Power loss — Relay state after power restore depends on the relay module (most default to OFF).
Scheduled Control
Actuators can be controlled on a schedule:
- Time-based rules — Turn on at 6 AM, off at 10 PM
- Interval rules — Toggle every 15 minutes for 5 minutes
- Conditional rules — Combine with sensor readings (IF temperature > 30 THEN fan ON)
Schedules are configured in the Scheduled Automation section and execute on the Pi for reliability.