Closed JacquesBB closed 6 years ago
I just tried out the example script some hour ago for the first time, and it took some work to get running, and even then it is problematic. The example GoogleDocs.ino it self seems to be an example to display its faults as it posts a rapidly declining memory availability and then the ESP8266 dumps its stack and reboots (if you are lucky). It might still be useful for single posts or short bursts with a deep sleep in between to clear out the memory leaks. Also there are quite a few details missing from the instructions. It seems there is some authentication issue, based on the output you posted, it probably works in the browser, because you are already authenticated there. You need to publish the google script as a web app that is executable for "Anyone even anonymous" (unless you have figures out a way the library allows you to authenticate). I tried posting using your script (sorry for the garbage data), and that seemed to work (it responded "Written on column C"). By that, you also need to have allowed anyone access to the google sheet you are using, and for the calendar fetch, also that calendar needs to be publicly available.
To be honest, i would not rely on this library for anything to be used other than in a test, it is too dodgy for my taste. I will take look at the official Google Cloud APIs a instead.
Thanks a lot Traste, this was extremely helpful. The key point was
You need to publish the google script as a web app that is executable for "Anyone even anonymous"
It is working now. I will see now what I can do with it, and if it suits my need without bugging. As it is, it should correspond to what I want to do, logging data every minute or so.
@JacquesBB and @Traste JacquesBB, thanks for reporting. There may be something unique in your setup. IT does work, in the sense the HTTP requests and happening and re-direction is working. Please post the entire output of the second http request on pastebin, so that we can debug.
As far as the concerns raised by Traste: Yes this is a hobby project. Everything you've mentioned is clearly documented in the Readme. Please go through it again. The authentication is a Google requirement (and very rightly so). There are 2 ways to do it - anonymous authentication or OAUTH for every app and every request. I chose to do it the first way since I find it way more streamlined. Again, all details are in the Readme. (Read Sec. IV(b), "Server Side", Point 5)
Please let me know what exactly you find missing and I'll be happy to add it to the documentation.
The example code is requesting memory. There is a lag till it's released by the HTTPClient handler. This is not a bug, it's the way it's designed.
Design, feature, bug.... it is all in the eyes of the debugger. :)
Hi,
I have made the simple example I could make
But it does not work ( although the https request on the browser is fine). Here is the output with the debug on .
then tons of HTML
Please help .