I have now found what I think is the ultimate answer to the question I posed here, so am posting it for the benefit of anyone else who may come along with a similar issue.

 

To recap, I want to be able to switch my htpc and all other related devices on and off at a single connection point on the wall. But simply cutting power to the pc causes unclean shutdowns and eventually problems booting up. It is unhandy and impractical to shut the pc down separately every evening, so the question is how to do this automatically.

 

I asked if there was a gadget that could somehow do this, and amazingly, there is. In fact, there are several, and thanks to the generosity of @Hammerer, I now have them.

 

The items are ClimateSmart stand-by eliminators and a Tricklestar device. The Tricklestar is particularly clever. It plugs into the mains power and has master and slave power point circuits. A sensor detects if the current draw on the master circuit drops substantially, indicating that the device on that circuit has been shut off or put into standby mode. This causes all power to the slave circuit to be cut. When the master circuit draws power again, the slave circuit also comes on.

 

I spent a day playing around with different configurations, but the best one was to plug the pc into the master socket and everything else into the slave. I programmed a pc shutdown command into the Harmony remote on a virtual button one level removed to protect against accidental shutdown. When this button is touched the pc enters shutdown mode and shuts down cleanly. This takes 15 or 20 seconds.

 

As soon as the pc finishes shutting down, its power consumption drops and power is immediately cut to all the other devices on the slave circuit. This is a very elegant solution.

 

However, it is not quite complete. The pc still has standby power and the only way I have found to get it to automatically come on again is to cut the power completely. A setting in the BIOS makes this possible. The only other possibilities are Wake on LAN or via the USB, but these are not good solutions for various reasons.

 

By adding a ClimateSmart device to the pc power circuit, I can remotely switch the power on and off. So now the nightly shut down procedure is to press the virtual button on the Harmony, followed by cutting the power on the ClimateSmart. This is not onerous. The time between the two actions is only a few seconds and it can easily be filled by switching off lights or other actions, or just waiting a short while. In the morning the only action required is to press the ClimateSmart remote button to switch the power back on. This causes the computer to boot up automatically, which turns on everything else.

 

A perfect solution would be to integrate the ClimateSmart remote with the Harmony so it would all work from one button press, but unfortunately that is not practical. The ClimateSmart is an RF device, while the Harmony uses IR. But the existing setup is pretty good. Thanks again to everyone for thinking with me on this and thanks especially to Hammerer who gave me the solution.