Successfully tried the code. It is sending data to xively for more than two hours without interruption. Checked the formula with the data sheet and found no error. However I get a temperature of 58°C which should be 21°C.
courtesy of @BDub… It did make it better for me. I still have a bit of work.
My code does crash after an hour or so still… which is really annoying. I even tried to send an average every 5 seconds instead to avoid too much connection but still crashing.
Good work guys!
I have tried it and it seems to work well besides the fact the temp is high however the data freezes after some time (hours). Not sure which part stops working but I either have to cycle the power or re-flash the core to get it going again. I increased the delay if (millis()-LastUpTime>200000) which may have helped. Any ideas?
Thanks!
So has anybody got the Spark Core successfully sending sensor data though the internet to Xively reliably without the need to reset the Spark Core to maintain a consistent data output to Xively for graphing.
Same here, my temp is almost 7 or 8 degrees too high and the upload will stop functioning after a few hours. I was hoping that the latest update from Spark would solve the issue (they said it would) but apparently not… Disappointing.
Our last update included some improvements for restarting the connection when the core went offline, but a lot of work is still happening to improve reliability on certain networks. We should be doing another merge / rollout of improvements next week.
And NOT… it seems that as soon as there is little bit of traffic either on the wifi or on the internet line (which is big at my place), the device just disconnects for some reason…
apassemard - Since I eliminated the delay code back to 1000ms I have been holding a consistent WiFi connection all day even when I took the spark core in and out of range multiple times with sucessful reconnections to the WiFi network.
I’m curious to see if I ran your same code but linked to a Xivley account I set up if I would get the same results as you as far as not being able to maintain a connection to Xivley.
Do you think I could easily use your working code to see if I get the same results? I do know my I’ve been holding a good connection to the cloud for almost 24 hours now.
No, I was just saying that now that I have changed my LED Blink sketch delay to 1000ms I can have been able to hold a connection to the spark cloud for 24 hours now.
I’m loading your code above and setting up a Xivley account so I can see if I get the same results you are getting or if I can hold a stead connection to Xivley since I have been able to hold a stead wifi connection all day.
If I run your code and start getting Wifi Errors then we will know it has something to do with the code and how its affecting the Spark Core.
Ok I was pushing data to Xivley for 2+ hours and then tried to ramp up the data on my internet so downloaded a movie torrent and streamed a youtube video which caused my wifi access point which is my Verizon cell phone to cut the data. Since there was no data and no connection to the Spark Cloud but it was connected to the WiFi network it showed me the flashing Blue LED.
After the Blue Flashing LED started it never tried to reconnect to the Spark Cloud and it never tried to log back onto the WiFi network after I reset the Hot Spot on my Verizon cell phone.
So now I know what this Flashing Cyan Death Sign is all about
Its pretty cool to see the data show up on the web though. It was really easy to setup.
Once they figure out how to fix the re connection issue this should be a pretty stable device.
A quick fix for now would be to simply insert some code that would rest the Spark Core every 5 - 10 - 20 - 30 mins to guarantee that the Spark stays connected to the WiFi Network since it always connects to the wifi network on startup.
if (millis()-LastCloudCheck > 1000*60*5) { //check every 5 min to see if the connection still exists
if(!Spark.connected()) Spark.connect();
LastCloudCheck = millis();
}
it seems to help, I haven’t dropped since last night.
Ok, although I maintained a constant connection to my Wifi and the Spark Colud based on the LED status of the Spark Core it still stopped sending data to Xivley eventually.
The blue LED stopped flashing that shows 3 blinks after a successful data transmission to Xivley.
I had to reset the spark core and then the data sent to Xivley resumed instantly.
I’ll try adding your code also and see if it helps.
Can you provide a copy of your complete sketch? I’m trying to add your code but keep getting errors and I don’t have a lot of time to figure it out. But I will run it and see if we get the same results.