I have a few animal-friendly mouse traps that I want I want to integrate in HA. I want it to send HA a signal and notify me when the trap is closed, so I can fetch the mouse and release it. This reduces the amount of stress the mouse experiences and saves me having to continuously inspect the traps.
I was thinking about adding some sort of beacon which power supply is only connected when the trap is closed. A door sensor is easy to install, but it’s adds to much weight to the ‘gate’ and they are more expensive than the trap itself. I considered an iBeacon, but I don’t have a Bluetooth dongle connected yet to HA, which I could but I’m concerned about picking up a lot of random devices in the area that I don’t want to deal with.
I imagine a sensor that ticks the following boxes:
Cheap
Easy wiring
Battery-powered / cordless
Doesn’t interfere with the mouse trap mechanism
I was thinking about hacking some sort of Zigbee alternative to the Bluetooth beacon, where it’s disconnected from battery power unless the trap is closed, which in turn closes the circuit. However, I don’t know about such beacons. Does anyone have a good suggestion for the beacon or better solution altogether?
One way would be to use a contact sensor wired into GPIO pin on your controller. Probably not idea because of the wire. To remote this you could us an esp board running ESP HOME that has GPIO pin for integration. While this isn’t that expensive, it’s may be more costly then you’d like.
Thanks for your answer, Brian! I’ve considered an ESP. I have a few running that work very well, but I feel I can get away with something simpler for this specific purpose. I noticed I forgot to include a “battery powered / cordless” requirement, which I’ll add. I could power the ESP with a battery, but it’s a bit more of a hassle. That’s why I thought to hack a battery-powered device.
Can’t you use a door/window sensor and glue it to the door part also on the ‘door’ but instead on the top you put it close to the bottom/hinges, so the weight is probably no issue.
I use SONOFF SNZB-04 ZigBee Wireless Door Window Sensor which work fine and are not that expensive.
Thanks for the suggestion, Nick! Somehow I’m not optimistic about this solution. The trap seems quite sensitive and I’m afraid adding something to the door will mess up the mechanism.
I just realized I can use any battery-powered Zigbee device as a beacon. For example, I could use a temperature sensor and add a wire that closes the circuit with the battery when the door is closed, making the trap door function as a toggle switch. Whenever the sensor sends a signal, I know the trap door is closed. I just need the find the cheapest sensor there is
I will try this out and provide an update here if it worked!
EDIT: I’ve ordered this temperature sensor for $5.76. I’ll add a piece of paper to disconnect one of the battery poles and wires to bridge it.
I have bunch of aqare, and Mi , motion-sensors … i would try to “mount” a “taped/more-focus” motion-sensor, to the side-middel-section of the Motel
EDIT: And assuming the door is closed, when the mouse trigger the motion-sensor
A door sensor will work just fine if you replace the magnet part with a strong and small one, but if not you can always replace the reed switch with two wires. A water sensor will do the same but is usually more expensive. Both are more likely to work than a zigbee device that is always offline because the battery is disconnected. It may refuse to come online again when the battery is connected by the mouse and you’ll never know it until you actually trap a mouse and notice it didn’t trigger.
That door seems to be stiff enough to attach the smaller part of a windows/door sensor though…
The weight of that sensorpart on the door if it’s close to the bottom/hinge will not be a problem.
A motion sensor could do as well, given that it will only detect when there is something IN the trap and not get false positives when a mouse is in the area.
About using a temperature sensor; I don’t get it how you would make that work.
BTW: does that sensor that you ordered work without a connection to the cloud, so directly with HA?
I have bunch of aqare, and Mi , motion-sensors … i would try to “mount” a “taped/more-focus” motion-sensor, to the side-middel-section of the Motel
EDIT: And assuming the door is closed, when the mouse trigger the motion-sensor
@boheme61 That makes a lot of sense. I could try this as well.
A door sensor will work just fine if you replace the magnet part with a strong and small one, but if not you can always replace the reed switch with two wires. A water sensor will do the same but is usually more expensive.
@Edwin_D I hadn’t considered replacing the magnet part of the door sensor with a much smaller, powerful magnet. That’s a great idea!
About using a temperature sensor; I don’t get it how you would make that work.
BTW: does that sensor that you ordered work without a connection to the cloud, so directly with HA?
@Nick4 If you open the battery compartment of the sensor and put in a piece of paper to disconnect the battery from the circuit, the device doesn’t work. When you glue a piece of aluminum foil to both sides of the paper and add wires, you can bridge the paper by connecting the cables. I’ll attach these cables to the door and the top part of the trap, so they touch when the door closes.
The temperature sensor should work with my Zigbee2MQTT setup, according to Blakadder.
You might also try a movement sensitive beacon (like my BC021). It’s quite light so I don’t think it will effect the spring mechanism that closes the door. You can set it to do nothing until it senses movement (adjustable sensitivity). Then once it senses movement, it will begin to broadcast for X configurable seconds. Your HA just needs to see that broadcast and then trigger your notification, “a mouse guest has checked in!” With these settings the battery will last for many, many years.
(If you are still worried about the beacon effecting the door movement, you could also try attaching the beacon to the side of the trap and set it to most sensitive level. I think the shaking of the trap after the door and mouse movement should be enough movement to set off the beacon.)
The scanning part is the tricky part. If your HA is close enough to the trap, you can install the iBeacon Tracker integration to handle the scanning. It’s a little slow in reaction time, but that won’t be a problem for your usage case.
If not, you could try setting up an ESPresense or ESPHome closer to the trap so it can “see” the broadcast and communicate that info back to your HA. (We have a new product in development that will do something similar but launch date is not set yet.)
Or the BLE dongle solution you mention. You don’t need to worry about having to deal with lots of BLE devices showing up in the dongle scan. Whether they do show up or not, just ignore them. Having lots of BLE items on a list you don’t look at should not have any effect on your HA’s performance. I may be wrong about this though; I have read quite a few complaints from iBeacon Tracker users about long lists of mysterious BLE items showing up on their integration device list. I always wonder why/how it bothers them. Maybe I am missing something here though.
Last but not least, once you are into beacons, you will likely find many other cool usage cases for them around your house: mailbox trigger, garage door opening, room presence for lights etc, door unlocking, pet door locking/unlocking, pet feeders, etc.