ArduinoMqttClient icon indicating copy to clipboard operation
ArduinoMqttClient copied to clipboard

Changing the "body" to "heartbeat"

Open Dorokun192 opened this issue 6 years ago • 3 comments

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.

Dorokun192 avatar Feb 12 '20 08:02 Dorokun192

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

Rocketct avatar Feb 28 '20 11:02 Rocketct

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

Dorokun192 avatar Mar 01 '20 23:03 Dorokun192

@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

Rocketct avatar Mar 04 '20 13:03 Rocketct