How to clarify the NodeMCU whether is WiFi disconnected or Power failure?

As my project is used as a alarm system, I would like to use Blynk App for monitoring the status of the NodeMCU as LESS as possible, because it will be a centralize monitoring system, and could be monitoring by others platform, e.g. HTTP.

However, is it possible to clarify the NodeMCU is now failure to connect the WiFi or power failure? As it is different meaning for our operation, if it is WiFi issue, just re-boot the router.
If the power is failure, it means our system may be suspended, our workers should go to site ASAP.

If no power, the MCU could not run the codes,
If no WiFi, the MCU could run the code but no message could be sent out.
(BTW, even we use Blynk App, we could only see the device is disconnected, still cannot know which case is it)

Any suggestions?

I think you have to ping your router using some other system. For example, accessing the router admin console over HTTP, or attempting to access a port that may even be closed. If you can reach the router from outside then you know you have power at the location.