Device Category (category_num)

I was asked by a android developper to add a “category_num” variable to my plugins here: http://forum.micasaverde.com/index.php/topic,10974.msg91149.html#msg91149

Now my question, is this a proper approach, who defines category numbers? What are the consequences of changing them? Can I do this? Should they be added here http://wiki.micasaverde.com/index.php/Luup_Device_Categories ?

Chixxi,

I read the other thread before this one. I was thinking the same thing, but wanted to keep my mouth shut. I think the direction they are going with this is the wrong idea. More or less seems like a workaround for supporting the plugins. In the upcoming version of AutHomation(HD) 2.1, what I did to start supporting 3rd party plugins was to use the following api call (http://veraip:3480/data_request?id=finddevice&devnum=deviceid). I had MCV modify the api command to look up the device by id and it provides the following output:

6,uuid:4d494342-5342-5645-0006-000001c9c7e7,urn:schemas-upnp-org:device:DimmableLight:1

I than parse the needed data (the device type) and store it with the device data into the database. This call gets called only once when first importing the data of the devices (reason the first import may take a minute or two). Any new devices that get added will call this action only once and get stored. I modified my code base to parse both category number (backwards compatibility for UI4 and UI5 firmware 1.371 or older) and the device type to figure out what controls to display.

The reason for all of this was to keep using lu_sdata for faster data refreshing. MCV did not want to add the device type to the lu_sdata in fear of boating the data more.

I hope this makes sense.

  • Garrett