[SOLVED] Photon stops publishing when on Solar Power

I have a Particle Photon which is being powered by the Particle Power Shield. I have a LiPo battery hanging off the Shield, and a small solar panel which will charge the LiPo during the day.

I appear to have an issue where, when the solar panel kicks in to charge the LiPo, the Photon stops publishing metrics to Ubidots. I can still publish to the Particle log online.

My code is below, it’s as simple as it gets:

// This #include statement was automatically added by the Particle IDE.
#include <Ubidots.h>

// This #include statement was automatically added by the Particle IDE.
#include <PowerShield.h>


//Include the token for auth to Ubidots.
#define TOKEN "1BEeWhBIZuRE5rbzsDpo0AC0lxhMky"

Ubidots ubidots(TOKEN);

PowerShield batteryMonitor;

void setup() {
batteryMonitor.begin(); 
batteryMonitor.quickStart();
}

void loop() {


float cellVoltage = batteryMonitor.getVCell();
float stateOfCharge = batteryMonitor.getSoC();

Particle.publish("voltage", String(cellVoltage));
Particle.publish("soc", String(stateOfCharge));

ubidots.add("voltage", cellVoltage);
ubidots.add("soc", stateOfCharge);

ubidots.sendAll();



delay(5000);



}

Any suggestions?

Hello @Wedgie,

We will review the information and get back to you. Thank you!

Best Regards,
Maria C.

Hello @Wedgie, I don’t see any strange on your code, would you please call the debug() method in your routine and to paste the console output messages?

All the best

@jotathebest

Can you elaborate on how I include the debug method into my routine? I’m not familiar with it…

Thanks

Hello, simply add this line

ubidots.setDebug(true); //Uncomment this line for printing debug messages

Regards

Hello, we found an issue when you try to send data using UDP from photon devices, please use the updated library.

Regards

Thanks, yes confirming the new code resolved the issue.