Ikea PARASOLL - hack door close sensor to use monostable switch instad of a magentic sensor.

May 16th 2024 — Hack, Ikea, Parasoll, Zigbee

I was looking for a simple ZigBee "door sensor", but using a physical switch (non-magnetic) as I wanted to install it inside my entry door lock so it reports lock status. There's a cheap Ikea PARASOLL magnetic door sensor available that I was able to hack into a physical switch and use in Home Assistant.

I found this tear down on Reddit. Device is not easy to open without damaging the case, but it was fine - since I was going to embed the switch inside my door lock.

I did some measurements wirth oscilloscope and MH3171 is the hall sensor (magnetic sensor). Top pin is ground, left is signal input, right is signal output.

CPU sends a short square pulse 5 times a second. Sensor IC outputs the same pulse, but amplified in voltage if magnet is detected. 

I removed MH3171 chip and replaced it with mono stable switch. I wired normally connected (NC) input pin, normally open (NO) to VCC pad and output to signal output. This way when switch is closed, square signal is passed directly to the output ( = no magnet detected), when switch is opened - signal is pulled up to VCC.

Edit: Wiring is wrong, see the update section.

Even though there's no square signal in "closed" state - device still reports closed state just fine.

The only caveat I have - since magnetic sensor didn't need debouncing, switch toggle may trigger a few quick events which you have to filter yourself in HA automation.

Update - proper wiring, battery life, debouncing 

As noticed by /u/kludki on Reddit (and notifying me in PM since the thread is now locked) I made a simple obvious brainfart in the wiring. Looking at the first photo - top pin of the Hall IC is VCC, middle is ground and bottom is the sensing output. 

What you really should do is put a resistor (I used 100k) between a sensing output  and a ground (this ensures signal is down when the switch is not activated). Then connect a 75K resistor from VCC to COM pin of the switch, and wire NO switch pin to the sensing output.

This will both debounce the switch (no more filtering needed in Home Assistant) and extend battery life from about a month to something like 5-6 months.