Question Make smartwatch controlled ATX PSU

s355

Junior Member
Jun 1, 2021
23
0
6
I want to make a smartwatch controlled ATX PSU. If the Pi receives the "on" command from the watch it should pull PS_ON low. If the Pi receives the "off" command from the watch, it should release PS_ON. It should also be controlled manually at the Pi with a normally open pushbutton. I know that I need to hook the base of the NPN transistor to the GPIO and the collector to the PS_ON wire. How do I do this? The smartwatch in this situation is the Apple Watch 3.
I need something like this:
when command [on] received:
GPIO port high
when command [off] received:
GPIO port low
when button pressed:
if GPIO is low:
GPIO port high
else:
GPIO port low
wait until button released

My hardware setup:
schematic