unable to send buffered message

Hi all,

I am trying to send a buffered message but it keeps on saying failing to send the message although I get an sms message but with empty message. Sending a regular message using HologramCloud.sendMessage(“abc”,def") works. Below is a snippet of my code that is failing:

void loop()
{
float pct = FuelGauge.percentage();
float volts = Charger.batteryMillivolts()/1000;

// this commented line works
//HologramCloud.sendMessage(“hello”, “battery_pct”);

HologramCloud.print(“Battery Life:”);
HologramCloud.print(pct);
HologramCloud.print("%, ");
HologramCloud.print(volts);
HologramCloud.println(“v”);
HologramCloud.attachTopic(“Battery life”);

//Attempt to send the buffered message
if(!HologramCloud.sendMessage()) {
Serial.println(“Failed to send message”);

}

}
It always prints “Failed to send message” if I use buffered message. It works if I send un-buffered message like the commented line above. Any pointers or help is appreciated.

As an update, looks like even the commented line HologramCloud.sendMessage(“hello”, “battery_pct”) it does not work all the time. I tried it again and I am getting same behavior so it worked only once but after that I am getting same behavior as buffered messages.

I get sms messages on my phone but they are empty except of the number 6 as the sms message.

Thanks,
Firas

Hi Firas, thanks for reaching out!

I went ahead and tried your code and what I noticed is there’s a space between “Battery life” in your HologramCloud.attachTopic(“Battery life”); line. You could for example try “Battery_life” and that should have your buffered message show up in the dashboard.

Let me know if that works.

Best,
Derrick

Hi Derrick,

Thanks for your response. I figured it it a couple of days ago since I noticed that tag name was truncated to “Battery” or “Distance” so I tried removing spaces and any special characters and it worked.

Thanks and regards,
Firas