Author Topic: Assignment of device category  (Read 387 times)

Offline tinman

  • Full Member
  • ***
  • Posts: 154
  • Karma: +7/-0
Assignment of device category
« on: May 09, 2018, 10:43:33 am »
When a device is added to Vera, how is the device category and device subcategory assigned? I know that these can appear in the device definition file (D_device1.xml) but even if it is it is sometimes ignored. I have a device definition file in which I have:
    <Category_Num>3</Category_Num>
    <Subcategory_Num>8</Subcategory_Num>
These definitions appear in the Device categories and subcategories mapping switch/relay in the wiki but when the device is added the subcategory is not one of the device parameters. For other device types the category and subcategory are not defined in the device definition file; e.g. D_DoorSensor1.xml. And yet a subcategory condition appears in D_DoorSensor1.json and the created door sensor device parameters include a category of 4 and subcategory of 1.
So what are the rules/conditions/priorities for the assignment of the category and subcategory?

Online reneboer

  • Hero Member
  • *****
  • Posts: 1329
  • Karma: +73/-30
Re: Assignment of device category
« Reply #1 on: May 22, 2018, 11:57:21 am »
Hi,

You can see the list here http://wiki.micasaverde.com/index.php/Luup_Device_Categories.

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline tinman

  • Full Member
  • ***
  • Posts: 154
  • Karma: +7/-0
Re: Assignment of device category
« Reply #2 on: May 28, 2018, 11:49:04 am »
Sorry for my late reply - I was on vacation for a week.

The reason for my original post was to try to find out how categories and sub categories become device parameters. I was already aware of what appears in the wiki. The point is that my device file contains category (3) and subcategory (8) numbers which appear to be in agreement with what is listed in the wiki and yet when the device is created the subcategory is not one of the device parameters. What's the point of listing them in the wiki if they're going to be ignored?

Online reneboer

  • Hero Member
  • *****
  • Posts: 1329
  • Karma: +73/-30
Re: Assignment of device category
« Reply #3 on: May 29, 2018, 10:55:03 am »
Hi,

I have been able to change some sub-categories and has the icon for the device change. For the standard devices it indeed seem the Vera has the firmware ignore them for the rest. If you build your own plugin you can use the numbers as listed.

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.