Garret i really dont know what is the problem with altid for You. Belive me it will slow down the app in some cases and will make some troubles. I know how our connection engine works.
Especially it will slow down app with changing server. After change server You must send several dozen of requests. When You are on remote connection it will take really lot of time.
Secondly there are situations when You are changing device type file. What about then? Option in app to refresh device types? No. It must work full automatically.
I think the best solution for this problem is to reserve about 3 categories as plugins eg. 44,45,46 are plugins and recognize them by subcategory. But Mcvflorin said than there can be problems. So altid is also good solution. Especially that altid is send always anyway. So what is the problem. This is not a hack. This is what for these variables are (i think. if not, mcvflorin please correct me)
I do not know how you developed the app to retrieve and store the data. I am not sure if you are misunderstanding how I get the device data. The device data is not retrieved all of the time. It is only retrieved once when first configuring the app. It does not issue the api call any other time when updating the data. However, if a new device or plugin is added, the device type api call will get called. When parsing the full data, you check to see if the device type is setup, if not you call the device type api to retrieve the data and store it. It will never have to be called again. So the only slowness you will experience is on the initial loading of the data at first run.
You should never have to change the device file type. So that is not an issue. The altid is a bad idea because many 3rd party plugins use this field already. Some examples are DSC alarm panel plugin, Altsteon plugin, Weather Underground plugin, and the list goes on. The altid field gets used for plugins that have child devices.
I have been down this path and worked with MCV on this very issue with my app. I worked with the lead developer of Vera to come up with a solution that we can both agree with. We discussed using the plugin id, but this will not tell you what type of device controls to use if the plugin has child devices with different device types. I asked to have the device type added to the lu_sdata, but they turned that down to to increasing the size of the data. It all came down to using the finddevice api. Yes, it causes x number of additional requests, but only on the initial setup of the app and the vera unit. So that compromise is a small price to pay.
- Garrett