3D Printer Progress Bar - WLED

This NodeRED flow integrates with Bambu Lab (though it's easily adaptable to OctoPrint) to transform a WLED light into a progress indicator for your 3D printer. Here's how it works:

  1. Initialization: When the printer begins a print job, activate a preset on the WLED light using the 'Percent' effect. Also, turn the light on.

  2. Monitoring Loop:

    • Retrieve the current print progress as a percentage.
    • Adjust the WLED light intensity to match this percentage.
    • Pause for 15 seconds.
    • Confirm the printer is still active. If yes, loop back; otherwise, proceed to the next step.
  3. Completion: When the print job finishes, switch to a preset named 'Success', made with the 'Chase' effect (or any effect of your choice). Then wait for 15s, and turn off the light.

[{"id":"618ddcebb311b185","type":"trigger-state","z":"9232ac1fd56870df","name":"status: running","server":"734558bc.cd8f48","version":3,"inputs":0,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.x1_carbon_print_status","entityIdType":"exact","debugEnabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"running"}],"customOutputs":[],"outputInitially":false,"enableInput":false,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":120,"y":80,"wires":[["8a186f90097b4167"],[]]},{"id":"8a186f90097b4167","type":"api-call-service","z":"9232ac1fd56870df","name":"percent preset","server":"734558bc.cd8f48","version":5,"debugenabled":false,"domain":"select","service":"select_option","areaId":[],"deviceId":[],"entityId":["select.cl_basement_02_preset"],"data":"{\"option\":\"Percent\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":320,"y":80,"wires":[["0f97a352a2fa01ed"]]},{"id":"1d5f914d6132ee91","type":"inject","z":"9232ac1fd56870df","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":40,"wires":[["8a186f90097b4167"]]},{"id":"0f97a352a2fa01ed","type":"api-call-service","z":"9232ac1fd56870df","name":"turn on light","server":"734558bc.cd8f48","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.cl_basement_02"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":510,"y":80,"wires":[["9dfdc442caf36e24"]]},{"id":"170cf4d5ed60ea52","type":"comment","z":"9232ac1fd56870df","name":"start automation","info":"","x":320,"y":40,"wires":[]},{"id":"0e388dd323463140","type":"comment","z":"9232ac1fd56870df","name":"job percentage loop","info":"","x":330,"y":140,"wires":[]},{"id":"9dfdc442caf36e24","type":"api-current-state","z":"9232ac1fd56870df","name":"job %","server":"734558bc.cd8f48","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.x1_carbon_print_progress","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":290,"y":180,"wires":[["9a7c739adb23c23a"]]},{"id":"9a7c739adb23c23a","type":"api-call-service","z":"9232ac1fd56870df","name":"set intensity","server":"734558bc.cd8f48","version":5,"debugenabled":false,"domain":"number","service":"set_value","areaId":[],"deviceId":[],"entityId":["number.cl_basement_02_intensity"],"data":"{\"value\": msg.payload}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":470,"y":180,"wires":[["91458d0d8908965e"]]},{"id":"91458d0d8908965e","type":"delay","z":"9232ac1fd56870df","name":"","pauseType":"delay","timeout":"15","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":300,"y":240,"wires":[["86fcdbb52576d72b"]]},{"id":"86fcdbb52576d72b","type":"api-current-state","z":"9232ac1fd56870df","name":"still printing","server":"734558bc.cd8f48","version":3,"outputs":2,"halt_if":"running","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.x1_carbon_print_status","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":470,"y":240,"wires":[["9dfdc442caf36e24"],["4d9f99b9a16c41ce"]]},{"id":"f06167c6e9b4a3ec","type":"comment","z":"9232ac1fd56870df","name":"print complete!","info":"","x":320,"y":300,"wires":[]},{"id":"4d9f99b9a16c41ce","type":"api-call-service","z":"9232ac1fd56870df","name":"success preset","server":"734558bc.cd8f48","version":5,"debugenabled":false,"domain":"select","service":"select_option","areaId":[],"deviceId":[],"entityId":["select.cl_basement_02_preset"],"data":"{\"option\":\"Success\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":320,"y":340,"wires":[["2c8d47184095ef80"]]},{"id":"2c8d47184095ef80","type":"delay","z":"9232ac1fd56870df","name":"","pauseType":"delay","timeout":"15","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":480,"y":340,"wires":[["1ed08290c7d58fd5"]]},{"id":"1ed08290c7d58fd5","type":"api-call-service","z":"9232ac1fd56870df","name":"turn off light","server":"734558bc.cd8f48","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.cl_basement_02"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":340,"wires":[[]]},{"id":"734558bc.cd8f48","type":"server","name":"Home Assistant","addon":true}]

Collection Info

Flow Info

Created 1 year, 8 months ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • comment (x3)
  • delay (x2)
  • inject (x1)
Other

Tags

  • 3d-printing
  • wled
  • progress-bar
  • bambu-lab
  • octoprint
  • homeassistant
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option