MQTTCarPresence: A Wi-Fi Car Tag That Opens Your Garage Door via Home Assistant

MQTTCarPresence: A Wi-Fi Car Tag That Opens Your Garage Door via Home Assistant. AutoMatter

A GitHub project called MQTTCarPresence takes a different approach to garage door automation. Instead of a phone app, GPS geofence or a plug-in tag, it puts a small Wi-Fi device in the car. When the car is on and the device is connected to your MQTT broker, Home Assistant knows the car is home and running. When the connection drops, Home Assistant knows it has left or been turned off. We have not built it, so this is a read of the project page, not a test report.

What it is

The project is built around a WeMos D1 mini Pro, a u.FL to SMA antenna whip, and an external 2.4 GHz Wi-Fi antenna, all in a 3D-printed enclosure (STL files are in the repo). The bill of materials also lists an M3x8mm socket head cap screw and an M3x4x6 threaded insert. The author says to power it from the car’s ignition so it is only on while the car is running. The repo is MIT licensed and shows 319 stars and 43 forks.

How it works

On power-up the device joins your Wi-Fi, connects to the MQTT broker, publishes a Home Assistant MQTT Discovery message, and registers a Last Will and Testament (LWT). That last part is the clever bit. When the car shuts off or drives out of Wi-Fi range, the broker itself publishes the disconnect message, so the device does not have to say goodbye.

The included blueprint then does the following, per the project description:

  • Car turns on, door is closed: the door opens.
  • You drive out of range: the door closes about a minute later.
  • You arrive home and connect to Wi-Fi: the door opens as you approach.
  • You turn the car off: the door closes about a minute later.

The Arduino version creates a binary sensor through MQTT Discovery. There is also a Tasmota variant with its own blueprint, which creates a switch through the Home Assistant Tasmota integration instead. It is aimed at people who would rather flash Tasmota than build an Arduino sketch.

What to check before you build it

  • Unique node names. The author warns that if you deploy more than one device with the same node name, they will fight over the broker in a cascade of connects and disconnects. Two cars means two names.
  • Antenna modification. Using an external antenna on the D1 mini Pro means moving a 0 ohm 0603 SMT resistor. The author says a hot-air station helps but a normal pencil iron worked for them. That is real SMD rework, so be honest about your soldering comfort.
  • Wi-Fi coverage where the car parks. The whole trigger is a Wi-Fi connection, so the open and close points are wherever your signal starts and stops. A weak spot at the end of the driveway changes when the door moves.
  • Broker basics. You need a working MQTT broker with discovery enabled. Home Assistant’s MQTT docs recommend the official Mosquitto Broker app, and discovery is on by default.
  • Tasmota security. In the Tasmota variant, the author says to set a web admin password in case the device falls into access point mode while you are away from home.

Our take

This is a neat, fully local design. Nothing leaves your network, there is no cloud account, and the logic is two simple states. It is also a good teaching example of MQTT’s Last Will feature doing real work.

Be careful with the automation, though, because it moves a large door with nobody necessarily watching. That is our opinion, not something from the project page. Before you trust it, confirm your opener’s safety reversing and photo eyes work, and think about what should happen if the car’s power flickers or Wi-Fi drops while you are still in the garage. A door that closes because a connection dropped is a design to test with the car parked, not with a pet or child nearby.

Also note that the repo page shows no release or version notes, so treat it as a community project you maintain yourself. Pin your broker settings, keep a copy of your sketch, and expect to adapt the blueprint to your own door entity.

Sources