Announcement

Collapse
No announcement yet.

can I extract calendar entries

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

  • can I extract calendar entries

    Can I extract calendar entries with this plugin to display them in a virtual device ? I want to display lets say the next 3 entries in a virtual device. Or if that's not possible maybe for the week or month

  • #2
    I believe there is a scripting call to return events but as I am not home right now I will have to look that up once I get home.
    Check out the help web page in the plugin. The call should be listed there
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

    Comment


    • #3
      Ok i founve found a starting point

      Dim allEvents As Object()
      allEvents = hs.PluginFunction("BLGData", "", "GetCalendarEvents", new Object(){"me@here.com","My Calendar","08/21/2013"})
      For Each ev As Object In allEvents
      hs.writelog("Info", "Event Name: " & ev.Name)
      Next

      that writes the number of days I specify into the log. What I get is just the event name, but not the date or start time. Can I get that information too ?

      Comment


      • #4
        See the Calendar Event Properties in the help web page
        Cheers,
        Bob
        Web site | Help Desk | Feature Requests | Message Board

        Comment


        • #5
          Ok lets say I want the event name and start date. I have tried this but I get this error:

          Sub Main(parm as object)
          Dim allEvents As Object()
          allEvents = hs.PluginFunction("BLGData", "", "GetCalendarEventsForXDays", new Object(){"xxx@gmail.com","xxx@gmail.com",14})
          For Each ev As Object In allEvents
          hs.writelog("Info", "Event Name: " & ev.Name, "Event start date: " & ev.StartDate)
          Next
          End Sub


          Oct-03 22:35:43 Error 1 Running script C:\Program Files (x86)\HomeSeer HS3\scripts\BLGdata
          test.vb :Exception has been thrown by the target of an invocation.Overload resolution failed because no accessible 'writelog' accepts this number of arguments.

          Ultimately I want the data not being written to the log but to variables or as a string to a device but the log is good enough for testing at the moment, thats the next step once I know how to extract the data

          Comment


          • #6
            Try this:

            Code:
            Sub Main(parm as object)
                Dim allEvents As Object()
                allEvents = hs.PluginFunction("BLGData", "", "GetCalendarEventsForXDays", new Object(){"xxx@gmail.com","xxx@gmail.com",14})
                For Each ev As Object In allEvents
                    hs.writelog("Info", "Event Name: " & ev.Name & "; Event start date: " & ev.StartDate)
                Next
            End Sub
            Cheers,
            Bob
            Web site | Help Desk | Feature Requests | Message Board

            Comment


            • #7
              I think you write log should be:
              hs.writelog("Info", "Event Name: " & ev.Name &", Event start date: " & ev.StartDate)

              Greig.

              Sent from my SM-G950F using Tapatalk
              Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
              X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
              Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
              Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
              Scripts =
              Various

              Comment


              • #8
                Ok I got that working. Now, can I retrieve just the next 3 events, rather than by days ?

                Comment


                • #9
                  I have everything working, a daily email with the next 14 dyas events, and also a virtual device displaying my upcoming events. Great. One thing I cannot get to work though. I get all the google calendar events, but not the birthdays. I would like to include birthdays in my emails and the event display. If I go into google calender (web not via the PI) if I tick contacts they show up. If I go into the PI, click on calendar, then contacts, the page loads as the calendar one, but is blank. In edit calendar I have ticked everything, calendar, contacts, taks etc
                  If I look at the BLGData - Maintain Users page, I can see my name, with calendars and voice under it. But no contacts, tasks ot google plus. I have disabled them all, saved, then there is nothing, then ticked them all and saved again. I still only have calendars and voice.

                  Comment

                  Unconfigured PHP Module

                  Collapse

                  Working...
                  X