I'm developing a plug-in for which also had a device instantiated in my housebot configuration. Later, I did some major re-working of the plugin which also renamed the device. After replacing the plug-in dll's I fired up housebot again, and got some errors in the log about the device name not being found, please check the plug-in exists. No problem, I thought, I'll just re-create the device.
Well, it seems the ghost of the old device is still in the database somewhere. It certainally isn't in the UI where I can get rid of it though. The error log is now full of entries like:
Unable to find stock device with name [Krell Hardware Device] and description [Krell Showcase]. Make sure plugin is installed::LookupProperty () Unable to find device ID [27] in device map.
My device plug-in is now two devices renamed to be more specific. So something is still trying to find my old device name that my plug-in used to provide.
UPDATE: OK, after making copies of my theme which was referring to properties from that device and the housebot mdb file, I did surgery on both.
Blew away all records referring to device id 27, and edited the theme's xml file and did the same. Of course I needed to re-hook up some properties. Fortunately, I didn't have that many tasks so I was able to re-write all of them referring to my old device.
Lession learned: Delete a device and all instances of things using it before pulling the rug out!
That still leaves the question though: if I legitimately remove a device properly, what become of my theme elements referring to it?
The theme elements have partial data --- after removing the device and restarting HouseBot, if you go into the theme editor and bring up a control that refered to the old device, you will see the device and property fields are empty. If you create a new device that has the same properties and then you select the new device in the device field, the property will automatically default to the property name that the prior device had in this control, if the property name is also valid for the new device
That doesn't seem to work for panels' entry and exit lists. Do this:
Create a device
Create a theme
Create a panel
Set an entry list to set a property from the domed device to something
Delete the device
Entry list xml items are permanently orphaned, and causes the HouseBot to give the 'unable to find device ID [nn]' errors when a remote client brings up the panel. They don't show up in the editor and cannot be deleted without editing the xml directly.
Yes, you have to be a bit careful when developing plugins to not change the name of the plugin while you have it configured in the system. If you have MS Access, you can remove it from the DB, but the application doesn't really expect this to happen normally, so there's no way to delete this from the UI.
Theme data is stored in XML files and isn't even loaded unless needed. Therefore things can get orphaned in the Themes.