by Colin Fein
A flow for Octoprint + Filament Manager to swap between filament rolls by scanning NFC tags.
This is mostly designed for dry boxes and similar, where filament is manually swapped frequently.
All data is stored in an SQLite database in Documents, which can be deleted if you need to.
1. Install the Filament Manager Octoprint plugin
2. Add your filament rolls in Filament Manager
3. Stick NFC tags to your filament containers. Each one will later be associated with a specific roll of filament, and will change the active filament selection in Octoprint when scanned.
4. Create homescreen shortcuts in Automate for the "Change Roll" and "Setup Tags" flows
5. Start the flow
6. Enter your Octoprint URL when prompted, including protocol and port (ex: http://octoprint.local:5000)
7. Enter your Octoprint API key when prompted, (or if you have the Barcode Scanner app installed you can choose to scan the api key QR code instead)
8. Set up / write to the NFC tags you want to use when prompted. You can use the "Setup Tags" shortcuts created above to add more of these in the future if you wish. Press cancel when done.
Once a tag has been written, the next time it's scanned you'll be prompted to select a roll of filament to associate with the tag.
After associating an NFC tag with a roll of filament, scanning it's tag will change the selected roll in Octoprint.
When you're done with this roll, use the "Change Roll" shortcut you created above to select a new roll of filament for this tag.
* 2019-12-07: better status display when changing filament roll associations, clean up soaghetti