Building on Helmar's answer I would suggest a DIY solution: a miniaturized reed switch and a magnetized / magnet attached deadbolt.
Check if there is place for a miniaturized reed switch within the strike plate with the deadbolt fully extended. Those switches come in packages as small as 2 mm diamater and about 10..15 mm long. Since they actually come with a glass body you need to make sure the deadbolt does not actually pushes the switch. Depending on the design of the strike plate and door frame it might be possible to increase the available space (not compromising the mechanical strength of the strike plate though).
Check if the deadbolt can be magnetized, i.e. following the esoteric procedures as outlined here "Rubbing the Metal with a Strong Magnet". Test if the deadbolt actually actuates the switch if properly aligned. Alternative if magnetizing fails: superglue a magnet to the deadbolt's tip.
Fixate the reed switch someplace inside the strike plate and run two wires to an "IoT"-like microcontroller, e.g. an ESP8266 or similar.
Total cost < 5 $, but might well take an afternoon or two to build.