Unexpected lockup of Photon with SparkFun PowerShield

Not sure but in my other post Solar Powered Spark Core - #43 by epierre before finding your, that was evoked.

I've not been as far as you, but if you compare two boards, one arduino and one Photon with same battery and same solar panel, the Photons loses energy while the arduino no or even saves some:

That is why I'm also interrested in your script as you go a step further yet than me.