Remote shutdown and start one HA from another HA

is there a way to remote shutdown the host of a PI4 running HA from another Pi running HA.

i know i can do the gnd/gpio3 trick to turn it on again which i can do with a relay on the main HA but is there a way to shutdown the other HA from the main unit.

user case is i have 2 PI’s one as a test bed and the other as the main server. i want to be able to stop and start the test server from within the main server if that makes sense so this is not on all the time and causing any conflicts or just wasting electric.

you can short out gpio3 so i can simple put a relay across those pins on the test unit and then get the main unit to flick the relay quickly on the main server to accomplish this, unless any one has a better idea?

One briefly approach could be

  • habe a wlan / zigbee / zwave plug in the power connection of the test server
  • Create a ssh user with a ssh key supplied to the user on test sysem
  • Create a script on the main server that sends a shutdown / poweroff via the ssh connection
  • Wait inside the script a minute ore two, power off the plug of the test server by script commands

To restart just power on the plug via script