This document proposes a dynamic resource allocation algorithm for opportunistic software-defined IoT networks using a stochastic optimization framework. It formulates the problem as a two-stage binary linear stochastic program that aims to maximize network throughput while selecting transmission powers to minimize total power consumption under uncertain interference and traffic demands. Due to interference being a continuous random variable correlated over time, the algorithm instead solves a suboptimal sampling problem exploiting interference correlation. It periodically runs over time to adapt to changing channel and interference conditions, significantly increasing simultaneous IoT transmissions and achieved throughput compared to typical algorithms.