To enable the use of the trigger pin with toggle and momentary switches, it would be good to either:
a) Record trigger pin state at startup of the script, then look for a change of state that lasts for the trigger time. (hi>lo or lo>hi) depending on a stable startup state.
b) allow more flexibility to make a high/low/change the trigger for shutdown (although this amounts to "edit the code" right now :)
I prefer A, but with polling rather than edge-change interrupts it's not ideal, but I don't think it's worse than the current state of affairs.
To enable the use of the trigger pin with toggle and momentary switches, it would be good to either:
a) Record trigger pin state at startup of the script, then look for a change of state that lasts for the trigger time. (hi>lo or lo>hi) depending on a stable startup state.
b) allow more flexibility to make a high/low/change the trigger for shutdown (although this amounts to "edit the code" right now :)
I prefer A, but with polling rather than edge-change interrupts it's not ideal, but I don't think it's worse than the current state of affairs.