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...
Announcement
Collapse
No announcement yet.
Print a Device Inventory Report?
Collapse
X
-
Originally posted by JimSpy View PostIs 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...HS4 Pro, 4.2.18.9 Windows 10 pro, Supermicro LP Xeon
-
Originally posted by rprade View PostThere 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.
Jim Speiser
37-year veteran of Home Automation
Still don't know squat
Comment
-
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
-
Nice Scott, Thank you!
Sent from my iPhoneTom
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
-
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.
.Last edited by jon00; December 7, 2015, 06:08 PM.
Comment
-
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, NUC i3
HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti
Comment
-
Originally posted by Uncle Michael View PostHere'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
-
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
-
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>:0Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin
Comment
-
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
-
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=2053Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin
Comment
Comment