electronicsguy / ESP8266

ESP8266 Projects
242 stars 183 forks source link

Need a bit more details to get this set and running #41

Closed lorol closed 7 years ago

lorol commented 7 years ago

@electronicsguy Thank you for sharing this great work!

I managed to run the sample. On standard ESP8266 2.3.0 core , it works a bit fragile* (an UPDATE1 see below) and tricky in regards of connectivity from/to google. Could you please explain in more details: 1) What is the exact role of Fingerprint (UPDATE2: I found the details, just they can be more clear that it is optional and because of Google updating, it cannot be used as fixed string) ?

2) What best permissions for publishing and sharing levels need to be configured on Google online Calendar , Spreadsheet and Script respectively - I needed to set everything to be exposed maximally to Internet (less security) to run the push and pull of the sample - is this necessary or only certain access is enough?

*UPDATE1: after using the newest dev. core 2.4.x of ESP8266 as per https://github.com/esp8266/Arduino/issues/3330 , the example runs much more stable and smooth: at least several hours with no reboots or connections drop!

electronicsguy commented 7 years ago

hi.. good to know it's stable now. You can also increase the value of the sleep timer in the end of loop() to potentially increase stability.

Fingerprint is useful for mitigating man in the middle attacks. You can google for it.

you don't need to configure permissions separately. When you publish the app with the permissions as explained in the readme, google will ask you permissions (the first time) for the app to access sheets, calendar, etc. You have to say yes there. There is no other way, that I know of.

Security here is dependent on the secrecy of the published web-app's public URL. As long as you keep that secret, no-one should be able to access your data.

lorol commented 7 years ago

Thanks, I believe we can close the issue. Maybe a recommendation this repository and .ino examples to be organized as Arduino library for direct usage.

mik00 commented 5 years ago

Sujay Your test code ran fine for me.

I'm having trouble reading my own calendar. I can read/update my own spreadsheet OK, so I have got some things right. I wonder if you'll take pity on this old codger and cast your eye over the following.

As per your instructions, I changed the name of the calendar in the code to '' as found in my calendar settings panel.

You said "Just make sure they (calendar events) repeat per week and change..." Does this mean that only events that repeat each week will be found? I have at least one of those present.

I ran out of both ideas, and time so I'm hoping my problem is obvious, or common. Here's the debug stuff I get back.

12:29:24.404 -> GET: Fetch Google Calendar Data: 12:29:24.404 -> ================================ 12:29:24.404 -> GET /macros/s/AKfycbxhaVlHioUBWeqLgzled0MEMhHhJyD-bgdR63sBWoA5wbOS9gE/exec?cal HTTP/1.1 12:29:24.404 -> Host: script.google.com 12:29:24.404 -> User-Agent: ESP8266 12:29:24.404 -> 12:29:24.404 -> 12:29:24.404 -> 12:29:24.404 -> Connected OK. 12:29:24.404 -> GET /macros/s/AKfycbxhaVlHioUBWeqLgzled0MEMhHhJyD-bgdR63sBWoA5wbOS9gE/exec?cal HTTP/1.1 12:29:24.404 -> Host: script.google.com 12:29:24.404 -> User-Agent: ESP8266 12:29:24.404 -> 12:29:24.404 -> 12:29:24.404 -> 12:29:25.329 -> Status code: 200 12:29:25.329 -> Reason phrase: OK 12:29:25.329 -> Content-Type: text/html; charset=utf-8

12:29:25.329 -> Cache-Control: no-cache, no-store, max-age=0, must-revalidate

12:29:25.329 -> Pragma: no-cache

12:29:25.329 -> Expires: Mon, 01 Jan 1990 00:00:00 GMT

12:29:25.329 -> Date: Tue, 13 Aug 2019 11:29:26 GMT

12:29:25.329 -> X-Content-Type-Options: nosniff

12:29:25.329 -> X-XSS-Protection: 1; mode=block

12:29:25.329 -> Server: GSE

12:29:25.329 -> Alt-Svc: quic=":443"; ma=2592000; v="46,43,39"

12:29:25.329 -> Accept-Ranges: none

12:29:25.329 -> Vary: Accept-Encoding

12:29:25.329 -> Transfer-Encoding: chunked

12:29:25.329 ->

12:29:25.329 -> Chunk Size: 695 12:29:25.397 -> <!DOCTYPE html>Error

12:29:25.431 -> Chunk Size: 0 12:29:25.431 -> ****