Basically, the workflow consists of four parts:
1) Install the Fabman Bridge
We connect the Form 2 to a Fabman Bridge and activate the busy/idle detection based on power consumption (threshold 0.6%). Furthermore, we configure the machine to automatically switch off after 10 minutes when it is idle and we prevent power-off while it is busy.
2) Download printer log
In regular time intervals (usually before we create invoices for our members) we download the printer log file from the Formlabs Dashboard.
3) Parse log file and link print jobs to Fabman activity log
This PHP code parses the downloaded log file and determines the corresponding activity log entry in Fabman. The printjob details from the log file are written to the metadata field of the activity log.
4) Create charges
When the metadata field is updated (see step 3 above) a webhook is triggered. This webhook runs this PHP script, which creates a charge based on the prinjob details in the metadate field.
I hope this article can help you to simplify managing you Formlabs printer. You may use the code at you own risk! It is not very well tested yet. Any feedback ist welcome.