A made thing that does a particular work. Also a stratagem — both are contrivances aimed at an end.
Old French devis, a plan or contrivance, from deviser (to divide, arrange), from Latin dividere (to divide).
A made thing shaped for a particular work, or a stratagem shaped for a particular end. Both senses share the same root: something arranged on purpose to accomplish a specific task.