Mail Fob is an open-source mailbox alerter that lets you know when mail is received. It works with Raspberry Pi Zero W, Home Assistant, MQTT, webhooks, and more.
Notification sent through Home Assistant.
Mail Fob can trigger phone alerts, lights, automations, dashboards, speakers, and custom API actions.
Get notified when the mailbox opens, closes, or receives mail.
Use sensors, automations, dashboards, notifications, lights, and speakers.
Publish mailbox events to MQTT topics for smart home platforms.
Send alerts to Discord, Slack, IFTTT, Node-RED, Zapier, or custom apps.
Built around a small, affordable Raspberry Pi with Wi-Fi built in.
Customize sensors, notification rules, battery logic, and software.
Mail Fob detects mailbox activity, sends the event over Wi-Fi, and lets your smart home decide what to do next.
Use a magnetic reed switch, tilt sensor, vibration sensor, PIR sensor, or distance sensor.
Python watches the GPIO pin and decides if the mailbox was opened or mail was received.
Send the alert through MQTT, webhook, REST API, email, Discord, or Telegram.
Your phone, lights, speaker, dashboard, or automation responds instantly.
Use Home Assistant first, or connect it directly to other apps and services.
Automations, dashboards, lights, speakers, and mobile alerts.
Publish to topics like mailfob/status.
Send a message to a Discord channel using webhooks.
Notify a household, office, or mailroom channel.
Send quick bot messages when mail is received.
Send simple SMTP email alerts to any inbox.
Create advanced smart home flows with webhook or MQTT nodes.
Trigger iPhone automations through webhook services.
Mail Fob can work with different sensor types depending on whether you want to detect the door opening, movement, or actual mail inside.
This section can become your docs or installation page later.
Install Raspberry Pi OS Lite and enable Wi-Fi and SSH.
Connect the reed switch or sensor to a GPIO pin and ground.
Run the Python listener service on the Raspberry Pi Zero W.
Add MQTT, webhook, Home Assistant, Discord, or email settings.
Place it in a weatherproof case near or inside your mailbox.
mailfob:
mqtt_host: "homeassistant.local"
mqtt_port: 1883
mqtt_topic: "mailfob/status"
sensor:
gpio_pin: 17
type: "reed_switch"
alerts:
event_opened: true
event_received: true
alias: Mail Fob Alert
trigger:
- platform: mqtt
topic: "mailfob/status"
payload: "received"
action:
- service: notify.mobile_app_phone
data:
title: "Mail Fob"
message: "Mail has been received."
- service: light.turn_on
target:
entity_id: light.entry_lamp
Mail Fob can be expanded with battery monitoring, solar charging, camera snapshots, mail count detection, mail carrier logs, and dashboard history.
Use this section for common setup questions.
Build a Mail Fob device and receive alerts the moment your mail arrives.
Start the Build