I’ve searched this forum and others (Blynk, Hackster, etc.) for the last couple of hours trying to determine if I can reasonably expect to use an Electron with Blynk to monitor just temperature & humidity (with a RHT03 or similar) without going well over the 1MB monthly data allowance. I would suspect the answer would be “yes” if I only want data once per month or week but I’d like to get the data every 5 to 15 minutes. I’ve got Photons all over the place monitoring temps around my house but I’d like to monitor my RV while traveling.
If the answer is that it’s not practical to get the data frequently then I’ll look at uploading to a cloud or only notifying me if the temperatures exceed some extremes (say, 32F and 110F.)
I don’t think Blynk is the right thing for that (but I only use Blynk for permanently online controlling and not for data storage).
I’m doing a similar thing with an Electron using Ubidots to get 2 temps, 1 humidity, 1 dewpoint, and the battery SoC every 15 minutes and I always stay well below 1MB.
I’m also using Ubidots to log Battery voltage and SOC with an Electron every 2 mins and I go over the 1MB per month by a little. Update every 5 mins and you should be good to go.
I’m sending data to Ubidots directly and not pushing it through via Particle Publish which helps keep the data rate down and it’s quicker it seems.
Thanks, @ScruffR and @RWB. It looks like Ubidots is the direction I need to take. I might be back for a little coaching as I work through everything. I like the idea of the battery voltage, too. Ideally I would measure the battery, temps inside and outside (near a critical component) and maybe even the fridge. There are lots of possibilities if I can keep the data usage low enough. I’ll start simple. Thanks again.
Thanks, @Postler. I’m good-to-go with the Photon and Blynk app but I’m concerned it’ll use too much data with an Electron. I appreciate the advice, though.
@ScruffR - Any chance you’d be willing to share the code for the project you mentioned? I’ve been trying to work through everything and find some example codes that I can work from but I’m getting completely bogged down in the details (sleep, handshakes, UDP v TCP, webhooks, etc.) I was okay learning on the Photon by trial-and-error but I’ll blow through many MBs if I do that with the Electron. Thanks.
You da man, @ScruffR. Much, much appreciated. Right after I posted this I had a decent breakthrough with ubidots but I’m still lost in many areas. This is bound to help. Take care.
Would it be possible to cause my Electron/dht22 rig to report temperature every 15 minutes but then every 5 seconds after the temperature reaches say 77f ?
So when temperature reaches a critical number I get near real time updates…
I’m actually working on this issue right now but in reverse order. What I’m trying to do is only upload sensor data when it’s changed significantly so I’m not wasting data by uploading data that doesn’t tell me anything new. I’ve got everything else working in the program, or so it seems, but now I’m trying to economize on data and power demands. I’ll post what I have later if I can get it to work. Or I’ll post what I have to see if someone can help me over this stumbling block. I’m not ready to give in yet. I wasted over 4 hours yesterday and today trying to track down an issue that turned out to be a bad jumper wire. I’ve noticed you can’t be just pretty close in either the programming or wiring, haha.
Okay, I guess I need a little coaching. What follows is a snippet of my code. I’ll be glad to include the entire code but this is the part with which I’m currently having troubles. I’m testing this on a Photon right now and will migrate it to an Electron later.
My intention is to print (in the future I will upload to ubidots) a sensor value once, then check periodically to see if the sensor value has changed significantly (say, 2 degrees F.) If there is no significant change I won’t upload.
I’ve tried this thing a hundred (okay, maybe 30) different ways. The way it’s written below I only get returns. I keep changing what I’m printing and I can see the temperature each time or see the difference each time but I can’t get it to give me one temp, then stop printing the temp until it changes.
Lets assume you declared tempF as an integer somewhere outside the snippet and initialised it. Serial.print wants to output a string but you have handed it an integer. You need to convert that integer into a string any one of many ways
Serial.print(String(tempF));
or using printf, at this point I would recomend pulling up some online documentation on handling strings, printf and similar are powerful tools that let you format numbers, charachters etc exactly as you want them to print, this includes spacing, numbers after the decimal point, as HEX values ....
@Viscacha, @Silverminer This is not correct. You can pass a number (int, float, etc.) to Serial.print(). You can even specify the number of decimal places, you want to see using a second parameter
float temp = 72.67
Serial.println(temp,1); // prints 72.7