I don't know, however the Scheduler.Classes.DeviceClass is not supported either so even if you do get the references, you are still in trouble.
Announcement
Collapse
No announcement yet.
.asp page to display all devices
Collapse
X
-
Thanks. One last try to be able to do this in HS4 "natively", so to speak - there are references in the forum and in some HS4 documentation to a function called 'GetAllRefs' - is that working?
Regards.
Leave a comment:
-
Correct for both points...the hs4 scripting documentation is not finished. The hs3 documentation is valid in HS4.
Leave a comment:
-
Jon,
Thanks for the quick reply. I assume hs.runscriptfunc allows an asp page to call a vb.net script and take the output in a similar fashion to a function returning values? If that is correct, could you point me towards the documentation in HS4 for how to use this function? Of course, given the state of HS4 documentation I can't find that - would I just use the HS3 documentation?
Thanks.
Leave a comment:
-
I think the issue is that Scheduler.Classes.clsDeviceEnumeration is not referenced correctly in VBScript within HS4.
I very much doubt there will support changes for this as vbs/asp is dead in the water and has never worked on Linux either.
You could define this code in a vb.net script and use the hs.runscriptfunc in your asp page to return the result.
Leave a comment:
-
Jon, using the .aspx code you posted (which works in an .aspx page) is causing some other problems for me - basically, I need to convert a very long and complex script to aspx from asp, and I'd rather not go through that if I don't have to. Isn't there a way to enumerate and get access to all devices on an .asp page? It seems odd that this is not possible.
Thanks in advance for any help you or others can provide.
Leave a comment:
-
Yup, Jon's DeviceListViewer is really invaluable for not just finding the odd device but also all the info needed if you are writing any scripts or immediate commands.
Leave a comment:
-
Excellent, that worked for me - thanks so much. Is there a list somewhere of what functionality works on an .asp page and what requires .aspx? Just curious ...
Leave a comment:
-
Originally posted by jon00 View Post
Leave a comment:
-
Originally posted by mikee123 View PostYes thats working now. Interesting. I can imagine it be be useful having the device ref, room and device type with every device. Thats something I would have liked to have sometimes, especially on a bigger system.
Leave a comment:
-
Yes thats working now. Interesting. I can imagine it be be useful having the device ref, room and device type with every device. Thats something I would have liked to have sometimes, especially on a bigger system.
Leave a comment:
-
Put this at the very bottom of the page after the 'End Sub'
Code:</script>
Leave a comment:
-
Originally posted by jon00 View PostNo, you would save it in the html directory and call it something like devicelist.aspx
You would then call devicelist.aspx from your Homeseer web server as a web page.
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Unexpected end of file looking for </script> tag.
Source Error:
Line 1: <%@ Page Language="VB" %>
Line 2: <script runat="server">
Line 3: Public hs As Scheduler.hsapplication
Line 4: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Source File: /Devicelist.aspx Line: 2
Leave a comment:
-
No, you would save it in the html directory and call it something like devicelist.aspx
You would then call devicelist.aspx from your Homeseer web server as a web page.
Leave a comment:
-
Originally posted by jon00 View PostGetDeviceEnumerator works fine...just not an asp web page.
This works using an .aspx page:
Code:<%@ Page Language="VB" %> <script runat="server"> Public hs As Scheduler.hsapplication Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) hs = Context.Items("Content") Dim EN As Scheduler.Classes.clsDeviceEnumeration Dim dv As Scheduler.Classes.DeviceClass EN = hs.GetDeviceEnumerator If EN Is Nothing Then response.write ("Error getting Enumerator") response.end() End If do dv = EN.GetNext If dv Is Nothing Then exit Do response.write (dv.name(Nothing) & "<br>") loop response.write ("Finished") End Sub
Leave a comment:
Leave a comment: