Feature request: support unloading labware in the HTTP API

It’d be great if the HTTP API supported removing labware, analogous to the loadLabware command.

I’d open a PR for this by using loadLabware as a base (with just one parameter: labware name), but I find 1152 mentions of LoadLabware in 237 files in the opentrons repo. What is the best approach for this?

In the meantime, I decided to call moveLabware with "newLocation": "offDeck". Hacky, but equivalent for my purposes. (add move labware · rickwierenga/opentrons-python-api@c23f862 · GitHub)

1 Like

I guess that’s an official way to offload labware

Does using

del protocol.deck[“7”]

not work? That’s what I’ve always done in my protocols before. Maybe that doesn’t work with HTTP

EDIT: My bad, I see that this is the top comment in the thread you linked and is probably not what you’re looking for, ignore me :laughing:

The thread linked is official OT code. PLR code is separate.

Indexing into the OT deck with [] (or del deck[x]) does not work in PLR yet for the Opentrons deck, but that’s actually a very natural way to do this! Carrier is very similar. Do you want to PR this?

You can unassign resources using the standard resource.unassign(). This works now (see commit linked above). This is done using the HTTP/PLR via this move-off-deck-hack.