is there some stop block for after process which on/off when button on/off?
I’ve used node-red-contrib-simple-gate along with the event:state node to enable/disable messages based on the state of a toggle helper. To set the initial state of the gate, use an inject node once at startup to send a message to the device query node and use that result to set the initial state of the gate.