Domotizing your mailbox 3.0

Objective and approach: how I domotize my mailbox

In this article, I share all the steps to domotise my mailbox and easily track the receipt of mail or parcels, from the first set-ups to the latest developments. My aim is to explain to you step by step, in a simple and detailed way, how I have modernised the monitoring of my mailbox to receive accurate notifications, use appropriate sensors and automate the management of arrivals and withdrawals of mail.

Whether you want to reproduce all or part of this project, or simply take inspiration from certain solutions, I detail each step, each technical choice, and I illustrate all the steps with photos and configuration extracts. I also explain the mistakes to avoid and the possible alternatives so that even a beginner can successfully domotise their mailbox.

This is how I went from a simple installation to a complete, reliable and connected solution, adapted to today’s needs.

Former DS12A 433MHz sensor
Ancient Home Automation Mailbox Installation

The End of "Domotizing Your Mailbox" 1.0 (2012-2020)

On October 19, 2020, by publishing the tutorial Domotizing your mailbox 2.0, I announce the end of an era.

Before 2020, like many, I domotize my mailbox with the detector DS12A in 433MHz. This sensor is reliable, runs on two easy-to-replace AAA batteries and detects both the main door opening and the slot through dry contact. This system has perfectly fulfilled its mission for more than 8 years.

So I remove this assembly that has become obsolete. For the record, here are the pictures of the disassembly:

Dismantling of the DS12A assembly
Old disassembled installation
Removal of home automation equipment 1.0

The End of "Domotizing Your Mailbox" 2.0 (2020-2025)

In 2020, I switch to version 2.0, but I quickly see that the detection of the slot is no longer useful: From now on, the postman almost always uses the main door and parcels become the norm.

I am therefore simplifying the system: I only detect the front door (factor side) and the back door (home side), using two very reliable Xiaomi door/window opening sensors.

Detector Xiaomi version 2.0
Xiaomi Second Door Detector

Welcome to "Domotizing Your Mailbox 3.0"

Xiaomi sensors are becoming difficult to find and the old mailbox is no longer suitable. Parcels are becoming more frequent, so a scalable solution is needed.

I order a parcel box

I choose the BRAD 1 key lock, 2 doors: the new XXL Mailbox and Small Packages. It exists in version one door (299 €) or two doors (329 €).

XXL mailbox, package version

Upon delivery, I can see the manufacturing quality and the careful packaging, all made in France.

Unpacking the XXL mailbox

Installation of the XXL mailbox

Once installed, here is the result:

XXL mailbox in place

I'm doing Zigbee cover tests.

I install a Zigbee door/window sensor inside the box. Home Assistant detects openings and closures perfectly, no problems of scope: The supposed "Faraday cage" does not interfere with the signal. For me, everything works.

I place a sensor on each door

I use Moes sensors ZSS-GWM-C, economical (less than 10 €) and very easy to integrate, available at Domadoo.

Moes Zigbee sensor placed on the box

I detail my tests on these sensors here:

On the rear door (home side), here is the door, with a focus on robustness:

Back door of the box, home side

I attach a magnet to the top right (pictured) for the sensor:

Rear Door Magnet Position
Zoom on sensor installation
Detail of the sensor installation

For the front door (street side/factor):

Front door of the box, street side

I install the module at the top right:

Front Door Fixed Module

Then I tinker with a small support to position the magnet in front of the module:

Front Door Magnet Holder
Support detail
Fixed magnet

Everything is now in place:

Domotized and operational box

I switch to the Zigbee pairing of the two sensors ZSS-GWM-C . Everything works, no problems of scope or Faraday cage effect.

After pairing, I therefore have both sensors in Zigbee (the sabotage control can be deactivated if necessary). I present one below, the other being strictly identical.

Zigbee sensor pairing in Home Assistant

The two opening sensors created are therefore:

  • binary_sensor.boite_aux_letttres_avant_cote_factor_contact
  • binary_sensor.boite_aux_letttres_arriere_cote_maison_contact

Addition of a front door opening counter

To count the openings of the front door, I create a input_number in Home Assistant:

  1. I'm going into Settings > Devices and Services > Entries.
  2. I click at the bottom right on Create an entry Then I choose "number".

Create input_number in Home Assistant

This counter is called: input_number.boite_aux_letttres_ouvertures_avant

Addition of a ‘full box’ sensor

To find out if something has been filed, I create a input_boolean :

  1. In Settings > Devices and Services > Entries, I click on Create an entry, then I choose Switch.

Creation input_boolean box full

This sensor shall bear the name: input_boolean.boite_aux_letttres_pleine

Automation of notifications

I automate notifications to be notified as soon as an event occurs.

When the door on the postman's side is open:

Automation factor side opening

Triggering: at each opening of the front door, the system is activated.

What automation does:

  • Increment a counter to find out how many times the door has been opened in the day.
  • Take a photo via the camera, store the snapshot.
  • Activates the ‘full box’ indicator.
  • Alexa voice announcement: the message differs depending on whether it is the first opening or not.
  • Sends a notification with the photo on the phone.
  • 2-second break to stabilize the system.

I also use a camera to receive an instant photo every time the mailbox is opened. This camera is not mandatory: this is an option I added to find out if it is the postman, a delivery person or anyone else who puts something in the box. With each opening, it simply takes a snapshot that is sent with the notification. I do not go into the details of the configuration because this part remains optional: Even without a camera, the whole system works perfectly.

