Announcement

Collapse
No announcement yet.

Event listing in a HS Device?

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

    #16
    Originally posted by S-F View Post
    So I'm assuming that 310 is the virtual device the script writes to, but what are Today, 1 and 0? And I'm assuming that all I need to do to the script is change "YOUREMAIL@gmail.com" to my email address?
    Within the script, just change the "Youremail" to your Google email. Set the parameters within the HS Event and you should be good to go.

    310 is the device ref code.

    Today will give you a listing of Today's events, could also use any date 4/29/2015 for an example.

    The next two are for debuging, 1 for on, 0 for off. The first one will put the event list to the HS log. The second will give a list of your calendars to the HS log.
    Bryan
    Software/Hardware: Win10 Pro, HS 3 Pro, HS Touch, Echo, Edgeport/4, Z-Net w/88 Devices, Insteon PLM w/19 Devices, Nest, GC-100-6, W800RF32A, WS-2080 Weather Station (KMADRACU10)
    Plug-in/Scripts: Alexa API, BLBackup, BLGData, BLLED, BLLock, BLRF, BLTVGuide, Blue Iris, BLUPS, Current Cost 3P, DirectTV, FitbitSeer, Insteon, Nest, Pushover 3P, Random, Restart, Tasker, UltraGCIR3, UltraWeatherWU, Z-Wave

    Comment


      #17
      It would appear that I'm doing something wrong. My virtual device just says "No Events Scheduled" but there are indeed events scheduled for today and I can see them in the plugin.
      Where am I going wrong?

      EDIT:

      Yeah, my calendar isn't called "Our Calendar". I fixed that and now it's working. Time to test TTS!
      Attached Files
      Last edited by S-F; April 28, 2015, 08:00 AM.
      Originally posted by rprade
      There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

      Comment


        #18
        Originally posted by S-F View Post
        It would appear that I'm doing something wrong. My virtual device just says "No Events Scheduled" but there are indeed events scheduled for today and I can see them in the plugin.
        Where am I going wrong?

        EDIT:

        Yeah, my calendar isn't called "Our Calendar". I fixed that and now it's working. Time to test TTS!
        Yup, forgot about that...can you tell I'm not a programmer! Everything in this script is pulled from something/somewhere else and just edited to my need. Glad you got it working.
        Bryan
        Software/Hardware: Win10 Pro, HS 3 Pro, HS Touch, Echo, Edgeport/4, Z-Net w/88 Devices, Insteon PLM w/19 Devices, Nest, GC-100-6, W800RF32A, WS-2080 Weather Station (KMADRACU10)
        Plug-in/Scripts: Alexa API, BLBackup, BLGData, BLLED, BLLock, BLRF, BLTVGuide, Blue Iris, BLUPS, Current Cost 3P, DirectTV, FitbitSeer, Insteon, Nest, Pushover 3P, Random, Restart, Tasker, UltraGCIR3, UltraWeatherWU, Z-Wave

        Comment


          #19
          Try out 2.0.17 in the updater

          I have added a new scripting call (GetCalendarEventsForXDays)

          See the help for details on the call.
          Cheers,
          Bob
          Web site | Help Desk | Feature Requests | Message Board

          Comment


            #20
            Ok been trying to use the new code and this is what I'm getting...

            In the picture the TOP part is the old code and the BOTTOM part is the new code for 1 day (same day).

            This is the code I'm using with the new function:
            PHP Code:
            sub Main(ByVal Parms As Object)
                
            Dim ParmArray() as String
                ParmArray 
            Parms.tostring.split(",")
                
            Dim tDevice ParmArray(0)
                
            Dim tCalendar ParmArray(1)
                
            Dim allEvents As Object()
                    
            Dim myemail as string="bptworld@gmail.com"
                    
            Dim msg as string ""

                    
            allEvents hs.PluginFunction("BLGData""""GetCalendarEventsForXDays", new Object(){myemail,tCalendar,1})
                For 
            Each ev As Object In allEvents
                       msg 
            msg ev.StartDate " " ev.StartTime " - " ev.Name "</br>"
                
            Next
                    
            if msg="" then msg="No Events Scheduled"
                    
            hs.SetDeviceString(tDevicemsg.Trimtrue)
            End Sub 
            Attached Files
            Bryan
            Software/Hardware: Win10 Pro, HS 3 Pro, HS Touch, Echo, Edgeport/4, Z-Net w/88 Devices, Insteon PLM w/19 Devices, Nest, GC-100-6, W800RF32A, WS-2080 Weather Station (KMADRACU10)
            Plug-in/Scripts: Alexa API, BLBackup, BLGData, BLLED, BLLock, BLRF, BLTVGuide, Blue Iris, BLUPS, Current Cost 3P, DirectTV, FitbitSeer, Insteon, Nest, Pushover 3P, Random, Restart, Tasker, UltraGCIR3, UltraWeatherWU, Z-Wave

            Comment


              #21
              When you use 1 day in the call it will use the current day plus the next day
              If you just want the current day try using 0
              Cheers,
              Bob
              Web site | Help Desk | Feature Requests | Message Board

              Comment


                #22
                Originally posted by Blade View Post
                When you use 1 day in the call it will use the current day plus the next day
                If you just want the current day try using 0
                Same output, all that comes out is 3 lines of the same event instead of 3 different events as shown in my last post. Doesn't matter the day or how many days. The screenshot below shows the next 5 days. Notice it only duplicates the first event for each day, instead of showing different events for each day as it should.
                Attached Files
                Bryan
                Software/Hardware: Win10 Pro, HS 3 Pro, HS Touch, Echo, Edgeport/4, Z-Net w/88 Devices, Insteon PLM w/19 Devices, Nest, GC-100-6, W800RF32A, WS-2080 Weather Station (KMADRACU10)
                Plug-in/Scripts: Alexa API, BLBackup, BLGData, BLLED, BLLock, BLRF, BLTVGuide, Blue Iris, BLUPS, Current Cost 3P, DirectTV, FitbitSeer, Insteon, Nest, Pushover 3P, Random, Restart, Tasker, UltraGCIR3, UltraWeatherWU, Z-Wave

                Comment


                  #23
                  Can you capture a debug of you running the script call and attach it zipped
                  Cheers,
                  Bob
                  Web site | Help Desk | Feature Requests | Message Board

                  Comment


                    #24
                    Here you go...
                    Last edited by TechHA; April 30, 2015, 07:43 AM.
                    Bryan
                    Software/Hardware: Win10 Pro, HS 3 Pro, HS Touch, Echo, Edgeport/4, Z-Net w/88 Devices, Insteon PLM w/19 Devices, Nest, GC-100-6, W800RF32A, WS-2080 Weather Station (KMADRACU10)
                    Plug-in/Scripts: Alexa API, BLBackup, BLGData, BLLED, BLLock, BLRF, BLTVGuide, Blue Iris, BLUPS, Current Cost 3P, DirectTV, FitbitSeer, Insteon, Nest, Pushover 3P, Random, Restart, Tasker, UltraGCIR3, UltraWeatherWU, Z-Wave

                    Comment


                      #25
                      It shows as attachment.php when I try to open it.
                      Maybe it is an issue here at work. I will check it out once I get home
                      Cheers,
                      Bob
                      Web site | Help Desk | Feature Requests | Message Board

                      Comment


                        #26
                        Ok, thanks Bob

                        I just downloaded it here and it unzipped to a .log file just fine so that's probably it.
                        Bryan
                        Software/Hardware: Win10 Pro, HS 3 Pro, HS Touch, Echo, Edgeport/4, Z-Net w/88 Devices, Insteon PLM w/19 Devices, Nest, GC-100-6, W800RF32A, WS-2080 Weather Station (KMADRACU10)
                        Plug-in/Scripts: Alexa API, BLBackup, BLGData, BLLED, BLLock, BLRF, BLTVGuide, Blue Iris, BLUPS, Current Cost 3P, DirectTV, FitbitSeer, Insteon, Nest, Pushover 3P, Random, Restart, Tasker, UltraGCIR3, UltraWeatherWU, Z-Wave

                        Comment


                          #27
                          Try 2.0.18 in the HS3 updater and let me know
                          If you have an issue post another debug log zipped
                          Cheers,
                          Bob
                          Web site | Help Desk | Feature Requests | Message Board

                          Comment


                            #28
                            Sorry Bob, no difference. Still just repeats the first event.

                            Log attached.
                            Last edited by TechHA; April 30, 2015, 07:42 AM.
                            Bryan
                            Software/Hardware: Win10 Pro, HS 3 Pro, HS Touch, Echo, Edgeport/4, Z-Net w/88 Devices, Insteon PLM w/19 Devices, Nest, GC-100-6, W800RF32A, WS-2080 Weather Station (KMADRACU10)
                            Plug-in/Scripts: Alexa API, BLBackup, BLGData, BLLED, BLLock, BLRF, BLTVGuide, Blue Iris, BLUPS, Current Cost 3P, DirectTV, FitbitSeer, Insteon, Nest, Pushover 3P, Random, Restart, Tasker, UltraGCIR3, UltraWeatherWU, Z-Wave

                            Comment


                              #29
                              Try 2.0.19 and let me know
                              Cheers,
                              Bob
                              Web site | Help Desk | Feature Requests | Message Board

                              Comment


                                #30
                                OK, we are over 1 hurdle! Events are now showing up, thank you.

                                They still are not in order by time of day though. Makes it hard to follow. Any ideas on that one?

                                .
                                Attached Files
                                Bryan
                                Software/Hardware: Win10 Pro, HS 3 Pro, HS Touch, Echo, Edgeport/4, Z-Net w/88 Devices, Insteon PLM w/19 Devices, Nest, GC-100-6, W800RF32A, WS-2080 Weather Station (KMADRACU10)
                                Plug-in/Scripts: Alexa API, BLBackup, BLGData, BLLED, BLLock, BLRF, BLTVGuide, Blue Iris, BLUPS, Current Cost 3P, DirectTV, FitbitSeer, Insteon, Nest, Pushover 3P, Random, Restart, Tasker, UltraGCIR3, UltraWeatherWU, Z-Wave

                                Comment

                                Working...
                                X