To control the duet via PS-ON is nothing new.
link text
But to do this via a smart home actuator might be a more current option.
While searching for an actuator I came across the Shelly 2.5
I have chosen it because it brings its own web interface to control. And because it's not cloud bound by default.
There is no nead for a smart home server. So it's already a good option out of the box.
The goal was to be able to switch the printer in such a way that it cannot be accidentally switched off in the middle of printing. Also all loads should be switched off.
The result is the following schematic. (Only the relevant area)
The key is to switch the actuator parallel to the PS-ON relay output.
I use an industrial relay with several channels, this has the advantage that one can switch a separated feedback channel once the duet is booted.
Currently I have 3 channels in use. Power supply, feedback and the heating bed (220V).
The following setting must be made in the switching channel of the Shelly.
Set the button type to "Detached Switch".
Set an "Auto Off" timer for that channel.
With this setting the input switch (SW) can be queried separately.
With this wiring and setting the printer only can be switched off by G-Code.
Either out of the DWC or automatic at the end of printing.
Of course, it also works via a hard-wired kill or main switch.
When everything worked I have been thinking about how to make it more comfortable and to get acoustic feedback.
The drama began seting up a homeserver starting to build a node red dashboard....
To cut a long story short it ended with the integration of G-codes, video image and the activation/deactivation logic.
Still work in progress...
Demo Duet Remote.mp4