arduino-libraries / ArduinoMqttClient

ArduinoMqttClient Library for Arduino
GNU Lesser General Public License v2.1
187 stars 73 forks source link

Changing the "body" to "heartbeat" #27

Open Dorokun192 opened 4 years ago

Dorokun192 commented 4 years ago

From what I can understand, we send the actual message to our cloud by calling the print function. When looking at the cloud telemetry, it first says "body" then the message itself followed by the "enqueuedTime". Is there a way to change the word "body" to "heartbeat"? Or how can I send a heartbeat to the cloud?

I'm using Arduino MKR WiFi 1010 for this development, with Azure IoT Hub as my broker.

Rocketct commented 4 years ago

Hi @Dorokun192 can you give more details and context? and a sketch to test it? have you followed a tutorial?

Dorokun192 commented 4 years ago

I looked at this link for getting a basic idea and modified it to work for the device I'm using. https://www.hackster.io/Arduino_Genuino/securely-connecting-an-arduino-nb-1500-to-azure-iot-hub-af6470

Rocketct commented 4 years ago

@Dorokun192 as i understand your purpose is to send a field called heartbeat from the board to the cloud correct? have you try simple to declare a field called heartbeat, and unpack from the cloud APIs? from board side this cannot be done