Page 1 of 1

Micropython Google sheets

Posted: Tue Apr 20, 2021 5:54 pm
by Beginner2all
Hi. I'm a beginner to Python and Micropython. I'm trying to make a Micropython code to light a led when a certain number is on my Google sheet. I managed to make it work in Python, but I can't get it to work on Micropython. The problem I'm having is the Gspread module that works with Python but apparently not with Micropython. Is there any way to connect Micropython to Google sheets cell or a way to get Gspread work on Micropython? I'm using a ESP8266 board (NodeMCU). Thank you very much for all the help!

Re: Micropython Google sheets

Posted: Tue Apr 20, 2021 8:16 pm
by scruss
I don't see an easy way to do this. There doesn't seem to be the right kind of Auth library for MicroPython, and the smallest response I could get back from the Sheets API was many times larger than available RAM on a NodeMCU.

Re: Micropython Google sheets

Posted: Tue Apr 27, 2021 7:36 pm
by nekomatic
It looks as if you should be able to detect the condition on your Google sheet with IFTTT, then you might be able to notify your MicroPython code via some other service?

Re: Micropython Google sheets

Posted: Wed Apr 28, 2021 7:50 am
by stijn
the smallest response I could get back from the Sheets API was many times larger than available RAM on a NodeMCU
[/quot]

Only if the response is read into one object probably? It's not ideal, and you'd have to manually parse the response, but you could read from the socket x bytes at a time and extract only the information you need.