I was trying to find something that could send a small message via Wifi when a toilet door was locked/opened; and could be powered by the lock motion or harvested energy.
For that I wouldn't use WiFi. Use Thread or a custom nRF51 protocol. Both allow very long sleep times (infinite with a custom protocol) and can send millions of packets from a single coin cell.
I failed.