DIY Home Automation Smart Security Drawer for Cash & Keys

by SpannerSpencer in Circuits > Remote Control

72 Views, 0 Favorites, 0 Comments

DIY Home Automation Smart Security Drawer for Cash & Keys

Cash Drawer 01.jpg
Smart Cash Drawer 02.gif

A lockable cash and key safe that can be unlocked remotely using Home Assistant and voice control.

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 use 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. 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), 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.

I run Home Assistant with a Zigbee network, so I'm using a Zigbee relay with dry contacts (to switch 12V DC to the solenoid). But it could be a WiFi relay, ESPHome device, Tasmota-flashed relay, RF controlled, or whatever fits your needs the best. It's not doing anything complex.

Supplies

Cash Drawer 02.jpg
Cash Drawer 07.jpg
Cash Drawer 08.jpg
  1. Cash register drawer with solenoid trigger (eBay ~£22)
  2. Tuya TS0001 Zigbee relay with dry contacts (AC powered, Aliexpress ~£3)
  3. HLK-10M12 compact AC-DC converter (10W, 12V output, Aliexpress ~£3)

Dismantle the Cash Drawer

Cash Drawer 03.jpg

It comes apart pretty easily. The drawer can be removed like any drawer, and the bottom of the cash drawer unscrews so you can get to the solendoi and add the new components.

Mostly the solenoids are 12V, but from what I've read you might also get a drawer with a 24V solenoid. In which case, you'll need a 24V AC-DC converter. The converter and solenoid voltages need to match. Its voltage is likely printed on the solenoid itself.

This was also my opportunity to remove the feet and drill some mounting holes in the top of the drawer housing. I'm mounting it under a worktop, so it'll need fixing from the top. So depending where you're going to secure the drawer, now's a good time to think about mounting options.

Disable the Manual Release

Cash Drawer 05.jpg
Cash Drawer 06.jpg

There's a manual release lever underneath these cash drawers, which would defeat it a bit too easily.

Remove the solenoid briefly, and either bend the manual level back up inside the drawer, or cut it off completely. You aren't going to need it.

Cut the RJ11 Plug Off

Cash Drawer 09.jpg

The solenoid has an RJ11 cable connected to it, which is typically used to connect it to a till or a receipt printer. Then the till or printer sends a 12V pulse to the solenoid to unlock the drawer at the right moment.

We're going to connect it to the remote controlled Zigbee relay instead (or whatever kind of relay you're using).

Only two of the four wires in the RJ11 cable are connected to the solenoid. In this case, it was pins two and four (black and green wires) but you may have to experiment to figure that out for your cash drawer. Polarity doesn't matter, at least, so as long as your converter matches the solenoid's voltage you can test to see when the solenoid activates.

Activating the Solenoid With the Relay

Cash Drawer Solenoid.png
Cash Drawer 10.jpg
Smart Cash Drawer 01.gif

Test Location First: The first thing I did once it was all wired up is tested to make sure the Zigbee relay could still connect while mounted inside the metal drawer, and the drawer was inside a kitchen cupboard. Which it did, but you should check as well before locating the relay - if it can't get a signal through, you might have to mount the relay externally.

The relay and the converter both run on 240V AC. If you haven't already (and depending on the type of remote controlled relay you're using) now's the time to pair it to your home automation system. Could be Home Assistant, Tuya, or whatever eles.

The positive 12V DC output from AC-DC converter goes to the common contact on the relay. These are dry contacts, so they're isolated from the mains input powering the relay.

The solenoid is connected to ground on the AC-DC converter output, and the Normally Open contact on the relay. So when the relay is activated, it closes and sends 12V to the solenoid, activating it and opening the drawer.

Note: If you have a remote controlled relay that switches live mains instead of having dry contacts, you could use it to switch power to the AC-DC converter 240V input instead, and connect the solenoid directly to the 12V and ground outputs on the converter. It'd all work the same way. But my relay had dry contacts, so I opted for switching the low voltage instead of mains. But it's a valid option if you already have a Zigbee, WiFi or RF relay that switches mains.

I connected it up at this point to test that it was releasing the solenoid. I had to quickly turn the relay on and then off, so it only pulsed the solenoid rather than sending it permanent power. We'll get onto that in a moment.

12V Pulse to the Solenoid

Cash Drawer 12.png

Some relays have an inching/momentary option, but mine isn’t one of them. It’s either on or off. If your's can just momentarily pulse 12V, you're all sorted.

Since mine doesn't, I created a simple automation in Home Assistant 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.

  1. Trigger: Relay module turns on
  2. Action: Wait 150ms, then turn it off

Voice Control With Alarm Override

This step is pretty specific to my setup, but I thought I'd share it anyway.

I felt from the start that if this key safe/cash drawer is at all inconvenient, it won’t get used. So another advantage of integrating it into Home Assistant is having voice control to open it. I gave it a slightly obscure command, so you have to at least know what to say to open it by voice.

And 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 Home Assistant) is armed, voice control is deactivated. The button on our phones’ dashboard still works though, since the phones are locked and secure.

Solution: Created an Input Boolean helper as a proxy:

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


Result

Smart Cash Drawer 02.gif
  1. Secure key/cash storage with easy remote access
  2. Voice activation, only when home/house alarm is disarmed
  3. Phone control always available
  4. Automatic safety pulse (no risk of leaving solenoid on)
  5. Total cost under £30
  6. No cloud services required (except optional voice assistant)

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, hides them from view, and means we always put them back in the ,ame place. And the Home Assistant integration makes it convenient enough to open that we won’t get stalled of using it.

It also locks itself simply by closing the drawer, so that's another convenience that helps remove a little extra friction and ensures the whole family keeps using it.

Furthermore, these drawers have a manual key override to unlock them, which is never a bad thing when you're locking away something important. If something goes wrong, we can still get into it easily.

All in all, this was less than half the price of the nearest, dedicated solution I could find, and it has some features that more expensive options don't have (the key override, for example). Cheap and cheerful addition to any home security and Home Assistant setup!

https://community.home-assistant.io/t/diy-smart-key-safe-using-a-cash-drawer-and-home-assistant/976498