Author Topic: Google Calendar Driver  (Read 2134 times)

broconne

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Google Calendar Driver
« on: April 24, 2010, 01:08:01 pm »
Here is my second driver, a Google Calendar driver. 

Purpose:  Allows you to get to your Calendar entries from inside of Elve.  You could display upcoming entries on your touchscreen.  The system supports multiple instances for multiple calendars.

Configuration:
Multiple values need to be configured for this driver.

Calendar URL (Required) - Private URL to the calendar XML.  For example, http://www.google.com/calendar/feeds/<username>@gmail.com/private/full  where username is your username.
Username (Required) - Name of the user with access to the above URL. 
Password(Required) - Password for above username.
Reload Interval(Optional) - Interval in seconds to reload and get new calendar entries
Start Date(Optional) - Optional starting date to look for new entries.  Default to today.
End Date(Optional) - Optional ending date for new entries.  Defaults to the next 25 entries regardless of date.

To install, unzip the file into your Elve/drivers directory.

Use:
Once configured you can access the driver using a property called "CalendarEntries" which will return a ScriptArray of of CalendarEvent objects.
The CalendarEvent objects have the following properties:
Title - Title of the entry in google calendar
Content - Any content associated with the calendar entry
Times[] - Any array of CalendarWhen Objects indicated the times this entry occurs (may be more than one time for a single entry)

CalendarWhen objects expose three properties:
AllDay - ScriptBoolean indicating if the event is all day.
StartTime - ScriptDateTime of when the event starts
Stoptime - ScriptDateTime of when the event stops.

Example:
The following is an example of how to use this driver.

Code: [Select]
entries = GoogleCalendar.CalendarEntries;
if(entries.length > 0 ){
  title = entries[0].Title;
  times = entries[0].Times;
  if( times.length > 0 ){
     allDay = times.length[0].AllDay;
     if( allDay == false){
       start = times.length[0].StartTime;
       stop = times.length[0].StopTime;
      entryText = "Calendar Event: " + title " is from " + start + " to " +stop;
    }
    else{
      entryText = "Calendar Event: " + title " starts on " + start.Day + " and lasts all day";
    }

  }


}



Let me know if you have any questions - hope you find it useful.






broconne

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: Google Calendar Driver
« Reply #1 on: July 03, 2010, 06:28:09 pm »
I just wanted to post and see if anyone was finding this driver helpful and what enhancements they may want?

One user mentioned to me, and J9 recently reminded me, that people may want event support.

For those interested in event support, what sort of requirements do you have?

Here are three options I can think of for events.
1) Anything with an alert time in Google creates an event?
2) Some sort of regex filter based system to create events only for those calendar entries that match?
3) Events created for specific calendars?


Thoughts?

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2853
    • View Profile
    • Codecore Technologies
Re: Google Calendar Driver
« Reply #2 on: July 03, 2010, 07:28:31 pm »
1. Supporting calendar alerts with Elve events would be great, I think mustangcoupe is looking for this as well.

2. It would be helpful to see how to display the calendar data in a touch screen.
-- We talked earlier about a FormattedString property (maybe you have a better name)
John Hughes
Codecore Technologies

superjer2000

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Google Calendar Driver
« Reply #3 on: March 02, 2013, 03:36:05 pm »
I keep getting the following error when a calendar entry fires.  I recognize there may not be any support offered for Elve or the Beta Google Calendar Driver but I figured I'd give it a shot.


An unexpected error occured while executing a rule.  Error: System.Runtime.Serialization.SerializationException: The constructor to deserialize an object of type 'BuiltInDrivers.CalendarEvent' was not found. ---> System.Runtime.Serialization.SerializationException: The constructor to deserialize an object of type 'BuiltInDrivers.CalendarEvent' was not found.
   at System.Runtime.Serialization.ObjectManager.GetConstructor(Type t, Type[] ctorParams)
   at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
   --- End of inner exception stack trace ---

Server stack trace:
   at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
   at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
   at System.Runtime.Serialization.ObjectManager.DoFixups()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
   at CodecoreTechnologies.Elve.DriverFramework.Scripting.ScriptObject.Deserialize(Byte[] serializedObjectData)
   at MasterService.RemotingClass.ExecuteRule(String ruleName, Dictionary`2 serializedEventArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at
  • :

   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at SharedLibrary.IRemotingClass.ExecuteRule(String ruleName, Dictionary`2 serializedEventArgs)
   at DriverService.DriverService2.ExecuteDriverRuleSafely(IRule rule, DriverEventArgDictionary eventArgs)

iostream212

  • Sr. Member
  • ****
  • Posts: 460
    • View Profile
Re: Google Calendar Driver
« Reply #4 on: March 07, 2013, 11:30:20 am »
Find any resolution to this? Got same error. What version of Elve are you running?
I always wanted to be somebody. In retrospect, I think I should have been more specific.

mustangcoupe

  • Full Member
  • ***
  • Posts: 108
    • View Profile
Re: Google Calendar Driver
« Reply #5 on: March 07, 2013, 09:16:37 pm »
If I recall correctly at one point an update to ELVE broke the driver I dont know if it was ever fixed.

iostream212

  • Sr. Member
  • ****
  • Posts: 460
    • View Profile
Re: Google Calendar Driver
« Reply #6 on: March 08, 2013, 12:02:25 am »
I thought the drivers were being updated to resolve any breaking changes to the framework. Ship this over to bugs?

Sent from my Galaxy Nexus using Tapatalk 2

I always wanted to be somebody. In retrospect, I think I should have been more specific.

superjer2000

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Google Calendar Driver
« Reply #7 on: March 15, 2013, 07:12:57 pm »
Find any resolution to this? Got same error. What version of Elve are you running?

I am running 1.5.0.9.

I will submit a bug report.

Thanks!