← All projects
AutomationHome AssistantHardwareShopifyCompleted

Shopify-Triggered Cabinet Unlock

A Home Assistant automation that listens for paid Shopify orders via webhook and unlocks a physical cabinet so the customer can retrieve their product — no staff required.

March 5, 2026


Overview

A pilates studio sells accessories and supplements directly — resistance bands, water bottles, protein bars. The problem: the instructor is mid-class, sales slip through, or someone has to interrupt a session to hand over a product.

This automation removes the human from the transaction entirely. The client pays through the Shopify store on their phone, the cabinet unlocks, they take the product, and the door relocks automatically when closed. No vending machine. No staff. No lost sales.

How It Works

  1. Client purchases a product via the Shopify storefront
  2. Shopify fires a webhook to a Home Assistant endpoint on payment confirmation
  3. HA checks that financial_status == 'paid' before acting
  4. Order details (number, amount, items) are written to input_text helpers for display or logging
  5. Power is cut to the electromagnetic cabinet lock — the door releases
  6. Client opens the cabinet, takes the product, and closes the door
  7. A separate door-sensor automation re-engages the lock once closure is detected

Stack

ComponentRole
ShopifyOrder management + webhook source
Home AssistantAutomation engine + webhook receiver
Electromagnetic lockCabinet security (energized = locked)
Smart switch / relayControls lock power
Door sensorDetects close event to re-lock

Why Not a Vending Machine?

Commercial vending machines cost upward of $3,000–5,000, require dedicated space, and lock you into one vendor's software. This setup uses a cabinet already in the studio, a $15 electromagnetic lock, a smart switch, and Home Assistant running on hardware that was already there. Total hardware cost: under $50.

The Shopify integration means pricing, inventory, and receipts are handled by a proper e-commerce platform — not a proprietary vending OS.