Documentation

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

  1. Open Raspberry Pi Imager and choose Raspberry Pi OS (64-bit).
  2. 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.
  3. Write the card, put it in the Pi, and power it on. Give it a minute to start up.

Step 2 — Create the device

  1. In the Automations area, go to Devices → Set up a Pi (or New device and choose Raspberry Pi).
  2. 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.
  3. Save the device. You'll see a pairing code and a ready-to-paste install command.

Step 3 — Run the installer

  1. Connect to the Pi over SSH (for example ssh <username>@<hostname>.local from your computer's terminal).

  2. 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
    
  3. 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

ProblemFix
Device never shows onlineRe-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 nothingConfirm 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 switchesCheck the relay's own power supply and that the load is wired through the relay's switched terminals

Need a hand? Contact support.