Announcement

Collapse
No announcement yet.

Script to list events that have script actions - Discussion Thread

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

    #31
    Thanks.. yeah seems odd as my HS3 folder is very clean since I migrated less than a year ago with a fresh install. I have had no other problems and my system runs very well. My system is on Windows 2003 server however. So unless there's a path related problem - using C:\Program Files\HomeSeer HS3 I can't see why it doesn't work.

    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


      #32
      Originally posted by sparkman View Post
      Hi Robert, it fails during the compile, so never executes. Whether debug is on or off is stored in scriptevents.ini for the aspx page. You could manually create it before it runs, but I don't believe it will help given that it fails during compile, not while running. Here's the default contents of it.

      Code:
      [Settings]
      Debug=False
      ShowScriptPath=False
      ScriptsPath1=C:/Program Files (x86)/HomeSeer HS3/scripts/
      ScriptsPath2=C:/program files (x86)/homeseer hs3/scripts/
      HS3DataFile=HomeSeerData.hsd
      I have no idea why Sqlite is automatically included on my system, but not yours. Still searching for a way. I haven't heard of anyone else having the same issue nor have I heard of anyone else running it successfully. Any others having the same issue or is it working for you?

      Cheers
      Al
      Since you asked, I'm having exactly the same issue. Runs as an event, not as a ASPX page. I also have Jon00s charting working, and that also uses SQLite. I also have a few events which call my scripts that write to my own SQLite DB.

      My observation is that it works from the script side, and in ASPX pages with a CodeBehind VB pages where the SQL is in the VB files, but not in ASPX only pages, even with the import namespace directive. I've also tried adding a reference to the SQLite namespace in HS web.config file with luck. For some reason the ASPX page can't resolve the namespace. Not sure why.

      I was hoping to give it a few more days to see if anyone can find a resolution, after that I was going to try and split your code into an ASPX and codebehind VB file when I get time.

      Comment


        #33
        Originally posted by jhirschhorn View Post
        Since you asked, I'm having exactly the same issue. Runs as an event, not as a ASPX page. I also have Jon00s charting working, and that also uses SQLite. I also have a few events which call my scripts that write to my own SQLite DB.

        My observation is that it works from the script side, and in ASPX pages with a CodeBehind VB pages where the SQL is in the VB files, but not in ASPX only pages, even with the import namespace directive. I've also tried adding a reference to the SQLite namespace in HS web.config file with luck. For some reason the ASPX page can't resolve the namespace. Not sure why.

        I was hoping to give it a few more days to see if anyone can find a resolution, after that I was going to try and split your code into an ASPX and codebehind VB file when I get time.
        Thanks for letting me know. Not sure why it works on my system then. If I remove the import for the Sqlite namespace, I get the same error as you guys, so in my case HS is including it in the compile. I'll see if I can split the code and just reference the function in the vb file that I have.

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

        Comment


          #34
          @langenet and @jhirschhorn

          Attached is a version that uses the script file for the SQLite portion. Can you try it out. Remove the .txt extension and drop the .vb file in the Scripts folder and the .aspx file in the html folder and then open the .aspx file. Let me know if that works for you.

          Cheers
          Al
          Last edited by sparkman; February 11, 2017, 02:45 AM. Reason: Test files removed. Will be moved to main thread.
          HS 4.2.8.0: 2134 Devices 1252 Events
          Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

          Comment


            #35
            Sparkman,
            This new version works perfectly. Awesome job.

            Thanks.

            Comment


              #36
              Thanks Al. Works great now. Much appreciated!

              Another great tool!

              Awesome!!!

              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


                #37
                Originally posted by jhirschhorn View Post
                Sparkman,
                This new version works perfectly. Awesome job.

                Thanks.
                Originally posted by langenet View Post
                Thanks Al. Works great now. Much appreciated!

                Another great tool!

                Awesome!!!

                Robert
                Thanks gentlemen, glad it's working for you. I will move the files to the main post.

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

                Comment


                  #38
                  New version available

                  Hi all,

                  A new version has been posted here: https://forums.homeseer.com/showthre...44#post1291644. This version no longer creates static reports, only dynamic reports generated through a web page. There is now also an option to generate the report in the standard HS3 table format or the simple format that was available in prior versions.

                  Please provide feedback, questions, etc. in this thread.

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

                  Comment


                    #39
                    New version has been posted with various enhancements and a few bug fixes. The enhancements include updating the Scripting References automatically if needed, and that it now also generates a report with events with Immediate Script Actions. Just overwrite the previous version with the new one.

                    Cheers
                    Al

                    Click image for larger version

Name:	Capture4.PNG
Views:	2
Size:	51.0 KB
ID:	1188905
                    HS 4.2.8.0: 2134 Devices 1252 Events
                    Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                    Comment


                      #40
                      Thanks Al for this. It's a nice tool to help manage the inventory of events with.

                      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


                        #41
                        Hi Don,

                        Here's a quick script.

                        Code:
                        Sub Main(ByVal Parms As object)
                        
                        	Dim logName As String = "Event List"
                        	Dim Debug As String = True
                        
                        	Dim EventArray() As strEventData = hs.Event_Info_All() 
                        	If Debug Then hs.writelog(logName, CStr(EventArray.GetUpperBound(0)) & " Events Found")
                        
                        	For i As Integer = 0 To EventArray.getupperbound(0) - 1
                        		If Debug Then hs.writelog(logName, EventArray(i).GroupName & " - " & EventArray(i).Event_Name)
                        	Next
                        
                        End Sub
                        Cheers
                        Al
                        HS 4.2.8.0: 2134 Devices 1252 Events
                        Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                        Comment


                          #42
                          Thanks!
                          Don

                          Comment


                            #43
                            Will this work on Linux?

                            Comment


                              #44
                              Originally posted by larhedse View Post
                              Will this work on Linux?
                              Not 100% sure. I don’t know if anyone else is running it on linux. Please give it a try and let me know if you run into any issues.
                              HS 4.2.8.0: 2134 Devices 1252 Events
                              Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                              Comment


                                #45
                                I’ll give it a try this week , on Linux

                                Comment

                                Working...
                                X