Not gonna' happen. While technically possible it would require a ridiculously Rube Goldberg combination of things to make it work, and even then it would most likely be quite unreliable.
You can accomplish what you want much more easily with a home automation hub (SmartThings, et al), a sensor or two and a little time setting up an automation rule.