We found that constrained shape memory natural rubber (SMNR) generates mechanical stress when exposed to solvent vapor. When the solvent vapor is removed, the material reprograms itself. This process is reversible and the stress answer is proportional to the solvent vapor concentration. Further, the stress answer is specific to the solvent.