I would like to create a lock that can be operated via Wi-Fi.
To do this I decided to connect the following 12V solenoid electric door lock to a Raspberry Pi.
However, I am not sure of the correct way to connect this to the Pi.
From the image I see two wires, so I assume the way that it operates is by simply putting current though it. However my concern is that it operates at 12V, while the Pi Zero operates at a lower voltage. I'm also unsure as to how much resistance I should add as well, or if there is any other issues that I'm not aware of.
So my question is, What is the correct way of connecting this device to the Raspberry Pi, (note I am using the Raspberry Pi Zero).