Automations & hardware
Set up a Raspberry Pi
Turn a Raspberry Pi into an automation controller — drive locks, lights, dimmers, and read temperature, humidity, and door sensors, with a one-line installer.
A Raspberry Pi can act as a powerful automation controller: drive several relays and dimmers and read multiple sensors from one unit, with no firmware to flash. You image the Pi once, run a one-line installer, and it pairs with your POS automatically.
What you'll need
- A Raspberry Pi (a Pi 4 or Pi 5 is recommended) with a power supply and a microSD card.
- A microSD card reader and the free Raspberry Pi Imager app on your computer.
- Your wiring: a relay board for anything you want to switch (locks, lights), and any sensors you want to read.
Step 1 — Image the Pi
- Open Raspberry Pi Imager and choose Raspberry Pi OS (64-bit).
- In the Imager's settings (the gear / "Edit settings"), set a hostname, enable SSH, and enter your Wi-Fi name and password so the Pi joins your network on first boot.
- Write the card, put it in the Pi, and power it on. Give it a minute to start up.
Step 2 — Create the device
- In the Automations area, go to Devices → Set up a Pi (or New device and choose Raspberry Pi).
- Add a channel for each thing you want to control or read. Pick the type that matches the hardware:
- Relay — locks, lights, fridge power (on / off / timed pulse).
- PWM / analog out — dimmers, fan speed, servos.
- Digital in — door or reed switches, buttons.
- Temperature — DS18B20 probes (fridge, ambient).
- Humidity — DHT22 sensors.
- Counter — pulse / flow / footfall counting.
- Analog in — general analog sensors via an add-on ADC.
- Save the device. You'll see a pairing code and a ready-to-paste install command.
Step 3 — Run the installer
-
Connect to the Pi over SSH (for example
ssh <username>@<hostname>.localfrom your computer's terminal). -
Paste the install command shown on the device page. It looks like this, with your own host and code filled in:
curl -fsSL https://<your-automations-host>/api/pi/install.sh \ | sudo bash -s -- --code ABC123 --pair-url https://<your-automations-host>/api/pair -
The installer sets everything up and starts the agent as a background service. Within a few seconds the device shows online on its page.
That's it — the agent restarts automatically on reboot and reconnects on its own, so you only do this once per Pi.
Step 4 — Put it to work
- Use the On / Off / Pulse buttons on the device page to test a relay.
- Build a Rule to automate it — for example, pulse the lock relay when an order is paid, or send an SMS when the fridge temperature goes above a limit.
- Group several commands into a Scene to run them together.
Wiring tips
- Power your locks, lights, and motors from their own supply, switched through the relay — never directly from the Pi.
- For a fridge or freezer lock, use a timed pulse so it always re-locks even if something is interrupted, and add a door switch so a rule can confirm the door actually closed.
- Mount sensors away from heat sources for accurate readings.
Troubleshooting
| Problem | Fix |
|---|---|
| Device never shows online | Re-check the Pi's Wi-Fi, and that you pasted the full install command including the code |
| "Pairing code rejected" | Codes last 15 minutes — generate a fresh one on the device page and re-run the installer |
| A sensor reads nothing | Confirm it's wired to the channel's pin; some sensors need 1-Wire or I²C enabled (the installer does this automatically) |
| Relay clicks but nothing switches | Check the relay's own power supply and that the load is wired through the relay's switched terminals |
Need a hand? Contact support.