Git Product home page Git Product logo

reminder-with-google-calender's Introduction

Reminder with Google Calender

V1 for compatibility to video https://youtu.be/sm1-l5-z3ag (probably no more working)

Update Video: https://youtu.be/ZFgh2KFLeGA

V2: For devices with up to 4 buttons. One pin for the switch and one pin for the LED

Analog version: for up to 8 buttons on a Wemos D1 mini. Uses the analog pin A0 for the switches and one pin per LED

reminder-with-google-calender's People

Contributors

sensorsiot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reminder-with-google-calender's Issues

Improved version

Attached version of Reminder_Analog has the following improvements:

  • Uses new version 2.0 of Sujay Phadke's HTTPSRedirect

https://github.com/electronicsguy/ESP8266/tree/master/HTTPSRedirect

  • Introduces new task status to the state machine: Pending

(when user presses a button to create a new task, but before the task has been created in GCal).

This new status makes the code simpler in manageStatus().

  • Records the status in permanent memory, so the device can be switched off temporarily and it will remember whether the task has been completed.

  • User-defined constant to configure delay before writing to permanent memory

This is useful to save writing unnecessarily, for example in the common situation where someone presses a button to activate a task, then immediately presses again to cancel (either when demonstrating the device, or to correct a mistake).

Without the delay will result in 2 (wasted) write-cycles, whereas with the delay there will be no write at all.

  • Copes with situation where a button is pressed again while GCal event is still active.

(previous version did not respond in this situation).

  • Monitors heap memory

(useful to illustrate leaking memory problem with v2.4.1 of the ESP8266 library)

  • Heartbeat routine only flashes the currently-active LEDs instead of all of them.

(distracting otherwise when no tasks are currently due).

  • Heartbeat also flashes the Wemos internal LED

(I don't use D4 for that reason).

  • User-defined constant to configure the Hearbeat frequency (set to zero to disable Hearbeat altogether)

  • User-defined constant to configure the frequency of status printing.

Future enhancement:

It would be nice to do away with the current polling solution using a Ticker object.
Is it possible to use a proper hardware interrupt to signal when to read the analog pin (A0) - e.g. by connecting the switches to another input pin as well as A0?

At the moment, if someone presses a button while the calendar is being accessed, there can be a delay before the LED status changes, and the key press is occasionally not registered at all.

Reminder_AnalogV2.zip

cannot access to calendar

Now esp cannot access to calendar data because this document moved temporality. How to fix this issue? , Thank you.

Serial response

Final Response:
202

<TITLE>Moved Temporarily</TITLE>

Moved Temporarily

The document has moved here.

END OF RESPONSE

Restarting

There seems to be a problem with the persistence of still active (but expired events in Gcal) events. On startup it starts fresh, re-reads what is available in the Calendar and sets the led accordingly. However as the event is now due in Calendar, it is not seen, even though it has /not/ been acknowledged. Oops. one power failure and the missus is mad at you again :P

It would be advisable to store the active, unacked state in eeprom as well, so that at startup we still know we had an un-acked event.

Can't get CreateCalendarEvent.gs to run.

This is the error i'm getting when the code is run in doGet:
6:28:47 PM
Notice
Execution started
6:28:47 PM
Error
TypeError: Cannot read property 'parameter' of undefined
doGet
@

I have no idea what i'm doing wrong.

I used the code from the file:
function doGet(eve){
var title = eve.parameter.title;
Logger.log(eve);
//Logger.log(ContentService.createTextOutput(CreateEvent()));
return ContentService.createTextOutput(CreateEvent(title));
}

// Replace XXX with your calendar name
function CreateEvent(eve){
var _calendarName = 'Aufgaben_Familie'
var MILLIS_PER_HOUR = 1000 * 60 * 15 ;
var now = new Date();
var from = new Date(now.getTime()-60000);
var to = new Date(now.getTime() + 1 * MILLIS_PER_HOUR);
var vCalendar = CalendarApp.getCalendarsByName(_calendarName)[0];
vCalendar.createEvent(eve,
from,
to)
// Logger.log(currentTime);
// Logger.log(vStartDateValue);
// Logger.log(from);
// Logger.log(to);
// Logger.log(vEndDateValue);
return true;
}

it will not compile

I got this:

Arduino: 1.8.9 (Windows 10), Board: "WeMos D1 R1, 80 MHz, Flash, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"

sketch\Calandar.ino.cpp.o: In function `_GLOBAL__sub_I_host':

C:\Users\plipp\Documents\Arduino\Calandar/Calandar.ino:251: undefined reference to `HTTPSRedirect::HTTPSRedirect(int)'

C:\Users\plipp\Documents\Arduino\Calandar/Calandar.ino:251: undefined reference to `HTTPSRedirect::~HTTPSRedirect()'

sketch\Calandar.ino.cpp.o: In function `connectToWifi()':

C:\Users\plipp\Documents\Arduino\Calandar/Calandar.ino:70: undefined reference to `HTTPSRedirect::HTTPSRedirect(int)'

C:\Users\plipp\Documents\Arduino\Calandar/Calandar.ino:77: undefined reference to `HTTPSRedirect::~HTTPSRedirect()'

C:\Users\plipp\Documents\Arduino\Calandar/Calandar.ino:84: undefined reference to `HTTPSRedirect::getData(String&, char const*, char const*)'

C:\Users\plipp\Documents\Arduino\Calandar/Calandar.ino:88: undefined reference to `HTTPSRedirect::HTTPSRedirect(int)'

sketch\Calandar.ino.cpp.o: In function `getCalendar()':

C:\Users\plipp\Documents\Arduino\Calandar/Calandar.ino:105: undefined reference to `HTTPSRedirect::getData(String&, char const*, char const*)'

C:\Users\plipp\Documents\Arduino\Calandar/Calandar.ino:112: undefined reference to `HTTPSRedirect::~HTTPSRedirect()'

sketch\Calandar.ino.cpp.o: In function `setup':

C:\Users\plipp\Documents\Arduino\Calandar/Calandar.ino:209: undefined reference to `HTTPSRedirect::HTTPSRedirect(int)'

sketch\Calandar.ino.cpp.o: In function `createEvent(String)':

C:\Users\plipp\Documents\Arduino\Calandar/Calandar.ino:123: undefined reference to `HTTPSRedirect::getData(String&, char const*, char const*)'

C:\Users\plipp\Documents\Arduino\Calandar/Calandar.ino:125: undefined reference to `HTTPSRedirect::~HTTPSRedirect()'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board WeMos D1 R1.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.