Announcement

Collapse
No announcement yet.

Event listing in a HS Device?

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

    #46
    Colin, many thanxs for thread it definitely provided better insight along with examples, however it did not answer my question. When you look at Pierre image examples you noticed that he used color to differentiate his various virtual devices. Also I was wondering how he was able to pull holidays, all day events.

    Jim, glad to see you again. I have yet to get your version to work however I was able to get the following to work it uses two parameters within the event parameter field they are; Virtual device ID and GCalendar name

    Code:
    sub*Main(ByVal*Parms*As*Object) 
    ****Dim*ParmArray()*as*String 
    ****ParmArray*=*Parms.tostring.split(",") 
    ****Dim*tDevice*=*ParmArray(0) 
    ****Dim*tCalendar*=*ParmArray(1)
        Dim tDays = cint(ParmArray(2))
    ****Dim*allEvents*As*Object() 
    ********Dim*myemail*as*string="Michael_n_blackwell@msn.com" 
    ********Dim*msg*as*string*=*"" 
    
    ********allEvents*=*hs.PluginFunction("BLGData",*"",*"GetCalendarEventsForXDays",*new*Object(){myemail,tCalendar,tDays}) 
    ****For*Each*ev*As*Object*In*allEvents 
    ***********msg*=*msg*&*"<br>" & ev.StartDate*&*"*"*&*ev.StartTime*&*"*-*"*&*ev.Name*&*"</br>" 
    ****Next 
    ********if*msg=""*then*msg="No*Events*Scheduled" 
    ********hs.SetDeviceString(tDevice,*msg.Trim,*true) 
    End*Sub
    Belay my last, I've just updated the code and now the parameters will take; Device ID,GCalendar Name,# Days. Mike

    I'm not sure why my code paste has "*" for spaces?
    Last edited by MNB; June 19, 2017, 06:55 PM.
    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


      #47
      I'm just working on trying to get it organized to speak better then what I have. I don't like the military time and don't like speaking the date as I'm only doing one day at a time and know it should be for today.

      Comment


        #48
        Jim, If you get rid of "ev.StartDate" that should remove any date from the text string. How are you getting the virtual device to speak?

        Talking about speak function does anyone have a link (similar to virtual device settings provided earlier) with examples and explanations differences between Speak vs SONO speak?
        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


          #49
          Originally posted by MNB View Post
          How are you getting the virtual device to speak?

          Talking about speak function does anyone have a link (similar to virtual device settings provided earlier) with examples and explanations differences between Speak vs SONO speak?
          I'm speaking the string by the address in an event. I set the address of my virtual device to "custom" (anything you want can be used) and then uses that in the event.
          I'm sure you can use a full script to speak sonos also but this works. Have my sonos speakers of ALL setup at the moment and only a manual run for testing purposes in the event at this time.
          Attached Files

          Comment


            #50
            Originally posted by MNB View Post
            Jim, If you get rid of "ev.StartDate" that should remove any date from the text string.
            Yes, very easy not sure why I didn't think of that. That problem solved. Now the 24 hour time vs. AM/PM is my next hurdle. Also I found multiple events runs together to much. I need to add a pause period or something to the end of each event to give TTS a breath between each one. I'm aussuming I can add a period or the like in the same place I remove the ev. StartDate string?

            EDIT: Got a period put in at the end of each event now by adding a
            "." &
            in the mix at the end. So that should help with reading. Now just the 24h time reading.
            Last edited by integlikewhoa; June 20, 2017, 11:36 AM.

            Comment


              #51
              Jim, "U Da Man!" that works great.

              Now for part II, If I wanted to string together 1) weather announcement along with 2) the calendar announcement along with 3) speaking some informational text in between, how would that be done?
              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


                #52
                Originally posted by MNB View Post
                Jim, "U Da Man!" that works great.

                Now for part II, If I wanted to string together 1) weather announcement along with 2) the calendar announcement along with 3) speaking some informational text in between, how would that be done?
                Well in the same event you can due multiple actions. I would just make the next action speak the next task. You need to check the box wait until the first is done speaking, so it doesn't over run each other.

                Comment


                  #53
                  Whilst waiting for your response I happen on another thread re BLSpeech that seems to run on scripts that address GlobalVar which seems to be doing what I was trying to do. Mike

                  Originally posted by Jobee View Post
                  Hi Bob,

                  I noticed over the last week that my triggers are firing once, but the speech is happening twice. I have a trigger when the front door opens to greet. It has started doubling and sometimes gives 3 greetings. The log shows firing once but the activity log in BLSpeech shows twice.


                  Jun-04 14:41:14 EnvisaLinkAdemco INFO Z03 Front Door status change: Closed
                  Jun-04 14:41:14 EnvisaLinkAdemco INFO Partition 1 status change: Ready
                  Jun-04 14:40:55 TTS Speak: (SPEAKEFAULT):Good afternoon. It is currently 2:40 PM and 78.3 degrees.
                  Jun-04 14:40:49 EnvisaLinkAdemco INFO Z08 Sitting Room Motion status change: Opened
                  Jun-04 14:40:49 EnvisaLinkAdemco INFO Z07 Living Room Motion status change: Opened
                  Jun-04 14:40:49 EnvisaLinkAdemco INFO Z03 Front Door status change: Opened
                  Jun-04 14:40:49 Event Event Trigger "Announcements Greeting when Front Door Opens"


                  6/4/2017 2:40:56 PM 0 {priority=normal,speaker=Living Room,volume=50,source=3,queue=queue}Good afternoon. It is currently 2:40 PM and 78.3 degrees. Yes SPEAKEFAULT Normal Normal Queue No
                  6/4/2017 2:40:41 PM 0 {priority=normal,speaker=Living Room,volume=50,source=3,queue=queue}Good afternoon. It is currently 2:40 PM and 78.3 degrees. Yes SPEAKEFAULT Normal Normal Queue No

                  What do you need from me? Debug log?

                  I have always had the option in the event set to do not repeat for 20 seconds because it would always repeat until the door shows closed. In the example above, the door closed at 14:41:14 but the speech activity shows 40:41 and again 40:56. This is less than the 20 seconds so it should not have repeated.
                  Since there is no second trigger to make it speak again in the log, I assume there is an issue within BLSpeech that is making it speak again.

                  Thanks,

                  Michael

                  I am using .66 version of BLSpeech
                  .
                  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


                    #54
                    Does the script still work to show calendar events in HStouch? Thinking of trying this out.
                    *****

                    Nevermind. I tried it out and got it working.Took me a while to figure out that in the Parameters settings should be this. VirtualdeviceRef#,Yourcalendarname,#ofdays


                    Going to have to work on the formatting a little but I like this very much. I was going to use RSS but Google has discontinued RSS feed for the Calendar. I probably be buying the plugin this weekend.
                    I'm building my custom HStouch now starting with the main screen which will have a list of calendar event.

                    Thanks for this script.
                    Last edited by wolf382; July 6, 2017, 08:03 PM.

                    Comment


                      #55
                      I'm trying to get this to work but keep getting this error in the log "GetCalendarEventsForXDays(): Calendar: Leon does not exist for user in the plug-in" as you can see user does exist. Any idea what I did wrong?

                      Click image for larger version

