DIY Smart Key Safe Using a Cash Drawer and Home Assistant

I wanted a key (and cash) safe that’s easy to access as we’re likely to be in and out of it a lot, so connecting it to Home Assistant would mean I can unlock it from the dashboard or voice control. I looked at various off-the-shelf options, everything from fingerprint-drawer locks to gun safes. But nothing quite hit the mark without costing a fortune.

I eventually stumbled onto a locking cash register drawer on eBay. The kind you see under a till in a shop that pops open when they want to put money in or out. It makes an excellent key safe - secure, cheap (around £22 I think), it has a built-in solenoid that can be electronically triggered to open it, and there’s the backup option of a key override unlock on the front.


Hardware

  • Cash register drawer with solenoid trigger (eBay ~£22)
  • Tuya TS0001 Zigbee relay with dry contacts (AC powered, Aliexpress ~£3)
  • HLK-10M12 compact AC-DC converter (10W, 12V output, Aliexpress ~£3)


How It Works: The drawer’s solenoid normally connects to a till or receipt printer via an RJ11 cable, and expects a brief 12V pulse to open the drawer. So I just replaced the till with:

  1. HLK-10M12 converts mains AC to 12V DC
  2. Zigbee dry N/O relay switches 12V to the solenoid
  3. Home Assistant automation pulses the relay to briefly activate the solenoid = drawer pops open

Why This Setup:

  • Mains AC power means no batteries to maintain
  • Zigbee relay can live inside the drawer (signal penetrates thin metal frame - I tested first)
  • Compact Hi-Link module fits inside easily
  • 10W rating handles solenoid surge current (brief ~1-2A pulse)

I know this isn’t massively secure or difficult to defeat, but fixing the lockable drawer inside a cabinet at least gives keys and cash some protection and means we always know where they are. And the HA integration makes it convenient enough to open that we won’t get stalled of using it. Speaking of which…

Home Assistant Integration

1. Auto-Off Automation

The relay’s paired through Zigbee2MQTT. But this would work equally well with any other kind of remote relay unit; a wifi one, or even one that’s flashed with the likes Tasmota. All it needs is dry contacts to briefly supply 12V to the solenoid via remote control.

Some relays have an inching/momentary option, but this isn’t one of them. It’s either on or off. So I created an automation that watches the Zigbee relay and automatically turns it off after 150ms, regardless of how it was activated. This ensures the solenoid only ever gets a brief pulse, never continuous power.

  • Trigger: Relay module turns on
  • Action: Wait 150ms, then turn it off

2. Voice Control with Alarm Override

I felt from the start that if this key safe/cash drawer is at all inconvenient, it won’t get used. So that’s another advantage of integrating it into Home Assistant; the voice control. However, just for a little extra peace of mind, I set a condition on opening it using voice control - if Alarmo (our house alarm system through HA) is armed, voice control is deactivated. The button on the phones’ dashboard still works though, since the phones are locked.

Solution: Created an Input Boolean helper as a proxy:

  • Voice assistant triggers the helper, not the Zigbee relay directly. The relay isn’t exposed.
  • Automation checks if Alarmo is disarmed.
  • If yes: activates the actual relay (which auto-pulses via automation #1).
  • If no: nothing happens.
  • Helper resets either way (in case it gets turned on while voice activation is disabled).

3. Key Override

This is something that even the more expensive, dedicated options didn’t offer. I do love having things automated, but when it’s something important like your keys, a manual override is important. These cash drawers have that built in. Makes this a rock solid option for a simple security drawer.

Results

  • Secure key/cash storage with easy remote access
  • Voice activation, only when home/house alarm is disarmed
  • Phone control always available
  • Automatic safety pulse (no risk of leaving solenoid on)
  • Total cost under £30
  • No cloud services required (except optional voice assistant)

Tips

  • Check your drawer’s solenoid voltage first (most are 12V, some are 24V)
  • Test your remote relay gets a signal when inside the drawer, and in its final position, beforehand
  • The 150ms pulse time works well - adjust if needed
  • Link quality through thin metal: seems totally fine within a few metres of a Zigbee router
  • Consider adding a capacitor (1000-2200µF) across the 12V output if kick seems weak (I didn’t need this)
  • This drawer had a manual release lever under the solenoid. That seemed like it defeated the whole purpose as anyone could unlock it, so I bent the level back up inside the drawer housing to take it out of action. See below.

1 Like

Didn’t realize these could be had for so cheap and I find myself wanting one now… No idea what I would use it for though… Ha

2 Likes

I was a bit surprised! Even the form factor and footprint turned out to be more useful than dedicated, purpose made, expensive options.

Great just as a way to make a slightly more secure home for any cash, cards, keys, passports, etc.