Practical Internet of Things with JavaScript
上QQ阅读APP看书,第一时间看更新

App to the smart device

The following diagram shows how the data flows from an app to the smart device:

As we can see from the previous diagram, if the app wishes to send an instruction to the smart device, it sends that message to the API engine. The API engine then persists that data into the database and publishes the same to the MQTTS broker, to be passed on to the device. The device then reacts to that data on the actuator.

Do note that in both the flows, the MQTTS broker manages the devices and the API engine manages the apps.