Building a Raspberry Pi SMS and Cellular Shop Alert Gateway with a GSM/LTE HAT
WiFi-based shop alerts — a push notification when a print finishes, a Telegram bot when the CNC hits an alarm, an email when the laser's air assist pressure drops — all share one failure mode: they're useless the moment your internet connection goes down, which is exactly when you most want to know something went wrong unattended. A cellular SMS gateway sidesteps that single point of failure entirely. This build turns a Raspberry Pi and a cheap LTE HAT into a standalone text-message alert system that works as long as there's cell coverage, completely independent of your home network, router, or ISP.
This isn't the same ground as this site's existing ESP32 cellular connectivity guide, which covers adding a SIM7000/SIM800L module directly to a sensor-style microcontroller project. This build is specifically a Pi-based gateway: a single always-on box that other devices on your network can hand alerts to (over MQTT, a webhook, or a simple file watch) and that turns them into outbound texts, plus receives inbound commands by SMS when you're away from the shop entirely.
Parts and Hardware
- Raspberry Pi 4 or Zero 2 W (this is a low-duty-cycle background service — no need for anything more powerful)
- An LTE Cat-1/Cat-4 HAT built around the SIMCom SIM7600 series (Waveshare's SIM7600E-H/SIM7600G-H HATs are the most common and best-documented for Pi) — these expose a USB serial modem interface and include GNSS, which you won't need here but doesn't hurt
- A nano-SIM with a basic voice/SMS-capable plan — a prepaid IoT SIM or even a spare phone line works; you do not need a data plan if you're using SMS only, though a small data allotment is handy for remote SSH over cellular as a side benefit
- A cellular-band-appropriate antenna (the HAT usually ships with a stub antenna; a magnetic-mount external antenna routed to a shop window meaningfully improves reliability in a metal-walled shop or basement)
- A reliable 5V/3A USB-C power supply — brief transmit bursts spike current draw and undervoltage here causes modem dropouts that look like intermittent SMS failures
Software Setup
Once the HAT is seated and the SIM installed, Raspberry Pi OS will usually expose the modem as a set of /dev/ttyUSB* serial ports. You have two realistic paths for SMS handling:
ApproachGood forTrade-offs Gammu + gammu-smsdA dedicated SMS daemon with a simple SQLite/MySQL outbox and inbox you can script against from any languageGammu's modem compatibility list is older-school AT-command focused; works well with SIM7600 but configuration is all in one gammu-smsdrc file ModemManager + mmcliComes pre-integrated with most Pi OS network stacks already, good if you also want the modem for data/SSH fallbackSMS handling via mmcli is more manual — no built-in daemon/queue, you're polling and parsing yourselfGammu is the more direct path if SMS is the whole point: install it, point gammu-smsdrc at the correct serial device and baud rate, set the service running, and gammu-smsd-inject becomes your one-line way to send a text from any script or cron job. Inbound messages land in a simple inbox folder or database table you can poll.
Wiring It to the Shop
The gateway earns its keep by being the thing everything else reports to. A few practical patterns:
- MQTT bridge: subscribe to topics your other projects already publish to (OctoPrint/Klipper print-complete events, an ESP32 door sensor, a CNC alarm relay wired to a GPIO input) and fire off a templated text on specific topics or thresholds
- Webhook listener: a tiny Flask/FastAPI endpoint that accepts a POST from Home Assistant automations or Node-RED flows and turns it into an SMS via the Gammu injector
- Two-way control: parse specific inbound keywords ("STATUS", "LASER OFF") and trigger a GPIO relay or hit a local API — genuinely useful as a kill-switch you can reach from anywhere there's signal, with no VPN or port forwarding required
Reliability Notes
Treat this as safety-adjacent infrastructure, not a toy: if you're using it to alert on things like an unattended laser or an overheating enclosure, its own uptime matters. Put the Pi on a UPS HAT so a brief power blip doesn't take down your only out-of-band channel at the same moment something else fails, and add a watchdog cron job that pings the modem (mmcli -m 0 or a Gammu status check) and restarts the service if it's gone unresponsive — cellular modems occasionally wedge after a signal dropout and need a power-cycle or service restart to recover. Budget for SMS costs or plan limits if you expect frequent alerts; most prepaid IoT SIMs price per-message or per-month-allotment rather than unlimited.
Done once, this becomes one of the more quietly useful boxes in a shop: it doesn't do anything flashy, it just keeps working when the WiFi-dependent half of your home automation setup doesn't.