Here is the corresponding YAML code:

alias: Box with Letters Before description: "" triggers: - entity_id: - binary_sensor.boite_aux_letttres_avant_cote_factor_contact from: "off" to: "on" trigger: state conditions: [] actions: - target: entity_id: - input_number.boite_aux_letttres_ouvertures_avant data: {} action: input_number.increment - data: filename: /media/cameras/cars/last.jpg target: entity_id: camera.camera _cars action: camera.snapshot - action: input_boolean.turn_on metadata: {} data: {} target: entity_id: input_boolean.boite_aux_letttres_pleine - aka: Launch an action announcement: notify.alexa _media _partout data: message: > {% if (states('input_number.boite_aux_letttres_ouvertures_avant')|int == 1) -%You have mail! {% else -%You have mail! {{states('input_number.boite_aux_letttres _ouvertures_avant')|int}}th of the day. {%- endif %} data: type: announce - metadata: {} data: title: Open Data Mailbox: sound: none attachment: /media/cameras/cars/last.jpg message: > {%- set overtures = states('input_number.boite_aux_letttres_overtures_avant')|int -%} {%- if openings == 0 -%No opening today. {%- elif openings == 1 -%First of the day, surely the postman! {%- else -%} {{openings }}th of the day. {%- endif %} action: notify.information - delay: hours: 0 minutes: 0 seconds: 2 milliseconds: 0 mode: single max_exceeded: silent

When the door on the house side is open:

Automation opening on the house side

Triggering: as soon as the back door opens, the automation starts.

What automation does:

  • Disables the ‘full box’ indicator (recovered mail).
  • Reset the aperture counter to zero.

YAML code:

alias: Box with Letters Back Description: "" triggers: - entity_id: - binary_sensor.boite_aux_letttres_arriere_cote_maison_contact from: "off" to: "on" trigger: state conditions: [] actions: - action: input_boolean.turn_off metadata: {} data: {} target: entity_id: input_boolean.boite_aux_letttres_pleine - action: input_number.set_value metadata: {} data: value: 0 target: entity_id: input_number.boite_aux_letttres_openings_before mode: single max_exceeded: silent

Creation of the display card on the Dashboard

On my Home Assistant dashboard, I use a type card picture-elements in full screen. Here is the code used for this card:

type: picture-elements image: /local/house/1920x1000/transparent.png elements: - type: conditional conditions: - entity: input_boolean.boite_aux_letttres_full condition: state state: "on" elements: - type: custom:button-card color_type: card entity: input_boolean.boite_aux_letttres_pleine show_state: true state_display: | [[ const val = Math.floor(states["input _number.boite _aux _lettres _ouvertures _avant"].state); if (val === 0) return "Empty"; if (val === 1) return "An opening"; return val + "openings"; ]]] name: Mail tap_action: action: toggle state: -value: "on" color: green icon: mdi:mailbox-up styles: card: - animation: blink 2s ease infinite - operator: default color: "#49556c" icon: mdi:mailbox styles: card: - height: 110px - width: 110px - "--mdc-ripple-color": white - "--mdc-ripple-press-opacity": 1 name: - font-size: 1em - white-space: normal state: - font-size: 0.65em - white-space: normal style: top: 93% left: 11%

Explanations on the Dashboard display card

I use an advanced card on my Dashboard to get immediate visual feedback on the presence of mail in the mailbox:

  • Conditional display: The map is only displayed if the Boolean input_boolean.boite_aux_letttres_pleine is activated, i.e. when a mail event has been detected.
  • Display of the number of openings: The text displayed in the map shows the number of front door openings in the day thanks to the value of input_number.boite_aux_letttres_ouvertures_avant :
    • Empty if no opening
    • An opening if only one
    • Or the exact number (e.g. "2 openings")
  • Dynamic icon: The icon changes depending on the status of the box:
    • full box, green icon, flashing animation to attract attention
    • empty box, dark grey
  • Touch action: If I click on the map, the Boolean input_boolean.boite_aux_letttres_pleine deactivates. This makes it possible to return the card to its normal state (after having retrieved the mail).

With this map, I can see in real time if the box contains mail, how many openings have been counted, and I can easily reset the alert with a simple tap (or if the back door is open).

Conclusion: a mailbox connected and adapted to my needs

By upgrading my mailbox step by step, I was able to adapt my installation to current usage: instant notifications, precise monitoring of openings, management of bulky parcels and easy monitoring, all without concern for scope or integration. I tested different solutions, took advantage of each experience and found equipment that was simple to install, economical and reliable. The MOES ZSS-GWM-C is a good choice.

Thanks to this approach, I gain comfort on a daily basis and I can customize my alerts according to my needs. This project remains open: If technologies change or my needs change, it is easy to change or improve automation.

Do not hesitate to ask me questions in comment if you want to go deeper into certain points or if you encounter difficulties when setting up. I hope that this feedback will help you to domotise your mailbox in a simple, sustainable and effective way.

Other resources:

  • I advise you to read this Article by Argonaute, who inspired me to use the aperture meter, but who also takes seriously the question of the range of the sensors and the options available in the event of difficulty.

Leave a Reply