Direct communication between user and bolt device

i am not able to understand that why we are fetching sensor values via cloud ? can’t we fetch sensor values through the device directly and do the further process . let say taking the example of analogRead function can’t we directly communicate with the device for the values instead of fetching it through cloud?

The device basically forwards the data to the cloud over the internet.since it is connected to the bolt iot cloud, to access it you need to request the data via its api. You manually can read/write to a esp board via LAN/WAN but bolt device doesn’t support that. It is more practical if the bolt device send the data directly to our machine so any further operations can be done but it is complicated than to just send an API request.Bolt iot is providing an platform to manage the communication between your code and the device.