Sonoff Magnetic Door lock - wiring help

Hi, I want to make a simple sonoff (flashed with tasmoda) controlled magnetic door lock. I will probably use this: https://www.aliexpress.com/item/DC-12V-24V-Open-frame-electromagnet-door-lock-Force-15N-10N-travel-distance-10mm-Lock-Type/32817094427.html

However I am not sure about wiring… I want to have an exit button and maybe a entry button (or keypad/nfc reader/sensor etc) as well as control using home assistant app and alexa, here is my current idea for the wiring… would this work?

Cheers, Alex

The buttons should be connected to the gpio pins… and not in line with the device

Refer drzzs videos for examples

Thanks! I will :smiley: