The following diagram shows the standard IoT solution that you would take for your high-tech vending machines:

Arguably the world's first IoT device was a network-connected altered Coke machine developed by graduate students at Carnegie Mellon University (CMU) in the early 1980s. The students from this school in Pittsburgh, Pennsylvania found their Coke machine was located inconveniently far away. Many times, a trip down to the machine resulted in finding a machine void of Coke, or worse, Cokes that were too warm. The application they developed not only told them if a Coke was available but also whether or not the ...