I worked on this a bit and the following Node-Red flow is allowing me to control my Octoprint Enclosure GPIO from within HA and has a 15 second sync to HA if things are changed via Octoprint.
I am more than open to suggestions on how to do cleaner job on this if anyone has any pointers. Otherwise, I thought someone else might benefit from my effort.
[{"id":"b9cb942f.daadd8","type":"tab","label":"Clipboard","disabled":false,"info":""},{"id":"3ed38ed.97a43f2","type":"http request","z":"b9cb942f.daadd8","name":"Printer on","method":"GET","ret":"txt","paytoqs":false,"url":"http://xxx.xxx.x.xxx/plugin/enclosure/setIO?status=true&index_id=3&apikey=XXXXXXXXXX","tls":"","proxy":"","authType":"","x":520,"y":60,"wires":[[]]},{"id":"6b450123.249df","type":"http request","z":"b9cb942f.daadd8","name":"Printer off","method":"GET","ret":"txt","paytoqs":false,"url":"http://xxx.xxx.x.x/plugin/enclosure/setIO?status=false&index_id=3&apikey=xxxxxxxxx","tls":"","proxy":"","authType":"","x":520,"y":100,"wires":[[]]},{"id":"3c2832d6.4691fe","type":"comment","z":"b9cb942f.daadd8","name":"3D Printer Enclosure Plugin","info":"","x":160,"y":42,"wires":[]},{"id":"f098717b.607a8","type":"switch","z":"b9cb942f.daadd8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"str"},{"t":"eq","v":"false","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":370,"y":82,"wires":[["3ed38ed.97a43f2"],["6b450123.249df"]]},{"id":"921cf66.1815208","type":"change","z":"b9cb942f.daadd8","name":"change","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"true","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"false","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":240,"y":82,"wires":[["f098717b.607a8"]]},{"id":"592024ca.bbee6c","type":"server-state-changed","z":"b9cb942f.daadd8","name":"Printer","server":"d9f08b8a.14825","version":1,"entityidfilter":"input_boolean.printer_power","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":90,"y":82,"wires":[["921cf66.1815208"]]},{"id":"2ae7b438.a6729c","type":"server-state-changed","z":"b9cb942f.daadd8","name":"Lights","server":"d9f08b8a.14825","version":1,"entityidfilter":"input_boolean.printer_lights","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":90,"y":162,"wires":[["f92aaa00.36dd1"]]},{"id":"f92aaa00.36dd1","type":"change","z":"b9cb942f.daadd8","name":"change","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"true","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"false","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":240,"y":162,"wires":[["d9f7aa83.1c3d6"]]},{"id":"d9f7aa83.1c3d6","type":"switch","z":"b9cb942f.daadd8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"str"},{"t":"eq","v":"false","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":370,"y":162,"wires":[["e14fd881.edd74"],["c943f381.a52728"]]},{"id":"e14fd881.edd74","type":"http request","z":"b9cb942f.daadd8","name":"Lights on","method":"GET","ret":"txt","paytoqs":false,"url":"http://xxx.xxx.xxx.xxx/plugin/enclosure/setIO?status=true&index_id=4&apikey=xxxxxxxx","tls":"","proxy":"","authType":"","x":520,"y":140,"wires":[[]]},{"id":"c943f381.a52728","type":"http request","z":"b9cb942f.daadd8","name":"Lights off","method":"GET","ret":"txt","paytoqs":false,"url":"http://xxx.xxx.xxx.xxx/plugin/enclosure/setIO?status=false&index_id=4&apikey=xxxxxx","tls":"","proxy":"","authType":"","x":520,"y":180,"wires":[[]]},{"id":"17130f0a.7c3029","type":"server-state-changed","z":"b9cb942f.daadd8","name":"Dryer","server":"d9f08b8a.14825","version":1,"entityidfilter":"input_boolean.printer_dryer","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":90,"y":242,"wires":[["e07e503e.a6edd8"]]},{"id":"e07e503e.a6edd8","type":"change","z":"b9cb942f.daadd8","name":"change","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"true","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"false","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":240,"y":242,"wires":[["4ab0956.67b66ec"]]},{"id":"4ab0956.67b66ec","type":"switch","z":"b9cb942f.daadd8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"str"},{"t":"eq","v":"false","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":370,"y":242,"wires":[["6f2fc6a.42960b8"],["4b89c7fa.f8554"]]},{"id":"6f2fc6a.42960b8","type":"http request","z":"b9cb942f.daadd8","name":"Dryer on","method":"GET","ret":"txt","paytoqs":false,"url":"http://xxx.xxx.x.x/plugin/enclosure/setIO?status=true&index_id=5&apikey=xxxxx","tls":"","proxy":"","authType":"","x":520,"y":220,"wires":[[]]},{"id":"4b89c7fa.f8554","type":"http request","z":"b9cb942f.daadd8","name":"Dryer off","method":"GET","ret":"txt","paytoqs":false,"url":"http://xxx.xxx.x.x/plugin/enclosure/setIO?status=false&index_id=5&apikey=xxxxxxxxxx","tls":"","proxy":"","authType":"","x":520,"y":260,"wires":[[]]},{"id":"b7a13c7f.4bbb08","type":"server-state-changed","z":"b9cb942f.daadd8","name":"Relay","server":"d9f08b8a.14825","version":1,"entityidfilter":"input_boolean.printer_relay","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":90,"y":322,"wires":[["68271197.8b44a"]]},{"id":"68271197.8b44a","type":"change","z":"b9cb942f.daadd8","name":"change","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"true","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"false","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":240,"y":322,"wires":[["b49fa1b2.86538"]]},{"id":"b49fa1b2.86538","type":"switch","z":"b9cb942f.daadd8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"str"},{"t":"eq","v":"false","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":370,"y":322,"wires":[["fa41a7dd.3f907"],["cf0c88f7.8f6e4"]]},{"id":"fa41a7dd.3f907","type":"http request","z":"b9cb942f.daadd8","name":"Relay on","method":"GET","ret":"txt","paytoqs":false,"url":"http://xxx.xxx.x.x/plugin/enclosure/setIO?status=true&index_id=6&apikey=xxxxxxxxx","tls":"","proxy":"","authType":"","x":520,"y":300,"wires":[[]]},{"id":"cf0c88f7.8f6e4","type":"http request","z":"b9cb942f.daadd8","name":"Relay off","method":"GET","ret":"txt","paytoqs":false,"url":"http://xxx.xxx.x.x/plugin/enclosure/setIO?status=false&index_id=6&apikey=xxxxxxx","tls":"","proxy":"","authType":"","x":520,"y":340,"wires":[[]]},{"id":"4da1e770.ad372","type":"http request","z":"b9cb942f.daadd8","name":"Status","method":"GET","ret":"txt","paytoqs":false,"url":"http://xxx.xxx.x.x/plugin/enclosure/getOutputStatus?apikey=xxxxxxxxx","tls":"","proxy":"","authType":"","x":90,"y":422,"wires":[["2e452f3.3bcac5"]]},{"id":"2810067a.dff8ca","type":"inject","z":"b9cb942f.daadd8","name":"","topic":"","payload":"","payloadType":"date","repeat":"15","crontab":"","once":true,"onceDelay":0.1,"x":130,"y":462,"wires":[["4da1e770.ad372"]]},{"id":"2e452f3.3bcac5","type":"json","z":"b9cb942f.daadd8","name":"","property":"payload","action":"","pretty":false,"x":210,"y":422,"wires":[["48e9bc18.3de974"]]},{"id":"48e9bc18.3de974","type":"split","z":"b9cb942f.daadd8","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":330,"y":422,"wires":[["7f40ecaa.dc51a4"]]},{"id":"bd6ae33b.c97a2","type":"switch","z":"b9cb942f.daadd8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"Relay3","vt":"str"},{"t":"cont","v":"Relay4","vt":"str"},{"t":"cont","v":"Relay5","vt":"str"},{"t":"cont","v":"Relay6","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":570,"y":422,"wires":[["b5e5c6ca.1ae4d8"],["17ab4214.6cae6e"],["60a41a03.06668c"],["38089129.333fee"]]},{"id":"7f40ecaa.dc51a4","type":"function","z":"b9cb942f.daadd8","name":"on/off","func":"index = msg.payload.index_id;\nstatus = msg.payload.status;\nstrStatus = (status) ? \"on\" : \"off\" ;\nout = \"Relay\" + index + \" \" + strStatus; \n\nreturn {payload:out};","outputs":1,"noerr":0,"x":450,"y":422,"wires":[["bd6ae33b.c97a2"]]},{"id":"60a41a03.06668c","type":"string","z":"b9cb942f.daadd8","name":"on/off","methods":[{"name":"getRightMost","params":[{"type":"str","value":" "}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":720,"y":439,"wires":[["152ef32c.a029ed"]]},{"id":"17ab4214.6cae6e","type":"string","z":"b9cb942f.daadd8","name":"on/off","methods":[{"name":"getRightMost","params":[{"type":"str","value":" "}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":720,"y":396,"wires":[["f43f8312.6b8ec8"]]},{"id":"b5e5c6ca.1ae4d8","type":"string","z":"b9cb942f.daadd8","name":"on/off","methods":[{"name":"getRightMost","params":[{"type":"str","value":" "}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":720,"y":349,"wires":[["229b4285.84b9c6"]]},{"id":"38089129.333fee","type":"string","z":"b9cb942f.daadd8","name":"on/off","methods":[{"name":"getRightMost","params":[{"type":"str","value":" "}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":720,"y":484,"wires":[["ed2d504b.a7804"]]},{"id":"d89b6185.72aae","type":"api-call-service","z":"b9cb942f.daadd8","name":"HA Update","server":"898abdc9.03ddd8","version":1,"service_domain":"homeassistant","service":"turn_{{payload}}","entityId":"input_boolean.printer_power","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":961,"y":349,"wires":[[]]},{"id":"747a68f5.2738a","type":"api-call-service","z":"b9cb942f.daadd8","name":"HA Update","server":"898abdc9.03ddd8","version":1,"service_domain":"homeassistant","service":"turn_{{payload}}","entityId":"input_boolean.printer_lights","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":961,"y":396,"wires":[[]]},{"id":"5f6a8c63.baa0bc","type":"api-call-service","z":"b9cb942f.daadd8","name":"HA Update","server":"898abdc9.03ddd8","version":1,"service_domain":"homeassistant","service":"turn_{{payload}}","entityId":"input_boolean.printer_dryer","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":961,"y":441,"wires":[[]]},{"id":"6fb00f4c.007338","type":"api-call-service","z":"b9cb942f.daadd8","name":"HA Update","server":"898abdc9.03ddd8","version":1,"service_domain":"homeassistant","service":"turn_{{payload}}","entityId":"input_boolean.printer_relay","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":961,"y":486,"wires":[[]]},{"id":"229b4285.84b9c6","type":"rbe","z":"b9cb942f.daadd8","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":830,"y":349,"wires":[["d89b6185.72aae"]]},{"id":"f43f8312.6b8ec8","type":"rbe","z":"b9cb942f.daadd8","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":830,"y":396,"wires":[["747a68f5.2738a"]]},{"id":"152ef32c.a029ed","type":"rbe","z":"b9cb942f.daadd8","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":830,"y":440,"wires":[["5f6a8c63.baa0bc"]]},{"id":"ed2d504b.a7804","type":"rbe","z":"b9cb942f.daadd8","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":830,"y":484,"wires":[["6fb00f4c.007338"]]},{"id":"d9f08b8a.14825","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true},{"id":"898abdc9.03ddd8","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]