For my alarm I simply mounted regular magnetic contacts at the top.
For my Hubitat I have an Ecolink modified with a mercury sensor. It has never given me any issues. I purchased the mercury switches on ebay for $2
Here are photos of my conversion mercury conversion
You will need so reasonable soldering skills and a good soldering iron to be successful. You might be better off cutting the leads of the existing sensor and soldering the mercury switch leads to the remaining mechanical switch leads.
John