Hello stack community.
I'm trying to send a simple message from a device to the Iot Hub, and then store this message on Blob.
To do so:
- on the IoT Hub, i created a Router with the following property: level='storage';
- on the IoT Hub, i created an endpoint;
Everything works fine, except i get this warning when i inspect the Blob through the Azure platform showing me some bad characters:
The file 'xxxxxxxxxxx' may not render correctly as it contains an unrecognized extension.
The snippet to send the message from the device to the IoT Hub is the following:
var temperature = 20 + (Math.random() * 15);
var humidity = 60 + (Math.random() * 20);
var data = JSON.stringify({ deviceId: 'myFirstNodeDevice', temperature: temperature, humidity: humidity });
var message = new Message(data);
message.properties.add('level','storage');
console.log("Sending message: " + message.getData());
client.sendEvent(message, printResultFor('send'));
I can't figure out what's the real problem. Thank you in advance!