I generated my floor plan and got ultraview working with the default "light bulb" icon for all my devices.
I'm trying to customize the icons displayed for my devices in my ultraview floorplan. I am using Homeseer 1.6.0 and the latest ultraview download.
I am trying to do this by customizing the "ultra_view2_xml.inc" file in the "include" directory.
I made a custom device type for "Window" and downloaded an open.gif and closed.gif icons that I would like to use for these devices.
I also downloaded a motion_down.gif, and custom.gif icons for the "Motion Sensor" devices. All icons are located under Homeseer's html root.
The device status shows up as "OFF" and "ON" in my device viewer in Homeseer.
Here is a snippet of what I modified below:
' Start Mods for Icons Here:
select case strDeviceType
case "Window"
if strDeviceString = "On" then
strDeviceString = "On"
strDeviceIcon = "open.gif"
else
strDeviceIcon = BuildIcon(strDeviceString)
end if
if strDeviceString = "Off" then
strDeviceString = "Off"
strDeviceIcon = "closed.gif"
else
strDeviceIcon = BuildIcon(strDeviceString)
end if
case "Motion Sensor"
if strDeviceString = "On" then
strDeviceString = "On"
strDeviceIcon = "motion_down.gif"
else
strDeviceIcon = BuildIcon(strDeviceString)
end if
if strDeviceString = "Off" then
strDeviceString = "Off"
strDeviceIcon = "custom.gif"
else
strDeviceIcon = BuildIcon(strDeviceString)
end if
‘End of Modifications for Icons
case "Temperature Probe"
if strDeviceString = "" then
strDeviceString = "Unknown"
strDeviceIcon = "unknown.gif"
else
'Convert degree character to HTML degree
strDeviceString = replace(strDeviceString, "°", "°")
if Instr(strDeviceString, ".") then
strDeviceIcon = Left(strDeviceString, (Instr(strDeviceString, ".") -1))
else
strDeviceIcon = Left(strDeviceString, (Instr(strDeviceString, "°") -1))
end if
strDeviceIcon = BuildIcon(strDeviceIcon)
end if
case else
'Ensure images are identical to how HomeSeer Web Control works
select case cLng(iDeviceStatus)
case 2 'Device status is ON
if strDeviceString = "" then strDeviceString = "On" strDeviceIcon = "on.gif"
else
strDeviceIcon = BuildIcon(strDeviceString)
end if
case 3 'Device status is OFF
if strDeviceString = "" then strDeviceString = "Off"
strDeviceIcon = "off.gif"
else
strDeviceIcon = BuildIcon(strDeviceString)
end if
case 4 'Deviced status is Dimmed
if strDeviceString = "" then
strDeviceString = "Dimmed to " & FormatPercent(iDeviceValue/100, 0)
strDeviceIcon = "dim.gif"
else
strDeviceIcon = BuildIcon(strDeviceString)
end if
case else 'Device status is Unknown
if strDeviceString = "" then
strDeviceString = "Unknown"
strDeviceIcon = "unknown.gif"
else
strDeviceIcon = BuildIcon(strDeviceString)
end if
end select
end select
The icons for the motion sensors and the windows show up as red X's and the device's on/off state shows up as "".
I was hoping this would be the easiest way to modify icons for my ultraview floor plan.
What am I doing wrong?
Thanks,
BSR
I'm trying to customize the icons displayed for my devices in my ultraview floorplan. I am using Homeseer 1.6.0 and the latest ultraview download.
I am trying to do this by customizing the "ultra_view2_xml.inc" file in the "include" directory.
I made a custom device type for "Window" and downloaded an open.gif and closed.gif icons that I would like to use for these devices.
I also downloaded a motion_down.gif, and custom.gif icons for the "Motion Sensor" devices. All icons are located under Homeseer's html root.
The device status shows up as "OFF" and "ON" in my device viewer in Homeseer.
Here is a snippet of what I modified below:
' Start Mods for Icons Here:
select case strDeviceType
case "Window"
if strDeviceString = "On" then
strDeviceString = "On"
strDeviceIcon = "open.gif"
else
strDeviceIcon = BuildIcon(strDeviceString)
end if
if strDeviceString = "Off" then
strDeviceString = "Off"
strDeviceIcon = "closed.gif"
else
strDeviceIcon = BuildIcon(strDeviceString)
end if
case "Motion Sensor"
if strDeviceString = "On" then
strDeviceString = "On"
strDeviceIcon = "motion_down.gif"
else
strDeviceIcon = BuildIcon(strDeviceString)
end if
if strDeviceString = "Off" then
strDeviceString = "Off"
strDeviceIcon = "custom.gif"
else
strDeviceIcon = BuildIcon(strDeviceString)
end if
‘End of Modifications for Icons
case "Temperature Probe"
if strDeviceString = "" then
strDeviceString = "Unknown"
strDeviceIcon = "unknown.gif"
else
'Convert degree character to HTML degree
strDeviceString = replace(strDeviceString, "°", "°")
if Instr(strDeviceString, ".") then
strDeviceIcon = Left(strDeviceString, (Instr(strDeviceString, ".") -1))
else
strDeviceIcon = Left(strDeviceString, (Instr(strDeviceString, "°") -1))
end if
strDeviceIcon = BuildIcon(strDeviceIcon)
end if
case else
'Ensure images are identical to how HomeSeer Web Control works
select case cLng(iDeviceStatus)
case 2 'Device status is ON
if strDeviceString = "" then strDeviceString = "On" strDeviceIcon = "on.gif"
else
strDeviceIcon = BuildIcon(strDeviceString)
end if
case 3 'Device status is OFF
if strDeviceString = "" then strDeviceString = "Off"
strDeviceIcon = "off.gif"
else
strDeviceIcon = BuildIcon(strDeviceString)
end if
case 4 'Deviced status is Dimmed
if strDeviceString = "" then
strDeviceString = "Dimmed to " & FormatPercent(iDeviceValue/100, 0)
strDeviceIcon = "dim.gif"
else
strDeviceIcon = BuildIcon(strDeviceString)
end if
case else 'Device status is Unknown
if strDeviceString = "" then
strDeviceString = "Unknown"
strDeviceIcon = "unknown.gif"
else
strDeviceIcon = BuildIcon(strDeviceString)
end if
end select
end select
The icons for the motion sensors and the windows show up as red X's and the device's on/off state shows up as "".
I was hoping this would be the easiest way to modify icons for my ultraview floor plan.
What am I doing wrong?
Thanks,
BSR
Comment