Announcement

Collapse
No announcement yet.

Speak Calendar Events

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

    #16
    Originally posted by mda View Post
    @MNB I am also a recent convert from Vera and I use Blade's BLGData plugin to trigger Homeseer events from Google Calendar events.
    What we are asking for is not to control homeseer from the calendar by manually adding something to the calendar.
    We are asking the other way around. We request that the plugin read (speak) what daily actives are already on the calendar in the morning.

    Comment


      #17
      Originally posted by integlikewhoa View Post
      What we are asking for is not to control homeseer from the calendar by manually adding something to the calendar.
      We are asking the other way around. We request that the plugin read (speak) what daily actives are already on the calendar in the morning.
      Sorry, I thought when Mike said "trigger events" he meant trigger Homeseer events. (I never thought i would miss the "clarity" of Vera calling them scenes ).

      Comment


        #18
        @MDA, being such a HS3 nubie sometimes I don't always know what I'm saying as it relates to things HS3 . What I'm trying to duplicate is the following;
        1. at a set time (morning) I would like to collect all of Gcalendar for today's events.
        2. be able to determine if there is nil events, then speak would say "There are no Calendar events scheduled for today.". If there are events collect them and in FIFO order announce the event or various events into a jsonEvents which Google produces. In Vera I was able to check the jsonEvents file for nil or events conditions, I then did a loop routine that dumped the variables into an array that was used within the speak command. I know "this isn't Kansas (Vera) no more!" but I'm hoping that someone has solved this in some form.

        As I meander through the various threads I came upon
        a post dated February 20th, 2017, 11:10 AM by Sireone topic Speak Time? whereas he was using BLData but was using a script below;

        Code:
        Sub Main(parms As Object)
        Dim allEvents As Object()
        Dim Office, source, volume, speaker
        allEvents = hs.PluginFunction("BLGData", "", "GetCalendarEvents", new Object(){"user@domain.com","user@domain.com","Today"})
        
            For Each ev As Object In allEvents
            hs.Speak("{speaker=Office,source=2,volume=60}" & ev.StartTime & ev.Name)
        Next
        End Sub
        Which kind of does something similar but.. I'm not familiar with VB. can someone advise how I might get this to work? I assume that it must be done in the Handler section but am not familiar with the plugin. looking at "user@domain.com" is that somehow my calendar as setup in USER tab what if there is more than one user?
        Computer: CUK Intel NUC7i7BNH
        Op System: Windows10 Pro - Work Station
        HS Version: HS4 Pro Edition 4.2.19.0

        Plug-Ins: AK Weather 4.0.5.25,APCUPSD 3.3.2.3,BLBackup 2.0.63.0,BLEditor 2.0.11.0,BLGData 3.0.55.0,BLOccupied 2.0.28.0,BLShutdown 1.0.6.0,Blue-Iris 3.1.3.33206,Device History 3.2.0.2,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,iRobot 5.22.41.1,JowiHue 4.0.8.7,Nest 3.0.0.34,NetCam Plugin 1.0.0.5,PHLocation2 3.0.0.64,Pushover 4.0.10.0,Random 3.0.0.2,Restart 1.0.0.7,Ring 1.0.0.9,SDJ-Health 3.1.1.3,Sonos 3.1.0.59,Sonos4 4.0.1.12,UltraCID3 3.0.6681.34300,UltraMon3 3.0.6554.33094,UltraNetCam3 3.0.6413.20219,Unifi 4.0.32.0,Zigbee 4.0.11.0,Z-Wave 4.0.3.0, and Jon00 scripts.

        Comment


          #19
          Check out this thread:

          https://forums.homeseer.com/showthread.php?t=173851

          It will show you how to populate a virtual device with all of your events which can then be spoken.


          Code:
          sub Main(ByVal Parms As Object)
          	Dim ParmArray() as String
          	ParmArray = Parms.tostring.split(",")
          	Dim tDevice = ParmArray(0)
          	Dim tWhen = ParmArray(1)
          	Dim tDebug1 = ParmArray(2)
          	Dim tDebug2 = ParmArray(3)
          	Dim allEvents As Object()
                  Dim msg as string = ""
          
                  Dim myemail as string="XXXXXXXX@gmail.com"
          
          	allEvents = hs.PluginFunction("BLGData", "", "GetCalendarEvents", new Object(){myemail,"xxxxxxxxxx@gmail.com",tWhen})
          	For Each ev As Object In allEvents
                  msg = msg & ev.StartTime & " - " & ev.Name & "</br>"
          	Next
                  if msg="" then msg="No Events Scheduled"
                  hs.SetDeviceString(tDevice, msg.Trim, true)
          
          if tDebug1="1" then
                  ' List all Events
                  hs.writelog("BLGData", "Debug Info For BLGData - " & tWhen)
          	allEvents = hs.PluginFunction("BLGData", "", "GetCalendarEvents", new Object(){myemail,"xxxxxxxxxx@gmail.com",tWhen})
          	For Each ev As Object In allEvents
                     hs.writelog("BLGData", "Event: " & ev.StartTime & " - " & ev.Name)
          	Next
          end if
          if tDebug2="1" then
                  ' List All Calenders
                  For Each c As Object In hs.PluginFunction("BLGData", "", "GetCalendarsForUser", new Object(){myemail})
                      hs.writelog("BLGData", "Calendar name is: " & c.Name)
                  Next
          end if
          End Sub
          Just add in your email address, toss this in an event and schedule it to run every morning.

          The parameters are your virtual device number and Today if you just want events for that day listed. For example 237,Today.
          Last edited by S-F; June 17, 2017, 09:39 AM.
          Originally posted by rprade
          There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

          Comment


            #20
            Colin, Many thanxs for post and attached code, I will give it a try this weekend. Mike

            PS you left your gmail address in the tDebug1 statement. I see in tDebug2 there is again "new Object(){myemail})" are we suppose to populate with gmail address? I thought once you make a declaration e.g "Dim myemail as string="XXXXXXXX@gmail.com" that you can use "myemail" alone as you've defined it in the beginning?
            Last edited by MNB; June 17, 2017, 11:52 AM.
            Computer: CUK Intel NUC7i7BNH
            Op System: Windows10 Pro - Work Station
            HS Version: HS4 Pro Edition 4.2.19.0

            Plug-Ins: AK Weather 4.0.5.25,APCUPSD 3.3.2.3,BLBackup 2.0.63.0,BLEditor 2.0.11.0,BLGData 3.0.55.0,BLOccupied 2.0.28.0,BLShutdown 1.0.6.0,Blue-Iris 3.1.3.33206,Device History 3.2.0.2,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,iRobot 5.22.41.1,JowiHue 4.0.8.7,Nest 3.0.0.34,NetCam Plugin 1.0.0.5,PHLocation2 3.0.0.64,Pushover 4.0.10.0,Random 3.0.0.2,Restart 1.0.0.7,Ring 1.0.0.9,SDJ-Health 3.1.1.3,Sonos 3.1.0.59,Sonos4 4.0.1.12,UltraCID3 3.0.6681.34300,UltraMon3 3.0.6554.33094,UltraNetCam3 3.0.6413.20219,Unifi 4.0.32.0,Zigbee 4.0.11.0,Z-Wave 4.0.3.0, and Jon00 scripts.

            Comment


              #21
              Originally posted by MNB View Post
              Collin, Many thanxs for post and attached code, I will give it a try this weekend. Mike

              PS you left your gmail address in the tDebug1 statement. I see in tDebug2 there is again "new Object(){myemail})" are we suppose to populate with gmail address? I thought once you make a declaration e.g "Dim myemail as string="XXXXXXXX@gmail.com" that you can use "myemail" alone as you've defined it in the beginning?

              Gwoops. Thanks for pointing that out!

              As for your question..... No idea whatsoever. I'm not one of those clever coders. I'm one step above your average higher primate. A troglodyte of sorts if you will. Just riding on the coattails of others here.

              Also, please post a video of how you destroy your Vera now that you've come to your senses and moved to HS. I'm a recovering Vera user myself. Not all of the therapy in the world will heal those wounds. I blame Vera for my failed marriage. And my lost hair. And poverty. And inflation. And few other things as well. Not sure if you were on that forum during my tenure there.

              Oh, one more thing. It's Colin. One L.

              Welcome aboard!
              Originally posted by rprade
              There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

              Comment


                #22
                My apologies, I've corrected the miss-spelling . Ok I've created said VB file by coping your example and changing the email address. However when I attempt to execute the event I get the following error in my log;

                Code:
                Jun-17 12:46:43 PM 
                * 
                Error 1 
                Running script C:\Program Files (x86)\HomeSeer HS3\scripts\HS3 GCalendar Events Script II.vb :Exception has been thrown by the target of an invocation.Index was outside the bounds of the array. 
                Jun-17 12:46:42 PM 
                * 
                Event 
                Running script in background: C:/Program Files (x86)/HomeSeer HS3/scripts/HS3 GCalendar Events Script II.vb 
                Jun-17 12:46:42 PM 
                * 
                Event 
                Event Trigger "BLGData BLGData Calendar Events"
                Pray tell what did I not do? Also is there a way to tell if BLData plugin has proper access to my Google Calendar (like an idiot indicator)?

                Colin, I started with VERA since end of 2006 so I would assume that you were still with VERA during the timeframe? Mike
                Computer: CUK Intel NUC7i7BNH
                Op System: Windows10 Pro - Work Station
                HS Version: HS4 Pro Edition 4.2.19.0

                Plug-Ins: AK Weather 4.0.5.25,APCUPSD 3.3.2.3,BLBackup 2.0.63.0,BLEditor 2.0.11.0,BLGData 3.0.55.0,BLOccupied 2.0.28.0,BLShutdown 1.0.6.0,Blue-Iris 3.1.3.33206,Device History 3.2.0.2,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,iRobot 5.22.41.1,JowiHue 4.0.8.7,Nest 3.0.0.34,NetCam Plugin 1.0.0.5,PHLocation2 3.0.0.64,Pushover 4.0.10.0,Random 3.0.0.2,Restart 1.0.0.7,Ring 1.0.0.9,SDJ-Health 3.1.1.3,Sonos 3.1.0.59,Sonos4 4.0.1.12,UltraCID3 3.0.6681.34300,UltraMon3 3.0.6554.33094,UltraNetCam3 3.0.6413.20219,Unifi 4.0.32.0,Zigbee 4.0.11.0,Z-Wave 4.0.3.0, and Jon00 scripts.

                Comment


                  #23
                  To see if BLGdata is working I'd suggest you create a handler to turn some device on with a test calendar event. If the script doesn't see the calendar you get an error stating that it can't find a calendar so that doesn't seem to be the issue. There is some debug options with that script as well but I forget what they do. The parameters are 1 and 2. Just looking a the script should give you some idea of what they're for. Hopefully someone whose a little more script savvy will chime in.

                  Did you create your virtual device? Maybe a dumb question but start at the beginning and all that. Did you define the parameters?

                  Yeah, I was on that forum, spamming the bejesus out of it. Much like my role here on this forum. I believe I was the first poster in the original PLEG thread.
                  Originally posted by rprade
                  There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

                  Comment


                    #24
                    Originally posted by Blade View Post
                    Ah now I see what you are want to do.
                    I have an issue with the plugin right now that I am working on fixing first before I can even think about any feature requests. This one would take some work to pull off
                    Any update on this Blade? Did the first issue with the plugin get handled?

                    Thanks,

                    Comment


                      #25
                      Speaking has not been added as I have been trying to fix a couple of issues first.

                      I hope to get a look at a couple of debug logs to sort through this weekend. You could try the latest build in the updater and let me know
                      Cheers,
                      Bob
                      Web site | Help Desk | Feature Requests | Message Board

                      Comment


                        #26
                        Originally posted by Blade View Post
                        Speaking has not been added as I have been trying to fix a couple of issues first.

                        I hope to get a look at a couple of debug logs to sort through this weekend. You could try the latest build in the updater and let me know
                        My trial has been out for a bit now, I'm sitting out on this one.

                        My only real goal for the plugin was to speak my daily activities in the AM. I did find some work around but it was a bit more then I wanted if the plugin was going to add it. So I but that on the back burner for now.

                        I'll check back in at a later time, if you don't mind.

                        Thanks,

                        Comment


                          #27
                          Originally posted by integlikewhoa View Post
                          My trial has been out for a bit now, I'm sitting out on this one.

                          My only real goal for the plugin was to speak my daily activities in the AM. I did find some work around but it was a bit more then I wanted if the plugin was going to add it. So I but that on the back burner for now.

                          I'll check back in at a later time, if you don't mind.

                          Thanks,
                          This is why I wanted this plugin as well, but I needed it to also work from multiple user's calendars. I don't think it's Blade's fault (maybe the API?) but I could only ever get it to work with 1 user.

                          I might just limit it to household calendar items, but it would be nice if I could call out ones from our personal calendar's as well.

                          Comment


                            #28
                            Originally posted by sirmeili View Post
                            This is why I wanted this plugin as well, but I needed it to also work from multiple user's calendars. I don't think it's Blade's fault (maybe the API?) but I could only ever get it to work with 1 user.

                            I might just limit it to household calendar items, but it would be nice if I could call out ones from our personal calendar's as well.
                            Ouch I would also need that. Under my google I have like 5-6 calanders for work, kids school, kids sports and few others.

                            My wife has her personal, work and such also.

                            Comment


                              #29
                              @integlikewhoa, you can have multiple calendars, but I've never gotten multiple Google accounts to work. My wife and I have our personal Google accounts then we have a family Google account.

                              Sent from my XT1585 using Tapatalk

                              Comment


                                #30
                                Originally posted by sirmeili View Post
                                @integlikewhoa, you can have multiple calendars, but I've never gotten multiple Google accounts to work. My wife and I have our personal Google accounts then we have a family Google account.

                                Sent from my XT1585 using Tapatalk

                                I got that, but I would need two (mine and wife's) gmail account.

                                Comment

                                Working...
                                X