Name:	Untitled.jpg
Views:	75
Size:	24.0 KB
ID:	1253218

                      Comment


                        #56
                        Turn on debug logging on the options page, then run the calendars link and capture the issue
                        Turn off debug logging and then attach the BLGData-Detailed.log zipped
                        It is in the HS3 root folder

                        Cheers,
                        Bob
                        Web site | Help Desk | Feature Requests | Message Board

                        Comment


                          #57
                          By run calendars link do you mean run the script? If so see attached.
                          Attached Files

                          Comment


                            #58
                            You need to update your debug logging
                            Make the changes in this thread and then delete the debug log and generate it again with the same steps

                            https://forums.homeseer.com/forum/3r...-debug-logging

                            Cheers,
                            Bob
                            Web site | Help Desk | Feature Requests | Message Board

                            Comment


                              #59
                              Here you go.
                              Attached Files

                              Comment


                                #60
                                OK I see this error in the log

                                10-14-2018 09:22:44:876 PM : v3.0.27.0 - CalendarFunctions.Get_All_Calendars_For_User(): ERROR - Caught this exception - Google.Apis.Requests.RequestError
                                Login Required [401]
                                Errors [
                                Message[Login Required] Location[Authorization - header] Reason[required] Domain[global]
                                ]

                                Go into your [HS3 root]\Data\BLGData\BLGData-Leon folder and delete the files in there
                                Then select your calendars again and it should force you to authenticate again
                                Cheers,
                                Bob
                                Web site | Help Desk | Feature Requests | Message Board

                                Comment

                                Working...
                                X