Announcement

Collapse
No announcement yet.

Script to list events that have script actions - Discussion Thread

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

    Script to list events that have script actions - Discussion Thread

    Please use this thread for comments, questions, etc. for the script posted here: https://forums.homeseer.com/showthread.php?t=187187.
    Last edited by sparkman; February 8, 2017, 09:55 AM.
    HS 4.2.8.0: 2134 Devices 1252 Events
    Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

    #2
    Al,

    Again, seriously, why don't you just setup my system for me? I was just starting to run into similar as I tested out various parts of my updateEvent master script.

    Now, I can just run your good stuff and be happy - yet again!

    --Dan
    Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

    Comment


      #3
      Originally posted by drozwood90 View Post
      Al,

      Again, seriously, why don't you just setup my system for me? I was just starting to run into similar as I tested out various parts of my updateEvent master script.

      Now, I can just run your good stuff and be happy - yet again!

      --Dan
      Hi Dan,

      No problem, just sent it over along with some (a lot of) beer and I'll have it ready in a few months

      Cheers
      Al
      HS 4.2.8.0: 2134 Devices 1252 Events
      Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

      Comment


        #4
        One thing that I have noticed on my Windows system is that most scripts are referenced using the path with this capitalization:

        Code:
        C:/Program Files (x86)/HomeSeer HS3/scripts/
        However, some events seem to use this path:

        Code:
        C:/program files (x86)/homeseer hs3/scripts/
        I had about 7 or 8 with the second one and hundreds with the first one.

        To catch all scripts/events, you would need to run the script twice modifying the ScriptsPath variable. I'll see if I can update the script to take both scenarios into account automatically. Would be interesting to know what other people are seeing for paths to their scripts in events.

        Cheers
        Al
        HS 4.2.8.0: 2134 Devices 1252 Events
        Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

        Comment


          #5
          Hi Al;

          Can't seem to get this script to run on my system. I changed the path for the scripts files to reflect my directory, added the reference for the needed dll in the system.ini file but I'm getting this error in my log.

          PHP Code:
          Syntax error.
          Feb-07 11:59:48 AM         Error    Compiling script EventswithScripts.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn'use any aliases
          I assume this issue is due to me hosing the System.Data.SQLite.dll path, but I can't see where I screwed up. In my setup HomeSeer sits in the C:\Homeseer HS3 directory.

          Any suggestions?

          Thanks
          Don

          Comment


            #6
            Hi Don,

            Can you post that line from your ini file? Can you also confirm that there's a System.Data.SQLite.dll in your Bin folder?

            Cheers
            Al
            Last edited by sparkman; February 7, 2017, 03:55 PM.
            HS 4.2.8.0: 2134 Devices 1252 Events
            Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

            Comment


              #7
              Sure.

              PHP Code:
              ScriptingReferences=DDay.iCal;DDay.iCal.dll,DDay.Collections;DDay.Collections.dll,antlr.runtime;antlr.runtime.dll,System.Data.SQLite;C:\HomeSeer HS3\Bin\System.Data.SQLite.dll 
              I did verify that the System.Data.SQLite.dll is in the \bin directory.
              Last edited by donstephens; February 7, 2017, 04:09 PM.
              Don

              Comment


                #8
                Originally posted by donstephens View Post
                Sure.

                PHP Code:
                ScriptingReferences=DDay.iCal;DDay.iCal.dll,DDay.Collections;DDay.Collections.dll,antlr.runtime;antlr.runtime.dll,System.Data.SQLite;C:\HomeSeer HS3\Bin\System.Data.SQLite.dll 
                I did verify that the System.Data.SQLite.dll is in the \bin directory.
                Hi Don, all looks good there. The other Imports should not require mods to the ScriptingReferences, so not sure what is going on. Can you set the Debug variable to True in the Main Sub as well as the one in the EventsWithScripts function? It likely may not tell us more if it fails to compile all together. If that doesn't tell us anything, I'll create a simpler test script to see if we can pinpoint the issue. Also, can you confirm the name of your HS data file?

                Cheers
                Al
                HS 4.2.8.0: 2134 Devices 1252 Events
                Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                Comment


                  #9
                  First, thanks for all the help.

                  I realized that I had renamed the data file to LostHorse.hsd. So I blew it there. I redid the statement to reflect the correct name of my file to
                  PHP Code:
                  Dim HS3DataFile As String "LostHorse.hsd" 
                  . Still getting the error. If you'd like I can start commenting out blocks of code to try and isolate the issue.


                  Originally posted by sparkman View Post
                  Hi Don, all looks good there. The other Imports should not require mods to the ScriptingReferences, so not sure what is going on. Can you set the Debug variable to True in the Main Sub as well as the one in the EventsWithScripts function? It likely may not tell us more if it fails to compile all together. If that doesn't tell us anything, I'll create a simpler test script to see if we can pinpoint the issue. Also, can you confirm the name of your HS data file?

                  Cheers
                  Al
                  Don

                  Comment


                    #10
                    Originally posted by donstephens View Post
                    If you'd like I can start commenting out blocks of code to try and isolate the issue.
                    Hi Don,

                    That would be great if you could do that.

                    Thanks
                    Al
                    HS 4.2.8.0: 2134 Devices 1252 Events
                    Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                    Comment


                      #11
                      Well; this is embarrassing. I had put a comment in while trying to troubleshoot the script and, well nevermind. It works now. I think putting the wrong data file name broke it and when I was trying to fix it, I really broke it, so I didn't notice that it was working.... Very red faced here.

                      Thanks

                      Originally posted by sparkman View Post
                      Hi Don,

                      That would be great if you could do that.

                      Thanks
                      Al
                      Don

                      Comment


                        #12
                        Originally posted by donstephens View Post
                        Well; this is embarrassing. I had put a comment in while trying to troubleshoot the script and, well nevermind. It works now. I think putting the wrong data file name broke it and when I was trying to fix it, I really broke it, so I didn't notice that it was working.... Very red faced here.

                        Thanks
                        LOL. Trust me, I've done that many times myself too Glad it's now working for you.

                        Cheers
                        Al
                        HS 4.2.8.0: 2134 Devices 1252 Events
                        Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                        Comment


                          #13
                          Posted version 0.0.6 which now searches two paths with different cases at the same time.

                          Cheers
                          Al
                          HS 4.2.8.0: 2134 Devices 1252 Events
                          Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                          Comment


                            #14
                            An aspx version is now available to build the reports on the fly. Here are some screenshots:

                            Click image for larger version

Name:	Capture3.PNG
Views:	1
Size:	39.9 KB
ID:	1188862

                            Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	33.7 KB
ID:	1188863

                            Click image for larger version

Name:	Capture2.jpg
Views:	1
Size:	54.7 KB
ID:	1188864

                            Cheers
                            Al
                            HS 4.2.8.0: 2134 Devices 1252 Events
                            Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                            Comment


                              #15
                              This is super great Al. Though, I did try it and edited into the aspx file my hsd filename and path to SQLite but get the following error.

                              Line 47:
                              Line 48: 'Declare the main SQLite data access objects
                              Line 49: Dim cnn As SQLiteConnection = Nothing
                              Line 50: Dim comm As SQLiteCommand = Nothing
                              Line 51: Dim rdr As SQLiteDataReader = Nothing


                              Source File: C:\Program Files\HomeSeer HS3\html\scriptevents.aspx Line: 49


                              I've added the following reference to settings.ini
                              System.Data.SQLite;C:\Program Files\HomeSeer HS3\Bin\System.Data.SQLite.dll

                              Robert
                              HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

                              Comment

                              Working...
                              X