Arduino Assisted Shutdown with Inverter System

Good morning,

I am new to the open source hardware of the Arduino UNO, so I apologize if my knowledge is lacking and I would appreciate it if you could explain yourself thoroughly. I have an inverter system in my household which allows off grid sustainable power for a couple of hours after a power cut. I need my UNO to recognize when there is a loss of grid power, and shutdown my desktop computer to avoid hardware damage.

My computer setup is surrounded by grid power wall outlets and inverter system outlets. My proposed solution is that I would have an AC to DC 5v converter in the grid power outlets at all time, which would mean that when grid power is present, there is a constant 5v supply. So I wonder if the pins in the Arduino are able to monitor if voltage is present; so when a power cut occurs there is no longer voltage at the pins and the board could conclude that there is a power cut. Additionally the Arduino would be powered from another source, this AC to DC converter is only there to indicate if there is a power cut. What do you think? If this idea is promising or do you have any other suggestions, it would be greatly appreciated, essentially the Arduino would act as a voltmeter.

Now the next step is to shut down my desktop computer. So when voltage is no longer present at the pins of the Arduino it would have to shutdown my computer. Now what is the best way to do this? I've thought about executing a .bat file which can schedule a shutdown; is this possible? Also maybe there is a way to seamlessly and directly interact with windows functions through the Arduino software or drivers. A final request would be to integrate the drivers into the board itself, essentially allowing it to be plugged into a unknown windows computer and allow a scheduled shutdown when there is a power cut, or loss of power at the pins.

I would appreciate thorough explanations to lead me into the right direction.

Thank you,

Kind regards,

Alex

So I wonder if the pins in the Arduino are able to monitor if voltage is present;

Yes it is, as long as it has it's own supply.

so when a power cut occurs there is no longer voltage at the pins and the board could conclude that there is a power cut.

A reasonable assumption.

What do you think?

As good a way as any IMO.

As for the shutdown part I have no idea, but my UPS has that feature so it can be done.