Increased numbers of installed IoT devices and more complex building management algorithms make vital a secure, reliable, and cloud-based IoT platform, offering provisions for devices to communicate and react to predefined situations. This platform facilitates data acquisition, management, and interactions among IoT devices in order to exchange information including measurement data and control signals with controllers via a two-way communication mechanism. In this paper, an IoT platform to implement a device-supply management algorithm in a smart building, aiming to supply higher-priority devices from solar power and to maximize solar-power utilization, has been designed and implemented. Message Queue Telemetry Transport (MQTT), which is the state-of-the-art Internet of Things (IoT) protocol, has been adopted in this work to incorporate communications between the devices and the controller. MQTT publisher and subscriber are deployed in the Python programming language. A cloud-based data aggregation platform has been used with an interface to MATLAB, in which the device management algorithm runs. From the results, it could be observed that the IoT platform successfully achieves the goals of the designed device-supply management algorithm.