Announcement

Collapse
No announcement yet.

Print a Device Inventory Report?

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

  • Print a Device Inventory Report?

    Is there a way to print out a report of all devices, with their device names, locations, and addresses? I seem to vaguely recall this was possible with HS2...


    Jim Speiser
    30-year veteran of Home Automation
    Still don't know squat

  • #2
    Originally posted by JimSpy View Post
    Is there a way to print out a report of all devices, with their device names, locations, and addresses? I seem to vaguely recall this was possible with HS2...
    There isn't a way within HomeSeer,but I have printed all of mine to a PDF from the Device Manager page in a browser. Unhide devices and "Show All" first.
    Randy Prade
    Aurora, CO
    Prades.net

    PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

    Comment


    • #3
      Originally posted by rprade View Post
      There isn't a way within HomeSeer,but I have printed all of mine to a PDF from the Device Manager page in a browser. Unhide devices and "Show All" first.
      Crude and inelegant...but will suffice for now. Thanks.


      Jim Speiser
      30-year veteran of Home Automation
      Still don't know squat

      Comment


      • #4
        I use this script. It's crude but it works. Just change the device range and the output path if necessary and run it from an event.

        Cheers, Scott

        *************************************************
        Public Sub Main(ByVal Parm As Object)
        Dim x, DeviceName

        Dim CSVFile As String = "c:\temp\Devices.csv"
        If System.IO.File.Exists(CSVFile) = True Then
        System.IO.File.Delete(CSVFile)
        End If

        System.IO.File.CreateText(CSVFile).Dispose()
        Dim objWriter As New System.IO.StreamWriter(CSVFile)
        For x = 1 To 1500
        If hs.DeviceExistsRef(x) Then
        DeviceName = hs.DeviceName(x) & "," & x
        objWriter.WriteLine(DeviceName)
        End If
        Next

        objWriter.Close()
        'MsgBox("Devices written to " & CSVFile)

        End Sub

        ******************************************

        Comment


        • #5
          Nice Scott, Thank you!


          Sent from my iPhone
          Tom
          baby steps...starting again with HS3
          HS3Pro: Z-NET & 80 Z wave Devices,
          HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
          Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
          In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
          System: XP on Fanless Mini-ITX w/ SSD

          Comment


          • #6
            I have something similar to my event list page for devices which I have never published.

            You can sort Ascending/Descending for any column and clicking on the name link opens up the device in Homeseer for editing/deletion etc.

            It is now available on my site. Details here.

            .
            Attached Files
            Last edited by jon00; December 7th, 2015, 06:08 PM.
            Jon

            Comment


            • #7
              Here's a script I use. It generates a csv file in the HS2 Config folder that you can open in Excel and manipulate as you want.

              Code:
              Sub Main(ByVal Params As Object)
              
                      Dim strFileName As String
                      Dim objEnum As Scheduler.clsDeviceEnumeration
                      Dim objDevice As Scheduler.Classes.DeviceClass
                      Dim strDevice As String
                      Dim strApPath As String
                      Dim strDString As String
                      Dim strListItem As String
                      Dim intStatus As Integer
                      Dim intValue As Integer
              
              
                      ' Find the current path and define a file name
                      strApPath = hs.GetAppPath() & "\Config\"
                      strFileName = strApPath & "DeviceProp.csv"
              
                      ' Create an output ASCII text file.  If it already exists, overwrite current contents.
                      Dim FS As New System.IO.FileStream(strFileName, System.IO.FileMode.Create, System.IO.FileAccess.Write)
              
                      Dim sWriter As New System.IO.StreamWriter(FS)
              
                      ' Time stamp the file
                      sWriter.WriteLine("HomeSeer Devices - " & Now)
              
                      ' Create a header row
                      sWriter.WriteLine("Code" & "," & "Location" & "," & "Name" & "," & "Status" & "," & "Value" & "," & "String")
              
                      ' Get a list of all HS devices
                      objEnum = CType(hs.GetDeviceEnumerator, Scheduler.clsDeviceEnumeration)
              
                      ' Retrieve data for each HS device and write it to the file
                      Do While Not objEnum.Finished
              
                          objDevice = objEnum.GetNext
              
                          strDevice = objDevice.hc & objDevice.dc  ' Device code
                          intStatus = hs.DeviceStatus(strDevice)
                          intValue = hs.DeviceValue(strDevice)
                          strDString = hs.DeviceString(strDevice)
              
                          strListItem = strDevice & "," & objDevice.location & "," & objDevice.Name & "," & CStr(intStatus) & "," & CStr(intValue) & "," & strDString
              
                          sWriter.WriteLine(strListItem)
              
                      Loop
              
                      ' Close the file
                      sWriter.Close()
                  End Sub
              Mike____________________________________________________________ __________________
              HS3 Pro Edition 3.0.0.548

              HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF, Rain8Net+ | RFXCOM | QSE100D | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3

              Comment


              • #8
                Originally posted by Uncle Michael View Post
                Here's a script I use. It generates a csv file in the HS2 Config folder that you can open in Excel and manipulate as you want.

                Code:
                Sub Main(ByVal Params As Object)
                
                        Dim strFileName As String
                        Dim objEnum As Scheduler.clsDeviceEnumeration
                        Dim objDevice As Scheduler.Classes.DeviceClass
                        Dim strDevice As String
                        Dim strApPath As String
                        Dim strDString As String
                        Dim strListItem As String
                        Dim intStatus As Integer
                        Dim intValue As Integer
                
                
                        ' Find the current path and define a file name
                        strApPath = hs.GetAppPath() & "\Config\"
                        strFileName = strApPath & "DeviceProp.csv"
                
                        ' Create an output ASCII text file.  If it already exists, overwrite current contents.
                        Dim FS As New System.IO.FileStream(strFileName, System.IO.FileMode.Create, System.IO.FileAccess.Write)
                
                        Dim sWriter As New System.IO.StreamWriter(FS)
                
                        ' Time stamp the file
                        sWriter.WriteLine("HomeSeer Devices - " & Now)
                
                        ' Create a header row
                        sWriter.WriteLine("Code" & "," & "Location" & "," & "Name" & "," & "Status" & "," & "Value" & "," & "String")
                
                        ' Get a list of all HS devices
                        objEnum = CType(hs.GetDeviceEnumerator, Scheduler.clsDeviceEnumeration)
                
                        ' Retrieve data for each HS device and write it to the file
                        Do While Not objEnum.Finished
                
                            objDevice = objEnum.GetNext
                
                            strDevice = objDevice.hc & objDevice.dc  ' Device code
                            intStatus = hs.DeviceStatus(strDevice)
                            intValue = hs.DeviceValue(strDevice)
                            strDString = hs.DeviceString(strDevice)
                
                            strListItem = strDevice & "," & objDevice.location & "," & objDevice.Name & "," & CStr(intStatus) & "," & CStr(intValue) & "," & strDString
                
                            sWriter.WriteLine(strListItem)
                
                        Loop
                
                        ' Close the file
                        sWriter.Close()
                    End Sub


                Uncle Michael,

                Can you help a "non programmer" out with your script?

                I just put your script into HS as a run Manual Event, ran it manually and it failed on the 1st line.


                Dec-14 8:27:53 PM Error Running script, script run or compile error in file: C:/Program Files (x86)/HomeSeer HS3/scripts/ListDevice.txt1006:Expected ')' in line 1 More info: Expected ')'


                Should I be saving this file as a .vbs then running it instead of a .txt ?


                Thanks
                Charles

                Comment


                • #9
                  It should be saved with a .vb extension.

                  Cheers
                  Al
                  HS 3.0.0.548: 1976 Devices 1156 Events
                  Z-Wave 3.0.1.262: 123 Nodes on one Z-Net

                  Comment


                  • #10
                    After updating with the .vb extension, I ran it again and now I'm getting a whole lot more of errors:

                    Dec-15 12:09:56 AM Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\ListDevice.vb: Argument not specified for parameter 'hs' of 'Public Property Name(hs As HomeSeerAPI.IHSApplication) As String'.
                    Dec-15 12:09:56 AM Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\ListDevice.vb: Argument not specified for parameter 'hs' of 'Public Property Location(hs As HomeSeerAPI.IHSApplication) As String'.
                    Dec-15 12:09:56 AM Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\ListDevice.vb: 'dc' is not a member of 'Scheduler.Classes.DeviceClass'.
                    Dec-15 12:09:56 AM Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\ListDevice.vb: 'hc' is not a member of 'Scheduler.Classes.DeviceClass'.
                    Dec-15 12:09:56 AM Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\ListDevice.vb: Type 'Scheduler.clsDeviceEnumeration' is not defined.
                    Dec-15 12:09:56 AM Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\ListDevice.vb: Type 'Scheduler.clsDeviceEnumeration' is not defined.
                    Dec-15 12:09:56 AM Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\ListDevice.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't use any aliases.
                    Dec-15 12:09:56 AM Event Running script in background: C:/Program Files (x86)/HomeSeer HS3/scripts/ListDevice.vb


                    Any thoughts ?

                    Comment


                    • #11
                      Uncle Michael's script is for Homeseer 2 not Homeseer 3 hence the errors.

                      If you want an off the shelf solution for HS3 look here.
                      Jon

                      Comment


                      • #12
                        Jon00, not so much under Linux:

                        System.Web.Compilation.CompilationException
                        VBNC30451: Could not resolve the name 'Type'
                        Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error.
                        Details: VBNC30451: Could not resolve the name 'Type'
                        Error origin: Compiler
                        Error source file: ~/Global.asax
                        Exception stack trace:
                        at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x00000] in <filename unknown>:0
                        at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000] in <filename unknown>:0
                        at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0
                        at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0
                        Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

                        Comment


                        • #13
                          Come to think of it, I'm not sure I've seen even the most basic of ASPX pages work under the Linux version. This could be a mono issue not a Jon00 issue :-)
                          [Heads off to do some testing]
                          Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

                          Comment


                          • #14
                            It seems no ASPX support will be forthcoming due to it being a MONO issue. One of my plugins uses ASPX too (Blue Iris) and I switched to JSON. IT would seem all of your wonderful plugins that depend on ASPX as the interface will be limited to the Windows platform. Pity.

                            http://bugzilla.homeseer.com/bugzill...ug.cgi?id=2053
                            Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

                            Comment


                            • #15
                              I have a number of ASPX web pages working fine under Linux Ubuntu so that is not a true statement. Rich did state that it was not supported on the Zee due to the slow processing times....
                              Jon

                              Comment

                              Working...
                              X