Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TiltPi not consistently uploading data to BrewFather #12

Open
SmokeyRider opened this issue Mar 2, 2019 · 19 comments
Open

TiltPi not consistently uploading data to BrewFather #12

SmokeyRider opened this issue Mar 2, 2019 · 19 comments

Comments

@SmokeyRider
Copy link

I'm seeing missing data points on my BrewFather log.

I noticed an issue uploading to Google Sheets but that seems to be related to overloading a single Google Cloud URL. I would assume that this is not the case for uploading to BrewFather since they have separate URLs (e.g. http://log.brewfather.net/tilt?id=xxxxxxx)

@noahbaron
Copy link
Collaborator

Thanks for your comment. I was able to improve efficiency of the Google Cloud URL and that should be fixed now. I know that brewfather doesn't allow posting more than every 15 minutes, could this be the issue? Also can you confirm that WiFi connection is good for your situation?

@gifty74
Copy link

gifty74 commented Mar 10, 2019

So Noah, I assume it’s still best to create a custom Google Sheets URL and you are saying that we should not have as many missing data points now? I do use a custom url, but was still missing some data points throughout a brew session. Sometimes up to 3 in a row.

@noahbaron
Copy link
Collaborator

The custom Google Sheets URL (option 2) is more difficult to setup so at this point, with this latest fix/performance improvement, I recommend using the default. That said, option 2 is still really good and I have updated the template with the same code. I also have the code on github since it runs independent of the Tilt Pi. Google provides a dashboard to the script health (in the script editor go to menu View->Stackdriver Error Reporting) and the errors appear have stopped completely. Previously I was seeing thousands of errors/missed data points. It appears to be running faster too on my test Tilt Pi.

If data points are still being missed, it's most likely due to the WiFi connection. The next Tilt Pi update I'll look at stopping the Bluetooth scanning temporarily while logging to the cloud. Bluetooth and WiFi share the same antenna and have seen performance issues when both are highly active. I will also have the Tilt Pi attempt to log again if a success message wasn't received.

@gifty74
Copy link

gifty74 commented Jul 1, 2019

Hey Noah, still having issues getting consistent uploads to my google sheet. Using the custom URL option (after making a copy of your sheet, registering it as an app with sheets, etc). Any ideas? It looks like you last thought this was fixed. I'm also stumped as to why more people aren't having the same issues as me. No problem with proximity of the Tilt, it has a good strong connection to it, and within 10 feet of my wifi router.

@noahbaron
Copy link
Collaborator

noahbaron commented Jul 1, 2019 via email

@gifty74
Copy link

gifty74 commented Jul 1, 2019

No errors I can find. The internal log on the Pi is rock solid, never missing a data point. Logging to the cloud though is where it's hit or miss. Link here: https://docs.google.com/spreadsheets/d/1QroR1jTh_i5Hyzei5d_S0oeWjnvkLIjf9gV9Ti2Ldgg/edit#gid=734290882

Maybe i'm doing something wrong in the publishing of the google sheet app? I'm following the instructions as far as I can tell.

@noahbaron
Copy link
Collaborator

noahbaron commented Jul 1, 2019 via email

@lbussy
Copy link

lbussy commented Jul 1, 2019

It’s possible that it’s just the RPi wireless being flakey. If it’s a network timeout (and you are on wireless) you can use this standalone daemon to help.

@noahbaron
Copy link
Collaborator

noahbaron commented Jul 1, 2019 via email

@gifty74
Copy link

gifty74 commented Jul 1, 2019

If the bluetooth/wifi interference is a known problem, I would think the code would want to disable the bluetooth for 10 sec while the Pi uploads the data to the google sheet. Maybe this is easier said than done...

I'll try that script when I get home tonight and see how tomorrow goes. I'll also look at those error logs Noah.

@gifty74
Copy link

gifty74 commented Jul 1, 2019

don't see any errors...

Rpi errors

@noahbaron
Copy link
Collaborator

In my test RPi setups I haven't seen it as a problem. A few Apple devices clearly have this problem (for example my iPhone Xr), and for these I do turn off BT scanning while logging, which fixes the problem. Normally the operating system should deal with this more effectively, but it's not alway the case.

It appears you're checking the script editor on the actual brew log. You need to check the script editor on the your Sheet where the script is actually attached, where you got the cloud URL for the Tilt Pi. There should be a tab called "Beers" with a list of all the beers you have brewed. From there, you can check for errors.

@gifty74
Copy link

gifty74 commented Jul 1, 2019

Yeah, none in Script sheet either.

@gifty74
Copy link

gifty74 commented Jul 2, 2019

Since installing that wifi 'keep alive' script last night it has not missed one log point to the google sheet. not sure what exactly that did, but might want to look at including that in TiltPi for those that use wifi (which I would think would be the majority?).

@lbussy
Copy link

lbussy commented Jul 2, 2019

Glad it worked for you. Noah, you can grab it with my blessings.

The RPi for some reason doesn’t like to stay connected consistently. Part of it is power management, part of it is sunspots I guess.

@gifty74
Copy link

gifty74 commented Jul 2, 2019

Spoke too soon. Today throughout the day missed a bunch of data points on the Sheet.

@gifty74
Copy link

gifty74 commented Jul 2, 2019

I have an old Kindle Fire that I've keep running nearby that NEVER misses a beat (data point). Odd that a RPi, which is a fully capable PC, does not reliably publish the data when given very specific instructions via code. You'd think that a computer would be able to handle this function, and do it repeatedly without issue. Would much rather use the RPi, but the Fire is much more reliable.

@lbussy
Copy link

lbussy commented Jul 2, 2019

I'd stop short of calling RPi a fully capable PC. The Fire is probably a better platform all in all - just not as open.

No you'll never make the RPi rock-solid, but the script should help.

@noahbaron
Copy link
Collaborator

noahbaron commented Jul 3, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants