[IoT Home Project] Part 5 - Send data to Azure IoT Hub, control time interval and refac the configuration information
In this post we will discover how we can: Send all device sensor data that are read from GrovePI to Azure IoT Hub Read sensor data at a specific time interval Extract all configuration data in a separate file Previous post: http://vunvulearadu.blogspot.ro/2016/12/iot-home-project-part-4-sending.html GitHub source code: https://github.com/vunvulear/IoTHomeProject/tree/master/nodejs-grovepi-azureiot Send all device sensor data that are read from GrovePI to Azure IoT Hub This is a simple task. The function that reads sensor data from GrovePI already returns all the sensor data. The only thing that we need to do is to put this information in the message that is send to Azure IoT Hub. In the future it is pretty clear that we will have different type of messages that we send over IoT Hub. Because of this we shall add a property to the message that is send to IoT Hub that specifies the message type - in our case we'll call the message that contains sensor data 'senso...