Hi all,
I am trying to create a safe shutdown sequence for my Octoprint running on a seperate Pi3b.
I am using Node-Red inside home assistant and I have an entity called "button.octoprint_shutdown_system" with a resting status of unknown.
What I would like to happen is on a button press to shutdown Octoprint wait one minute and then turn off the smart switch.
I just cant figureout the first part so any help would be appreciated.
Thanks!
EDIT: flow below:
[{"id":"7375360fe34b709d","type":"stoptimer","z":"ee46ed1da81de40d","duration":"30","units":"Second","payloadtype":"num","payloadval":"0","name":"shut down delay timer","x":600,"y":220,"wires":[["8af7efb5cf340ff9"],[]]},{"id":"8af7efb5cf340ff9","type":"api-call-service","z":"ee46ed1da81de40d","name":"Printer Power Off","server":"ad021f45.a359d","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.tuya_emswitch_1_shark_3dp_unassigned"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":870,"y":200,"wires":[[]]},{"id":"943def59d1f310a1","type":"server-state-changed","z":"ee46ed1da81de40d","name":"Printer Power","server":"ad021f45.a359d","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_button.3d_printer","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":110,"y":220,"wires":[[],["bb8be3b366bd40dd"]]},{"id":"bb8be3b366bd40dd","type":"api-call-service","z":"ee46ed1da81de40d","name":"Printer Power Off","server":"ad021f45.a359d","version":5,"debugenabled":false,"domain":"script","service":"toggle","areaId":[],"deviceId":[],"entityId":["button.octoprint_shutdown_system"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":350,"y":220,"wires":[["7375360fe34b709d"]]},{"id":"ad021f45.a359d","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]