Announcement

Collapse
No announcement yet.

looking for a way to use gmail and google calendar

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    looking for a way to use gmail and google calendar

    I am looking for a way to trigger events from google calendar appointments and trigger events based on gmail received messages I see that Blade has started this for HS3 is there a way to do this in HS2PRO I already questioned blade if the plugin would be made available for HS2 and unfortunately not so I am looking for any input for a work around for it.

    Thanks Ken
    HSPRO,HS3PRO, BLsecurity, , MCSxap, HSTouch Android, UltraGCIR, CM15a, USBUIRT, BLUSBUIRT, WIFIRGB, BLAB8SS, BLcontrol, BLGData, BLLAN,BLOccupied, BLRadar, BLVolume, iTunesDAAP, UltraGCIR3, Airplayspeak, BLalarm, BLbackup, BLLED, BLrandom, BLReminders, BLRF, BL Speech, Hyperion, IFTTT, KINECT, XBMC, MCSprinkers PRO, PHLocation, ULtrapioneer, Ultralog, ultraweatherbug, Z,troller, GC-100, GC WIFICC, GC-WIFI SERIAL, Nitrogen logic depth camera controllers,

    #2
    Ken,

    Long time agao Rick made a plugin for reading google calender if I am right. I cannot find the threads anymore, but I think the plugin was called HSGCAL.
    I do not remember anything on gmail though.

    Wim
    -- Wim

    Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

    1210 devices/features ---- 392 events ----- 40 scripts

    Comment


      #3
      Originally posted by kenrad View Post
      I am looking for a way to trigger events from google calendar appointments and trigger events based on gmail received messages I see that Blade has started this for HS3 is there a way to do this in HS2PRO I already questioned blade if the plugin would be made available for HS2 and unfortunately not so I am looking for any input for a work around for it.

      Thanks Ken
      Check out Bob's new plugin here and see if it will do what you need.
      http://board.homeseer.com/forumdisplay.php?f=1146
      💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

      Comment


        #4
        HS3 supports GMail natively and HS has always had a way to trigger events from eMails being received, so that is all there already.

        The Google Calendar (yes, HSGCal) that I posted on the board long ago only needs a few changes to work in HS3. If I wasn't so completely and utterly buried by other plug-ins and work I would have made the change by now! That plug-in pretty much depended upon a script parsing the calendar events to make things happen though - I use it to have our appointments announced to us a couple of times a day. When I do get around to porting it to HS3 (if nobody else beats me to it) then I will see about putting some trigger capability in there.
        Regards,

        Rick Tinker (a.k.a. "Tink")

        Comment


          #5
          You can interface with Google Calendars directly using a script like this http://forums.homeseer.com/showpost....6&postcount=11

          which I have running in HS2 without issue. A larger version of the script monitors my work schedule and any other type of calendar entries I have. This does not rely on gmail at all, you can indeed read unread gmail messages by RSS (I do this for simple email announcements) as there is a feed for gmail (used on the Android widget) that shows unread mail but my two are not linked together.

          Comment


            #6
            Rupp. Bobs plugin is exactly what I am looking for but he is not making it available for HS2 that is the delmma that I have. Mrhappy I will check out your script and see what I can figure out, not much of a scripter tho so I was hoping for a more direct plugin

            Thanks Ken

            Keep the ideas coming

            Sent from my EVO using Tapatalk
            HSPRO,HS3PRO, BLsecurity, , MCSxap, HSTouch Android, UltraGCIR, CM15a, USBUIRT, BLUSBUIRT, WIFIRGB, BLAB8SS, BLcontrol, BLGData, BLLAN,BLOccupied, BLRadar, BLVolume, iTunesDAAP, UltraGCIR3, Airplayspeak, BLalarm, BLbackup, BLLED, BLrandom, BLReminders, BLRF, BL Speech, Hyperion, IFTTT, KINECT, XBMC, MCSprinkers PRO, PHLocation, ULtrapioneer, Ultralog, ultraweatherbug, Z,troller, GC-100, GC WIFICC, GC-WIFI SERIAL, Nitrogen logic depth camera controllers,

            Comment


              #7
              Originally posted by kenrad View Post
              Rupp. Bobs plugin is exactly what I am looking for but he is not making it available for HS2 that is the delmma that I have. Mrhappy I will check out your script and see what I can figure out, not much of a scripter tho so I was hoping for a more direct plugin

              Thanks Ken

              Keep the ideas coming

              Sent from my EVO using Tapatalk
              There is the HSGCal plugin that Rick mentioned above which I am not sure whether or not it still works, it did have some problems with keeping itself logged in IIRC. The script I posted is not a complete script but is a starting point, if you do struggle and want to drop me an email then I can try and work through something specific if you do have trouble.

              Comment


                #8
                basically what I am hoping to accomplish is trigger an event based on info from the google calendar not sure if this is possible or not and also announce appointments for the day

                Cheers Ken
                HSPRO,HS3PRO, BLsecurity, , MCSxap, HSTouch Android, UltraGCIR, CM15a, USBUIRT, BLUSBUIRT, WIFIRGB, BLAB8SS, BLcontrol, BLGData, BLLAN,BLOccupied, BLRadar, BLVolume, iTunesDAAP, UltraGCIR3, Airplayspeak, BLalarm, BLbackup, BLLED, BLrandom, BLReminders, BLRF, BL Speech, Hyperion, IFTTT, KINECT, XBMC, MCSprinkers PRO, PHLocation, ULtrapioneer, Ultralog, ultraweatherbug, Z,troller, GC-100, GC WIFICC, GC-WIFI SERIAL, Nitrogen logic depth camera controllers,

                Comment


                  #9
                  Originally posted by kenrad View Post
                  basically what I am hoping to accomplish is trigger an event based on info from the google calendar not sure if this is possible or not and also announce appointments for the day

                  Cheers Ken
                  Yes it is possible to do it via script, in that script I posted it shows you the principle. It is treated a bit like a database, you give it a start/end date and it then returns a loop of calendar entries. You can then loop all of these into an announcement. Triggering an event is also possible, not something I do but I know you can do it.

                  Comment


                    #10
                    This should list your calendar entries for the following day from a single calendar.

                    Code:
                    Imports Google.GData.Calendar
                    Imports Google.GData.Client
                    Imports Google.GData
                    
                    Dim strURL As String = "http://www.google.com/calendar/feeds/yyyyyy/full"
                    
                    Dim UN As String = "xxxxxx@gmail.com"
                    Dim PW As String = "yyyyyy"
                    
                    Sub Main(ByVal Parms As Object)
                    
                        Dim query As Google.GData.Calendar.EventQuery = New Google.GData.Calendar.EventQuery()
                        Dim service As Google.GData.Calendar.CalendarService = New Google.GData.Calendar.CalendarService("")
                        service.setUserCredentials(UN, PW)
                    
                        Dim anTmrw As Boolean = False
                        Dim stTime As String = Nothing
                    
                        Dim aptString(0) As String
                        Dim aptSTimes(0) As String
                    
                        Dim i As Integer = 0
                    
                        query.Uri = New Uri(StrUrl)
                        query.StartTime = DateTime.Now.ToString
                        query.EndTime = DateTime.Now.AddHours(28).ToString 'this event will be run at 2000hrs, + 4hrs + 24hrs to check for tomorrow
                        query.ExtraParameters = "orderby=starttime&sortorder=ascending"
                    
                        Dim calFeed As Google.GData.Calendar.EventFeed = service.Query(query)
                        Dim feedEntry As Google.GData.Calendar.EventEntry
                    
                        For Each feedEntry In calFeed.Entries
                            antmrw = True
                    
                            aptString(i) = feedEntry.Title.Text
                            aptSTimes(i) = feedEntry.Times(0).StartTime
                    
                            Log("Calendar #" & i & " Item: " & aptString(i) & " Starting At: " & aptSTimes(i))
                    
                            i = i + 1
                            ReDim Preserve aptString(i), aptSTimes(i)
                        Next
                    
                        Log("Are You Doing Anything Tomorrow: " & antmrw)
                    
                        If antmrw = True Then
                            Log("You have appointments tomorrow") 'build an announcement string
                            Dim anString As String = Nothing
                    
                            anString = "Tomorrow you have " & aptString.GetUpperBound(0) & " calendar appointments"
                    
                            hs.speak(anString)
                    
                            For k As Integer = 0 To aptString.GetUpperBound(0) - 1
                                anString = " at <say-it type=""time"">" & convert.todatetime(aptSTimes(k)).ToString("HH:mm") & "</say-it> you have " & aptString(k)
                                hs.speak(anString)
                            Next
                    
                            hs.speak(", those are all your appointments, enjoy your day")
                    
                        Else
                            Log("You have nothing planned tomorrow")
                        End If
                    
                    End Sub 'this sub checks the appointments on the non work schedule, just provides a warning if there is something
                    
                    Sub Log(ByVal P As String)
                        hs.writelog("GoogleCalendar", P)
                    End Sub
                    Before using this you must download the DLL files at the top of the script, reference them in your settings.ini file. You must then change your calendar URL and then set your username and password, then it should run through and announce todays stuff.

                    Comment

                    Working...
                    X