In many home security systems they use magnet switches to detect the state of the door.
You could also use something like IR to see if a certain part of the door frame is blocking the light.
And one more option is to sense if the door is horizontal or vertical, basically you would mount it to the inside of the door, when it opens it would be horizontal and closed would be vertical. This is actually how most of the off-the-shelve generic sensors work.
If you have a particular method that you prefer I can give some specific sensor recommendations as well.
Edit: I missed that you said you wanted it 4 meters from the door. I am not sure if you just want this because you don't want to deal with wireless, but the IR method can also work in which you put something that reflects IR on the door and then have your sensor look to see if your IR beam has been reflected or not.
Some more additions:
If it were me, I would get something like this, there are lots of other brands and methods that are used. Buying sensors and wireless modules can be pretty expensive when bought in quantity 1 and probably wont be worth the cost over just buying the off the shelf method.
Now if it were me wanting to tackle a fun project, I would use an accelerometer attached to the inside of the door (could even be a board just Velcro'd to the inside of the door). The accelerometer doesn't need to be anything special, just something that when attached can detect acceleration in the down direction when the door is vertical and the down direction when the door is horizontal. It so happens that the force of gravity will show up on an accelerometer. I would then use an Xbee module to transmit the status to an xbee that is inside.
Realistically you don't need to transmit very much very often, you could put everything into sleep mode when ever you aren't reading and then once every minute or so wake up and transmit the current state. Because of how little the device is on it could easily run off of a battery for a decently long time.
There may be other, better, methods of detection, but when ever I do a "for fun" project I like using parts that I might use in other projects. It helps to grow the intellectual property that I have, which is useful for the future.
Depending on the type of your door and key, you might have some success with inductive measurement from the inside. If your door, lock, and cylinder are mostly diamagnetic, and the key is ferromagnetic , you can measure a change in inductance of an inductor mounted on the inside of the lock when a ferromagnetic key is inserted. This should work for paramagnetic keys as well.
If your key is ferromagnetic, you might successfully magnetise the key and measure the inducted electromagnetic field when the key is inserted.
If the door cylinder is useable from both sides, you might insert a pin into the lock from the inside that will be moved when a key is inserted on the outside. Not a good idea because it might possibly damage your lock, though.
A totally different way would be to force people to put their keys on a specific hook, and alert if the key is not there.
Or make the door keyless.
Best Answer
There should be no issue with a 300m loop length. The door switch is a simple ans basic magnetic reed switch contact closure. And the switch input to the Wise4060 is perfectly compatible.It would be quite unusual for there to be any problem with your proposed configuration. Unshielded twisted pair is perfectly adequate and quite commonly used for this kind of application.