If you ever used Misterhouse with more than a few voice commands and/or items, you probably noticed some weird images popping up on your touch screens. As you add and remove common code modules (adding and removing commands and items as a result), the images change. Some icons have borders (which is supposed to indicate that it is a button to press), some don't. Some icons are of a uniform size, some are tiny plus and minus signs, some are larger. It is a real mish mash. The problem is that voice commands, items and share one virtual graphics directory and web/graphics is the default mapping. You can map additional folders for matching, but that is pretty useless and not pertinent here. What is pertinent is that every Web script ever written that has its own navigational dings (eg floor plan, item lists, etc.) has dumped them in this folder (so voice commands sometimes match icons named "a1+.gif" or "1pixel.gif." That first one used to pop up all the time here.
The solution to this is simple. Voice commands have their own rules for matching using regular expressions, so put them in their own virtual directory defaulted to /graphics/commands, now you won't match plus signs or blanks or item states or anything else that isn't meant to represent a VC. BTW, all VC icons are buttons, so should have a border. Items go in /graphics/items (as do item-state concatenations.) Add /graphics/types for icons that represent classes of items (eg x10_item, ir_item, socket_item, xap_item, etc.) Furthermore, you can expand on the types by tacking on states (eg x10_item-on, x10_item-off, x10_item-status, etc.) Add /graphics/states for state-only representations (eg on, off, manual, dim, bright.) BTW, the best way to represent a "manual" (addressed) state is to invert the border (as opposed to an icon that says "man".) From looking at my version of html_find_icon_image in http_server.pl, the order of operations is to check for the name-state, then type-state, then just the name, then just the state, then the type alone (most generic representation.) Finally use "unk" (another lousy default image) if everything else fails (never happens if you populate these folders properly.) The only other differences in the html_find_icon_image sub are:
return "/graphics/$icon";
is changed to:
return "../graphics/$icon";
and the population of %html_icons is slightly different, in that there are now four of them (one for each virtual folder: %html_icons_commands, %html_icons_items, %html_icons_states and %html_icons_types.)
The end result is that the list pages have a uniform look and it makes all the difference in the world as far as touch screen presentation. There are actually some decent icons in the graphics folder, you just have to sort them into appropriate folders. I already did that and have a ZIP available. And yes, I sent it in to the SVN idiots (months ago.) I see my holiday audio schemes (not Web-related, but another mistep I just noticed) are MIA as well. These guys suck. There's just no other way to put it.