How to hibernate windows 10 and other question

I’m really new in this world of openhab so i basicly dont know anything, but i manage to create an item with wol to wake up my pc (other pc, no my openhab server).
So now i want to ask if there is a way to hibernate (because i dont shutdown, that pc cant handle the wake up after a full shutdown)
So my solution is on my phone i do this: http://remote-host-name:5001/secret/hibernate
using this app:
is there anyway to sent this via the openhab? that way if i turn the switch off would hibernate the PC?

i use this item to wakeup the pc
Switch MainPC “Mi PC” (Status, Network) [ “Switchable” ] { wol=“” }

This generate other question: is there a way to get the status of the pc and let the switch turn on if the pc is on and the switch off if the pc is off?

Look at the HTTP binding to request that same URL you use from your phone.

Assuming your machine joins your local network when it is ON, you can use the Network binding.

Do you have any example of how to add those binding to the switch i already have? or i need to create another item? (im really noob on this)

Like this?

Switch MainPC “Mi PC” (Status, Network) [ “Switchable” ] { wol=">[ON:]", http=">[OFF:POST:]" }

I would create another switch to start with until it works.

The tool you are using says it uses an HTTP GET, not POST.

In the same item i create this Switch OffPC “Mi Compu” [ “Switchable” ] { http=">[*:GET:]" }

and create a switch button on the habpanel, but isnt working

Well the 2 switches are working, i had a problem with the firewall, but is all fix.
one switch to turn on and one to turn off.
Now my question is:

If i turn of my PC manually, the turn on switch keep on turn position, i need to press twice to turn on the pc, how i fix the status update of the pc?

Now that you have the mechanics working, you can try using just the one Switch Item with both binding configs. I think that might work but wanted you to avoid adding extra complexity which makes it harder to figure out if you get something wrong. Now that you know the binding part works, try merging them into one Switch.

If that doesn’t work, you will need to use a Rule to synchronize them.

Well the 2 things in a switch work for a while, but i don’t know why sometimes stop working and i need to re do the item.
So i Made 2 switches and i actívate them with dif sentences with Google home, next my idea is make a rutine yo combo both