electronicsguy / ESP8266

ESP8266 Projects
242 stars 183 forks source link

how to get spreadsheet data using appscript with esp32 #91

Open suryadevelope opened 4 years ago

suryadevelope commented 4 years ago

i tried using httpsredirect library but esp32 is hanging at client->GET(url,host) or at client->getResponseBody(),i am unable to resolve the issue can any one get me the complete working code on esp32

github-actions[bot] commented 4 years ago

Welcome to HTTPSRedirect! Please provide enough info to debug the issue.

iamEMgineer commented 4 years ago

Hello! I'm having the same problem. I did everything as described on the README. I'm working with an ESP32 and a Mac Book Pro (if this affects the outcome).

The Serial port is giving me this (with the DEBUG option set to true):

22:22:38.541 -> GET: Write into cell 'A1'
22:22:38.541 -> =========================
22:22:38.541 -> GET /macros/s/AKfycbxvO1RLVeW5t_BZX1G1HfD6DwZLf2pEZ1HwIOMBeytaC97H0nwl/exec?value=Hello HTTP/1.1
22:22:38.541 -> Host: script.google.com
22:22:38.575 -> User-Agent: ESP8266
22:22:38.575 -> 
22:22:38.575 -> 
22:22:38.575 -> 
22:22:40.128 -> Status code: 302
22:22:40.128 -> Reason phrase: Moved Temporarily
22:22:40.128 -> _redirHost: script.googleusercontent.com
22:22:40.128 -> _redirUrl: /macros/echo?user_content_key=a1vL9ozmca2xyVf_jDonBT3YAuWGlVUDlnKtAGV19SdlVgJWbYp9FKpU5SeKpz3y2vlvIKu9IIqRcesjsgqVn62o-b3a9K15m5_BxDlH2jW0nuo2oDemN9CCS2h10ox_1xSncGQajx_ryfhECjZEnKvAXwyDZkSibp3CbggnntmEph6oo_Qmkr1JZ__DvympBTh3PXrOx1VQJIELq-tejllJC7Wjn6lQeK1yt7hJ1GoNVZf0ZD8jWQ&lib=MwtEB855yXwfi7g7gbAJrhtd4V07qXiLh

22:22:40.202 -> GET /macros/echo?user_content_key=a1vL9ozmca2xyVf_jDonBT3YAuWGlVUDlnKtAGV19SdlVgJWbYp9FKpU5SeKpz3y2vlvIKu9IIqRcesjsgqVn62o-b3a9K15m5_BxDlH2jW0nuo2oDemN9CCS2h10ox_1xSncGQajx_ryfhECjZEnKvAXwyDZkSibp3CbggnntmEph6oo_Qmkr1JZ__DvympBTh3PXrOx1VQJIELq-tejllJC7Wjn6lQeK1yt7hJ1GoNVZf0ZD8jWQ&lib=MwtEB855yXwfi7g7gbAJrhtd4V07qXiLh
 HTTP/1.1
22:22:40.236 -> Host: script.googleusercontent.com
22:22:40.236 -> User-Agent: ESP8266
22:22:40.236 -> 
22:22:40.236 -> 
22:22:40.236 -> 

I think I gets stuck at the HTTPSRedirect::getResponseStatus() function, specifically in the do-while part.

Any idea why? Thanks!

AnirudraChoudhury commented 4 years ago

Hi @iamEMgineer you are right. if you kindly share your code i thing i can help you.

HX2003 commented 4 years ago

I have managed to get it to work by uncommenting line 89 stop();

ybourdon commented 4 years ago

@ybourdon - please use the author's correct name and create a new issue.

Hazqeel09 commented 4 years ago

I have managed to get it to work by uncommenting line 89 stop();

At which file do you uncomment this

HX2003 commented 4 years ago

I have managed to get it to work by uncommenting line 89 stop();

At which file do you uncomment this

HTTPSRedirect.cpp

enemykrs commented 4 years ago

I have managed to get it to work by uncommenting line 89 stop();

At which file do you uncomment this

HTTPSRedirect.cpp hi, share the working code for esp32

HX2003 commented 4 years ago

@enemykrs Here's the code, just tested today, read/write from spreadsheet is all good.

enemykrs commented 4 years ago

@enemykrs Here's the code, just tested today, read/write from spreadsheet is all good.

thanks for the example, everything works fine in addition to using 2/3 of the esp32 memory