We have moved at community.getvera.com

Author Topic: lu_sdata and device category  (Read 1513 times)

Offline zoot1612

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
lu_sdata and device category
« on: July 25, 2012, 10:37:20 pm »
I have the following devices that I would like to control/monitor from AutHomation: -
DEVICETYPE_RELAY                "urn:schemas-micasaverde-com:device:Relay:1"

Currently they come up with "?" and in lu_sdata have a device category "11" (DEVICE_CATEGORY_GENERIC_IO) which is not supported.

I though the easiest solution would be to change the device category to "3" (DEVICE_CATEGORY_SWITCH)

Code: [Select]
luup.attr_set("category_num","3",k)
While this changed category_num the device category in lu_sdata remains "11".
Quote
      {
         "name":"Module 02:Zone 1",
         "altid":"0201",
         "id":421,
         "category":11,
         "subcategory":0,
         "room":4,
         "parent":409,
         "status":"0"
      },
Am I missing something and if I did manage to change it would it register correctly in AutHomation?

regards

Zoot

Offline zoot1612

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: lu_sdata and device category
« Reply #1 on: July 25, 2012, 11:28:16 pm »
Found, looks like it was inherited from the parent. I changed that and nNow device category comes up as "3".

All seems to be OK not sure what I did ???

Zoot
« Last Edit: July 26, 2012, 01:09:10 am by zoot1612 »

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: lu_sdata and device category
« Reply #2 on: July 26, 2012, 08:47:44 am »
All seems to be OK not sure what I did ???

Theory: your browser was caching the old sdata output, and was misleading you when in fact you'd already successfully changed it.