I used to use the older (script) version of UltraView2 under IIS way back when, and extended it through the ultra_view2_xml.inc file to add different capabilities for new devices types. For example, for TEMP05 (weather), security, as well as Ninja Pan/Tilt camera base devices, I added a text-to-image function using the DynImage object, which created image files based on the device string in the device.
This allowed me to use decimal numerical info, such as 65.6, instead of just using HS' integer data for device values. It wasn't easy to make the changes at first, but I got it down to a science and had many devices types where I did this.
However, now that I'm running HS2 and UltraView2 as a plugin, I'm not sure where I would make this type of change, in order to use that DynImage object to create and pump icon image names into UV2.
I think that along with the new Ultra Status2, this would be a great way to clean up any missing icons - have them built on the fly when the UV2 page is updated.
Ultrajones, while I have not tested whether HS2's web server would recognize and use this ActiveX object, can you tell me how/where to extend the new UV2 to do this, or would you consider putting the capability into the package? I'll test the object to see if it will work under HS2 shortly and post my results. The object info is at http://www.oz.net/~cashton/dynimage.html .
Here's an example section I had used from the older UV2 under IIS 5:
This allowed me to use decimal numerical info, such as 65.6, instead of just using HS' integer data for device values. It wasn't easy to make the changes at first, but I got it down to a science and had many devices types where I did this.
However, now that I'm running HS2 and UltraView2 as a plugin, I'm not sure where I would make this type of change, in order to use that DynImage object to create and pump icon image names into UV2.
I think that along with the new Ultra Status2, this would be a great way to clean up any missing icons - have them built on the fly when the UV2 page is updated.
Ultrajones, while I have not tested whether HS2's web server would recognize and use this ActiveX object, can you tell me how/where to extend the new UV2 to do this, or would you consider putting the capability into the package? I'll test the object to see if it will work under HS2 shortly and post my results. The object info is at http://www.oz.net/~cashton/dynimage.html .
Here's an example section I had used from the older UV2 under IIS 5:
Code:
case "Weather" if strDeviceString = "" then strDeviceString = "Unknown" strDeviceIcon = "unknown.gif" else 'Convert degree character to HTML degree strDeviceString = replace(strDeviceString, "°", "°") select case strDeviceString case "." strDeviceIcon = mid(strDeviceString,1,(Instr(strDeviceString,".")-1) ) case "°" strDeviceIcon = mid(strDeviceString,1,(Instr(strDeviceString,"°")-1) ) case else Set oDynImage = CreateObject("DynImage.DynImage") oDynImage.Open 50, 20 oDynImage.Color = &h000000 oDynImage.Rectangle 0, 0, 50,20 'oDynImage.LoadImage 1, 1, 229, 250, "c:\Live.bmp" oDynImage.FontFace = "Tahoma Bold" oDynImage.FontWeight = 300 oDynImage.FontSize = 12 oDynImage.Color = &h000000 oDynImage.TextOut 7,03, strDeviceString & "°" oDynImage.FontFace = "Arial" oDynImage.FontWeight = 500 oDynImage.FontSize = 14 'sTemp = hs.DeviceString("v13") 'iTemp = InStr(1,sTemp,">") 'sTemp = Mid(sTemp, CInt(iTemp) + 1, (Len(sTemp) - CInt(iTemp))) 'oDynImage.TextOut 7,105, Trim(sTemp) 'Response.ContentType = "image/png" 'Response.BinaryWrite oDynImage.Image image = "c:\program files\homeseer\html\temp\" & strDeviceString & ".png" oDynImage.SaveImage(image) oDynImage.Close set oDynImage = nothing strDeviceIcon = "/temp/" & strDeviceString & ".png" end select strDeviceIcon = BuildIcon(strDeviceIcon) end if
Comment