Unreliable core

Hi,

I’ve been having trouble with my spark core, making it quite unreliable.
First problem is that it keeps going online/offline:

device came onlineno dataDecember 31st at 12:23:13 amcore
{"data":"online","ttl":"60","published_at":"2015-12-
device went offlineno dataDecember 31st at 12:22:46 amcore
{"data":"offline","ttl":"60","published_at":"2015-12-30T23:22:46.475Z","coreid":"48ff6c065067555053351387","name":"spark/status"}
device came onlineno dataDecember 31st at 12:21:44 amcore
{"data":"online","ttl":"60","published_at":"2015-12-30T23:21:44.273Z","coreid":"48ff6c065067555053351387","name":"spark/status"}
ifttt-trigger-variable-check{"count":28}December 31st at 12:21:25 amcore
{"data":"{\"count\":28}","ttl":"60","published_at":"2015-12-device went offlineno dataDecember 31st at 12:21:16 amcore
{"data":"offline","ttl":"60","published_at":"2015-12-30T23:21:16.685Z","coreid":"48ff6c065067555053351387","name":"spark/status"}
device came onlineno dataDecember 31st at 12:20:14 amcore
{"data":"online","ttl":"60","published_at":"2015-12-30T23:20:14.496Z","coreid":"48ff6c065067555053351387","name":"spark/status"}
ifttt-trigger-event-check{"count":38}December 31st at 12:20:13 amphoton2
{"data":"{\"count\":38}","ttl":"60","published_at":"2015-12-
device went offlineno dataDecember 31st at 12:19:34 am core

On the device itself, the LED rapidly blinks from time to time, instead of just pulsing.

it seems to reliably push events, however reading variables/calling functions/flashing is a different matter -
I usually get timeouts on the first try, and then 2nd or third succeed. With flashing sometimes I don’t succeed at all, and had to do factory reset to be able to flash it.

C:\svn\ReberHisa\reber>particle get core temp
16.600000381469727

C:\svn\ReberHisa\reber>particle get core temp
Error: Timed out.

I’ve done the cc3000 update, the deep update, trying firmware with different firmware versions, but I haven’t noticed any difference.

The .ino file I am using is here https://gist.github.com/clarity99/aefa1b25651411083785, perhaps there’s an issue there?

I’ve tried with a different power supply as well, the current one is 1A, which should be enough, I hope?
I haven’t tried replacing the wifi router though. The photon that is on the same network doesn’t have these problems though. It’s a 802.11bg network on an old Asus wl-500g router running openwrt.

Any help is much appreciated…