The heat generated when chemical, transport, or mechanical work is done by the organism is lost to the environment.
The the matter from one organism to the other is transferred via energy. The producer's produce and consumer's consume this energy according to 10% law. Most of the energy is lost (90% ) to the environment in form of heat.
Carbon dioxide can be collected over water. Carbon dioxide is slightly soluble in water and denser than air, so another way to collect it is in a dry, upright gas jar.