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
Announcement
Collapse
No announcement yet.
can I extract calendar entries
Collapse
X
-
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
-
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
-
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
Comment
-
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 TapatalkZwave = 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
-
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
Comment